Skip to content

test: guard workflow OIDC grants and remove unused SBOM permission - #250

Merged
imran-siddique merged 1 commit into
agentrust-io:mainfrom
dinakarjs:test/workflow-oidc-drift
Oct 14, 2026
Merged

imran-siddique merged 1 commit into
agentrust-io:mainfrom
dinakarjs:test/workflow-oidc-drift

Conversation

@dinakarjs

Copy link
Copy Markdown
Contributor

A workflow added outside the release path could gain OIDC authority without existing release/parity tests noticing. Extend test_release_artifacts.py to scan every .yml/.yaml workflow and require exactly four approved job grants: ci.yml/test for Codecov (the sole test-job exception), release.yml/publish, docker.yml/build-and-push and scorecard.yml/scorecard.

Reject workflow-wide OIDC, inherited grants, job/workflow write-all, unexpected jobs/files, SBOM reintroduction and removal of an approved allowance. Temporary-copy controls cover each drift mode and accept read-only inheritance. Existing credential-free release validation and publication dependency checks remain intact.

Remove id-token: write from sbom.yml: the pinned anchore/sbom-action uses github-token and this unsigned SBOM job does not need OIDC. Other SBOM permissions are retained as declared.

Approved cA2A port under agentrust-io/.github#54 (comment), following cMCP #754. Separate repository PR, review owner Imran.

Validation on Python 3.12.14: fresh virtual environment installed requirements/dev.txt with --require-hashes and the local editable package without dependencies. Full unit/conformance: 828 passed, 2 skipped; all 23 release-artifact checks passed. Repository Ruff and format checks pass (106 files); mypy passes 47 source files; Bandit and git diff --check pass. Proxy variables were cleared for full tests. No workflow dispatched, registry publication, credential or live settings changes.

Source regression guard only; live environment protections, registry bindings and operator coverage remain separate evidence.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 14, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor Author

Hosted validation at 3b39cac is complete: all six Python 3.11–3.13 Linux/Windows test jobs and governance passed. Benchmark was skipped. Workflow lint, CodeQL, contributor and vouch checks passed. The only remaining failed check is the expected maintainer-approval gate. Ready for review under the approved #54 port scope.

@imran-siddique imran-siddique left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same port as cmcp#754, implementing the .github#54 ruling: four named allowances with ci.yml/test as the only test-job exception, and id-token removed from sbom.yml. Verified locally: 23 of 23 pass; restoring the SBOM grant fails 11, and adding id-token: write to the governance job fails 12.

@imran-siddique
imran-siddique merged commit a6afb0c into agentrust-io:main Oct 14, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants