Skip to content

ci: pin GitHub Actions and audit dependencies - #38

Draft
trionnemesis wants to merge 1 commit into
mainfrom
agent/harden-github-actions
Draft

ci: pin GitHub Actions and audit dependencies#38
trionnemesis wants to merge 1 commit into
mainfrom
agent/harden-github-actions

Conversation

@trionnemesis

Copy link
Copy Markdown
Owner

Summary

  • pin every external GitHub Action in all four workflows to an immutable 40-character commit SHA
  • retain exact release comments beside each pin so updates remain reviewable
  • add a blocking dependency-audit job that audits AgentSec's project metadata with pip-audit
  • add regression tests that parse every workflow and enforce the reviewed action allowlist, SHA pins, and release comments

Why

This completes the remaining supply-chain hardening work in item 3 of #1. AgentSec is a security tool, so its own CI should not execute mutable action tags and should fail when a known Python dependency vulnerability is introduced.

Reviewed pins

Action Release Commit
actions/checkout v4.4.0 11d5960a326750d5838078e36cf38b85af677262
actions/setup-python v5.6.0 a26af69be951a213d495a4c3e4e4022e16d87065
actions/upload-artifact v4.6.2 ea165f8d65b6e75b540449e92b4886f43607fa02
actions/configure-pages v5.0.0 983d7736d9b0ae728b81ab479565c72886d7745b
actions/upload-pages-artifact v3.0.1 56afc609e74202658d3ffba0e8f6dda462b719fa
actions/deploy-pages v4.0.5 d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
pypa/gh-action-pip-audit v1.1.0 1220774d901786e6f652ae159f7b6bc8fea6d266

Security boundaries

  • pip-audit receives inputs: ., so it resolves the checked-out project's runtime metadata rather than auditing unrelated packages preinstalled on the runner.
  • vulnerabilities fail the job; no allow-failure or blanket ignore is configured
  • no repository write permissions or secrets are added
  • the optional OpenSSF Scorecard integration remains a follow-up because it requires a separate decision about additional permissions and result publication

Validation

  • make check
  • pytest -q --cov=agentsec --cov-report=term-missing — 80.44% coverage (72% required)
  • pytest -q tests/test_workflows.py
  • pip-audit . — no known vulnerabilities found
  • remote branch tree matches the locally validated tree exactly

Refs #1

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