Skip to content

ci(security): OIDC trusted-publishing + SHA-pin GitHub Actions#46

Merged
WRG-11 merged 1 commit into
mainfrom
session/B-r89-105b-oidc-shapin
May 30, 2026
Merged

ci(security): OIDC trusted-publishing + SHA-pin GitHub Actions#46
WRG-11 merged 1 commit into
mainfrom
session/B-r89-105b-oidc-shapin

Conversation

@WRG-11
Copy link
Copy Markdown
Owner

@WRG-11 WRG-11 commented May 30, 2026

Security-hygiene fixes routed from the H R89-103h WRG-11 13-repo sweep (findings H-1 + M-1). CI/workflow only — no application code, no repo Settings changes.

H-1 (HIGH) — PyPI trusted publishing (OIDC)

release.yml publish-pypi job moves off the long-lived PYPI_API_TOKEN repo secret to OIDC trusted publishing:

  • adds environment: pypi + permissions: id-token: write
  • removes the password: ${{ secrets.PYPI_API_TOKEN }} directive

This closes the token-exfil → malicious-publish supply-chain risk and brings instinct in line with wrg-devguard / wrg-mcp-server / wrg-rule-lab (already OIDC).

⚠️ Operator one-time step (publish stays inert until done)

  1. PyPI → project instinct-mcpPublishing → add a trusted publisher:
    owner WRG-11, repo instinct, workflow release.yml, environment pypi.
  2. Then delete the PYPI_API_TOKEN repo secret (no longer used).

M-1 (MED) — SHA-pin GitHub Actions

All actions/* pinned to a full 40-char commit SHA with a # vN comment (readability + Dependabot bumps the comment):

  • actions/checkoutde0fac2e… # v6
  • actions/setup-pythona309ff8b… # v6
  • actions/upload-artifact043fb46d… # v7
  • actions/download-artifact3e5f45b2… # v8
  • pypa/gh-action-pypi-publishcef22109… # release/v1 (org-standard pin)

Mitigates the mutable-tag (tag-repoint) supply-chain vector across ci.yml, codeql.yml, release.yml.

Note: github/codeql-action is intentionally left on its major tag (@v4) — it is GitHub-maintained security tooling and pinning it risks running a stale CodeQL bundle (detection degradation).

Do not merge — operator + V-gate (R89-105b).

H-1: release.yml PyPI publish migrates from long-lived PYPI_API_TOKEN to
trusted publishing (OIDC) — publish-pypi job gains 'environment: pypi' +
'permissions: id-token: write'; the password/secret directive is removed.
Closes the token-exfil -> malicious-publish supply-chain risk.

M-1: pin all actions/* to full commit SHA (checkout v6, setup-python v6,
upload-artifact v7, download-artifact v8) with '# vN' comment for readability
and Dependabot compatibility. pypa/gh-action-pypi-publish pinned to the
org-standard release/v1 SHA. github/codeql-action left on its major tag (v4)
by design (GitHub-maintained; pinning risks a stale CodeQL bundle).

Operator one-time step: add a PyPI trusted publisher for project instinct-mcp
(owner WRG-11, repo instinct, workflow release.yml, env pypi), then delete the
PYPI_API_TOKEN repo secret. Publish stays inert until then.
@WRG-11 WRG-11 merged commit c778d8e into main May 30, 2026
12 checks passed
@WRG-11 WRG-11 deleted the session/B-r89-105b-oidc-shapin branch May 30, 2026 20:56
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.

1 participant