Skip to content

📝 docs(security): add threat model and assurance case - #3294

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:docs/threat-model
Sep 23, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:docs/threat-model

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

SECURITY.md defines the scope and INCIDENT_RESPONSE.md covers the steps after a report, yet neither records the trust boundaries of virtualenv or the evidence that each control works. 🛡️

.github/THREAT_MODEL.md holds the threat model and the assurance case in one file. We based the layout on the GitHub Secure Open Source Fund threat modeling template for libraries, group threats by STRIDE, and took the caller and project split from the Apache Commons and Apache Shiro models. The assurance case records the 2026-09-22 review by Bernát against the 21.10.0 release and maps each countered CWE class to its fix and tests. 📋

The document reflects the work merged since that release: the fail-closed digest check from #3302, the SBOM assets from #3299 and #3310, the bootstrap.pypa.io verification from #3309, the pinned CI tool downloads from #3293 and the release docs from #3305. #3306 and #3301 stay open items linked to their pull requests, and so does wheel reproducibility, since the embedded SBOM records the build machine and the sdist is the one distribution that rebuilds byte for byte. 🔗

Each file and external reference links to its source on main or upstream. The prose describes behavior in place of function names, test names or commit hashes, so the text survives refactors. pyproject.toml adds mitre to the codespell ignore list so the CWE links keep their host name.

Admins bypass the approval rule on main, so the document lists single-reviewer merges as a known gap and does not count a second reviewer as a control. SECURITY.md and INCIDENT_RESPONSE.md each gain a paragraph that links to the new file, and we follow SECURITY.md on any conflict.

@gaborbernat gaborbernat added documentation security Fixes a vulnerability or hardens the supply chain, CI or release labels Sep 22, 2026
@gaborbernat gaborbernat changed the title docs(security): publish a threat model docs(security): add threat model and assurance case Sep 22, 2026
@gaborbernat gaborbernat changed the title docs(security): add threat model and assurance case 📝 docs(security): add threat model and assurance case Sep 23, 2026
SECURITY.md defines the scope and INCIDENT_RESPONSE.md covers the steps
after a report, yet neither records the trust boundaries of virtualenv or
the evidence that each control works.

THREAT_MODEL.md holds both parts in one file. We based the layout on the
GitHub Secure Open Source Fund library template, group threats by
STRIDE, and took the caller and project split from the Apache Commons
and Shiro models. The assurance case records the 2026-09-22 review by
Bernát against the 21.10.0 release, updated for the pull requests merged
since, and maps each countered weakness class to its fix and tests.

Each file and external reference links to its source, and the prose
names behavior in place of functions, test names or commit hashes, so
the text survives refactors. codespell ignores
mitre so the CWE links keep their host name.

Admins bypass the approval rule on main. The document lists
single-reviewer merges as a known gap and does not count a second
reviewer as a control.
@gaborbernat
gaborbernat merged commit 29fba39 into pypa:main Sep 23, 2026
65 checks passed
@gaborbernat
gaborbernat deleted the docs/threat-model branch October 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation security Fixes a vulnerability or hardens the supply chain, CI or release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant