Skip to content

CI-11: Full-SHA action pinning, least privilege, and hosted-only qualification of CI-control changes #2335

Description

@Chris0Jeky

Wave: Smart CI Fabric (ADR-0066 §Decision 12). Tracker: CI-00 #2324. Lane: supply chain, R4.

Context (live 2026-08-30)

External uses: inventory across .github/workflows/: actions/checkout@v7 (41), actions/upload-artifact@v7 (38), actions/setup-node@v7 (22), actions/setup-dotnet@v6 (22), actions/cache@v6 (5), actions/download-artifact@v8 (4), actions/setup-python@v7 (2), docker/setup-buildx-action@v4, docker/metadata-action@v6, docker/login-action@v4, docker/build-push-action@v7, actions/configure-pages@v6, actions/upload-pages-artifact@v5, actions/deploy-pages@v5, actions/dependency-review-action@v5only gitleaks/gitleaks-action is SHA-pinned. Repository setting sha_pinning_required: false; default workflow token permissions already read; Dependabot groups Actions updates weekly. #1819 (CodeQL default setup disabled 2026-08-19 after hung Analyze checks) is the other scanning residual.

Scope

  • scripts/ci/smart-ci/action-pins.mjs: inventory every external action with its pin status; emits JSON + Markdown; a node --test guard fails when an unpinned external reference appears.
  • Pin every external action to a full commit SHA with a # vX.Y.Z comment; keep Dependabot's grouped Actions updates working with SHA pins.
  • Least privilege: audit every job with elevated permissions; persist-credentials: false on every checkout that does not push; no pull_request_target workflow may check out or execute head code (the Smart CI planner reads the file list only — contract test).
  • CI-control changes (.github/**, ci/**, scripts/ci/**, package bootstrap, release scripts) are R4/T2: hosted-only qualification, never self-hosted (policy fixture).
  • Maintainer setting (human): flip sha_pinning_required on after the migration; recorded in OUTSTANDING_TASKS.md §J.
  • Decide #1819 (re-enable CodeQL under the new hosted-control lane, or record why not).

Acceptance

  • Every external action pinned to a full SHA with a version comment; the guard test is green and runs in the hosted control job.
  • pull_request_target contract test proves no head checkout/execution.
  • R4 fixture proves hosted-only resolution for control paths.
  • Setting flip prepared as an exact command for the maintainer.

Dependencies / release

Depends on CI-02. Milestone v0.3; CI-13 prerequisite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority IIThe active direction's next tranche: wedge capabilities, significant defects, near-term hardening.ciCI/CD pipeline, workflow, and build infrastructure changes.hardeningReliability, safety, operability, and production-readiness improvements.securityAuthentication, authorization, data protection, abuse prevention, and compliance-related changes.

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions