Skip to content

[ACP-HARDEN-260] GitHub Actions supply-chain policyをfull-SHA基準で強化する #3664

Description

@ootakazuhiko

Parent: #3655
Depends on: —
Blocks: #3640
Codex lane: ci/actions-supply-chain-hardening

背景

現行workflow/composite actionにはactions/checkout@v4actions/setup-node@v4等のmoving tag参照が残る。Private Matchでは、第三者Actionのfull commit SHA、release tag comment、persist-credentials: false、minimum permissions、bounded timeout、untrusted PR laneのnetwork/write制約を標準化した。

Assurance Control Plane自身のCI supply chainは、consumerへ要求する水準以上に監査可能である必要がある。

目的

repository-wideのActions supply-chain policy、validator、migrationを追加し、workflowとcomposite actionをfail closedで検査する。

Codex CLI preflight

  • all .github/workflows/*.yml
  • .github/actions/**/action.yml
  • reusable workflows
  • CI policy/automation permission docs
  • Dependabot/release update policy
  • branch protection required checks
  • Context Pack/Boundary Map

Policy requirements

最低限:

  • third-party uses:は40桁full commit SHAへpinする。
  • pin行へhuman-readable release tag commentを付ける。
  • actions/checkoutは原則persist-credentials: false
  • workflow/job permissionsを明示し、最小権限にする。
  • jobへbounded timeout-minutesを要求する。
  • untrusted pull_request laneでwrite token、secret、artifact publication、外部networkを使用しない。
  • pull_request_targetは別policyで厳格に制限し、untrusted head checkoutとの組合せを禁止する。
  • local composite/reusable actionを再帰的に検査する。
  • moving tag updateはreview済みbot/human PR経由に限定する。

実装タスク

  • workflow/composite/reusable action inventoryを生成する。
  • scripts/ci/check-actions-supply-chain.mjs等のoffline validatorを追加する。
  • full SHA、tag comment、checkout credential、permissions、timeout、event trust boundaryを検査する。
  • YAML anchor/expression/local action/nested compositeを正しく扱う。
  • violationにstable code、file、job、stepを付ける。
  • current workflowsをrisk単位の小さなcommitで移行する。
  • SHAとtagの対応をtrusted update時に検証する手順をdocsへ追加する。通常PR validatorはnetwork不要とする。
  • Dependabot/Renovateまたは手動update runbookでpin更新方法を定義する。
  • fork PR、pull_request_target、workflow_run、issue_comment、workflow_dispatchのthreat matrixを追加する。
  • verify-lite/required gateへvalidatorを組み込む。

Acceptance criteria

  • third-party moving tagが0件、または明示的reviewed exception contractがある。
  • actions/checkoutのcredential persistenceが全trusted/untrusted laneで明示される。
  • permissionsとtimeout欠落を検出する。
  • nested composite action内のfloating refを検出する。
  • untrusted PR + write permission/secret/pull_request_target unsafe checkoutを検出する。
  • valid workflow fixtureはpassし、各violation fixtureはstable codeでfailする。
  • existing required check名を不用意に変更しない。

Validation

  • actionlint
  • validator positive/negative fixtures
  • all workflow/composite scan
  • required check compatibility audit
  • pnpm -s run check:doc-consistency
  • pnpm -s run verify:lite
  • representative workflow exact-head CI

非目標

  • cloud provider選定
  • OIDC federationの全面実装
  • GitHub organization policyの自動変更
  • Marketplace publication

Stop condition

  • Draft PR
  • no required-check name drift unless explicitly approved
  • exact-head CI success
  • unresolved review threads 0
  • worktree clean

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

    area:contractsSchemas and contractsassurance-control-planeAgent-neutral assurance control plane roadmapcodex-readyIssue body is structured for Codex CLI executionpriority:p1Important next slicerisk:highHigh risk PR (approval and gate labels required)type:taskImplementation task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions