Hi all,
I’ve been contributing to CPython’s security tooling and Python docs translation, and I keep running into the same practical gap: there is no standard, machine-readable way for a Python package to declare its security contact, policy, or disclosure method.
Checking the current well-known URL labels (from PEP 753): homepage, source, download, changelog, releasenotes, documentation, issues, funding — security is not on this list. Package authors who add "Security Policy" = "..." to their [project.urls] table get no consistent treatment by PyPI, pip-audit, or any tooling.
A February 2026 peer-reviewed study (“Security by documentation? Characterising GitHub SECURITY.md policy and their adoption in Python libraries”) confirmed widespread inconsistency in how Python packages declare security information across the PyPI ecosystem.
I’d like to propose two things:
1. Small, fast: Add security as a well-known URL label in the PEP 753 / well-known labels specification — with aliases like securitypolicy, vulnerability, advisories.
2. Full proposal: Add an optional [project.security] table to pyproject.toml:
[project.security]
contact = "security@myproject.org"
policy-url = "https://myproject.org/security"
disclosure = "coordinated" # or "private" / "public"
advisory-url = "https://github.com/user/project/security/advisories"
This is fully backwards-compatible — an optional table, no existing fields touched. It would give PyPI, pip-audit, and the PSF’s upcoming automated package review tools a standard field to read, directly supporting the work from the Anthropic/PSF security roadmap.
Has this been discussed before? I searched open PEPs and packaging Discourse threads and found nothing covering self-declared security metadata at the pyproject.toml level. Happy to draft a PEP if there’s interest.