Skip to content

feat(corpus): add PyPI registry supply-chain platform (3 red↔blue pairs)#24

Merged
Gerrrt merged 2 commits into
mainfrom
claude/dotfiles-round-7-github-b8nut0
Jul 3, 2026
Merged

feat(corpus): add PyPI registry supply-chain platform (3 red↔blue pairs)#24
Gerrrt merged 2 commits into
mainfrom
claude/dotfiles-round-7-github-b8nut0

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the PyPI registry platform — the Python mirror of the npm round — as 3 companion-only red↔blue pairs over the PyPI project journal (product: pypi, field action):

Attack (red) Detection (blue) ATT&CK
pypi-malicious-publish — upload a trojanized release via a stolen API token (bypassing trusted publishing) pypi-publish-auditnew release not via a trusted publisher T1195.002
pypi-role-add — add a rogue Owner/Maintainer for durable publish rights pypi-role-audit — journal add Owner / add Maintainer T1098
pypi-trusted-publisher — register an attacker-controlled OIDC trusted publisher (credential-less backdoor) pypi-trusted-publisher-audit — add-trusted publisher journal entry T1098

Corpus is now 68 paired concepts + 1 unpaired recon entry.

Why

Completes the package-registry seam alongside npm. PyPI's modern supply-chain surface is distinct: trusted publishing (OIDC) is the secure norm, so the two high-signal detections are a token upload that bypasses it and a rogue trusted publisher that abuses it.

Notes

  • Companion-only registry pairs — no companion:gen markers, nothing generates into the flat views.
  • PyPI role/trusted-publisher management is web-console-only (no public API), so those red entries present the console step honestly; only the upload (twine) has a CLI.
  • CI-verified locally: bash -n, pairing graph + slot coverage, gen-views.sh --check.

🤖 Generated with Claude Code

https://claude.ai/code/session_011spYcGfeP4a3RNQQVDrGtW


Generated by Claude Code

Python mirror of the npm round over the PyPI project journal (product: pypi,
field action):
- pypi-malicious-publish (T1195.002) — token release upload bypassing trusted publishing
- pypi-role-add (T1098) — rogue Owner/Maintainer for durable publish rights
- pypi-trusted-publisher (T1098) — rogue OIDC trusted publisher backdoor

Companion-only registry pairs; corpus is now 68 paired concepts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011spYcGfeP4a3RNQQVDrGtW

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds PyPI as a new package-registry “platform” in the corpus, mirroring the existing npm registry round with three red↔blue companion-only pairs derived from PyPI’s project journal telemetry.

Changes:

  • Added 3 PyPI supply-chain red entries (malicious token upload, role/owner add, trusted publisher add) and their paired blue journal detections.
  • Updated README corpus summary/table to include the new PyPI pairs and new total paired-concept count.
  • Updated the changelog to document the new PyPI platform and revised corpus totals.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updates corpus totals and adds the three PyPI rows to the corpus table.
CHANGELOG.md Documents the PyPI registry platform additions and updates the paired-concept count.
entries/red/pypi-malicious-publish.md New red entry describing token-based malicious release upload via twine.
entries/red/pypi-role-add.md New red entry describing adding an Owner/Maintainer via the PyPI web console.
entries/red/pypi-trusted-publisher.md New red entry describing registering an attacker-controlled trusted publisher (OIDC).
entries/blue/pypi-publish-audit.md New blue detection for new release events not published via trusted publisher.
entries/blue/pypi-role-audit.md New blue detection for add Owner / add Maintainer journal entries.
entries/blue/pypi-trusted-publisher-audit.md New blue detection for trusted publisher additions in the journal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- pypi-malicious-publish: reword so it doesn't imply setup.py runs on every
  install (wheels don't) — code runs when an sdist is built or on import.
- pypi-publish-audit: 'widely-depended' → 'widely depended-on'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011spYcGfeP4a3RNQQVDrGtW
@Gerrrt
Gerrrt merged commit fbbb770 into main Jul 3, 2026
1 check passed
@Gerrrt
Gerrrt deleted the claude/dotfiles-round-7-github-b8nut0 branch July 3, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants