From e06ad8dc9e773918fc7dd4f51b222307eb059e30 Mon Sep 17 00:00:00 2001 From: Efra Espada Date: Wed, 18 Nov 2026 21:05:12 +0100 Subject: [PATCH] Lock all installed workflow action steps behind released references --- .github/workflows/actions.lock | 65 ++++++++++++++++++++++++++++++++++ docs/storybook.md | 7 ++-- tests/architecture.test.mjs | 21 +++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index d64a1a6..f6026fe 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -3,19 +3,64 @@ # Docs: https://gh.io/actions-lockfile version: 'v0.0.3' workflows: + '.github/workflows/agent-cli-provisioning.yml': + - 'actions/checkout@v5.1.0' '.github/workflows/ci_check.yml': - 'actions/checkout@v7.0.1' - 'actions/setup-node@v7.1.0' - 'actions/upload-artifact@v7.0.2' + '.github/workflows/copilot_branch_sync.yml': + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_close_inactive_issues.yml': + - 'actions/checkout@v5.1.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_commit.yml': + - 'actions/checkout@v5.1.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_credential_health.yml': [] + '.github/workflows/copilot_deployment_orchestration.yml': + - 'actions/checkout@v5.1.0' + - 'actions/github-script@v9.0.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_issue.yml': + - 'actions/checkout@v5.1.0' + - 'actions/upload-artifact@v5.0.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_issue_comment.yml': [] + '.github/workflows/copilot_pull_request.yml': + - 'actions/checkout@v5.1.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_pull_request_approval.yml': + - 'vypdev/copilot@v3.10.13' + '.github/workflows/copilot_pull_request_comment.yml': [] + '.github/workflows/copilot_pull_request_merge_queue.yml': [] + '.github/workflows/copilot_pull_request_review_state.yml': + - 'actions/checkout@v5.1.0' + - 'vypdev/copilot@v3.10.13' + '.github/workflows/hotfix_workflow.yml': + - 'actions/checkout@v5.1.0' + - 'actions/github-script@v9.0.0' + - 'endbug/add-and-commit@v9.1.4' + - 'vypdev/copilot@v3.10.13' '.github/workflows/npm_release.yml': - 'actions/checkout@v7.0.1' - 'actions/download-artifact@v8.0.2' - 'actions/setup-node@v7.1.0' + '.github/workflows/release_workflow.yml': + - 'actions/checkout@v5.1.0' + - 'actions/github-script@v9.0.0' + - 'endbug/add-and-commit@v9.1.4' + - 'vypdev/copilot@v3.10.13' '.github/workflows/storybook_pages.yml': - 'actions/checkout@v7.0.1' - 'actions/deploy-pages@v4.0.5' - 'actions/upload-artifact@v4.6.2' dependencies: + 'actions/checkout@v5.1.0': + ref: 'v5.1.0' + commit: 'sha1-fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09' + owner_id: 44036562 + repo_id: 197814629 'actions/checkout@v7.0.1': ref: 'v7.0.1' commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' @@ -31,6 +76,11 @@ dependencies: commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333' owner_id: 44036562 repo_id: 192626254 + 'actions/github-script@v9.0.0': + ref: 'v9.0.0' + commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3' + owner_id: 44036562 + repo_id: 205262760 'actions/setup-node@v7.1.0': ref: 'v7.1.0' commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1' @@ -41,8 +91,23 @@ dependencies: commit: 'sha1-ea165f8d65b6e75b540449e92b4886f43607fa02' owner_id: 44036562 repo_id: 192625955 + 'actions/upload-artifact@v5.0.0': + ref: 'v5.0.0' + commit: 'sha1-330a01c490aca151604b8cf639adc76d48f6c5d4' + owner_id: 44036562 + repo_id: 192625955 'actions/upload-artifact@v7.0.2': ref: 'v7.0.2' commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9' owner_id: 44036562 repo_id: 192625955 + 'endbug/add-and-commit@v9.1.4': + ref: 'v9.1.4' + commit: 'sha1-a94899bca583c204427a224a7af87c02f9b325d5' + owner_id: 26386270 + repo_id: 209101661 + 'vypdev/copilot@v3.10.13': + ref: 'v3.10.13' + commit: 'sha1-ace49e4a7ce0f6a007fef5d11479eb9b7a5846e3' + owner_id: 63705403 + repo_id: 891781467 diff --git a/docs/storybook.md b/docs/storybook.md index 5397596..3418dc3 100644 --- a/docs/storybook.md +++ b/docs/storybook.md @@ -96,8 +96,11 @@ Only its deployment job receives Pages write and OIDC permission. The self-hosted pool runs reviewed internal branches. Every installed workflow references complete action release versions, including the Copilot consumer snapshots and reusable workflow references. The architecture checks cover every file. -The CI, Pages and npm action commits are recorded in `.github/workflows/actions.lock`. Regenerate it with -`gh actions-lock` and the changed workflow paths when updating action versions. +Installed action-step resolutions are recorded in `.github/workflows/actions.lock`. Regenerate it with +`gh actions-lock` after changing an action reference and run `gh actions-lock --verify` to check coverage +and provenance. GitHub enforces the recorded commits for onboarded workflows. Job-level reusable +workflow calls retain their reviewed complete release tags and follow GitHub's separate reusable-workflow +resolution, which the caller lockfile currently excludes. CI and the Pages build use Apple Silicon runners in the organization's `vypdev` group. Each runs the Linux build in a job-specific Docker container and keeps the runner's Docker credentials outside the container. The Pages deployment job uses diff --git a/tests/architecture.test.mjs b/tests/architecture.test.mjs index 608fed6..046db02 100644 --- a/tests/architecture.test.mjs +++ b/tests/architecture.test.mjs @@ -229,6 +229,27 @@ test('every installed workflow names complete external action releases', () => { } }); +test('installed workflow action steps have reviewed lockfile resolutions', () => { + const lock = parse(readFileSync('.github/workflows/actions.lock', 'utf8')); + for (const path of globSync('.github/workflows/*.{yml,yaml}')) { + const workflow = parse(readFileSync(path, 'utf8')); + const references = Object.values(workflow.jobs) + .flatMap(job => job.steps ?? []) + .map(step => step.uses) + .filter(reference => reference && !reference.startsWith('./')); + const lockedReferences = [...new Set(references.map(reference => { + const [action, version] = reference.split('@'); + const repository = action.split('/').slice(0, 2).join('/').toLowerCase(); + return `${repository}@${version}`; + }))].sort(); + expect(Object.hasOwn(lock.workflows, path), path).toBe(true); + expect([...lock.workflows[path]].sort(), path).toEqual(lockedReferences); + for (const reference of lockedReferences) { + expect(lock.dependencies[reference].commit, reference).toMatch(/^sha1-[a-f0-9]{40}$/u); + } + } +}); + test('installed workflow jobs use the organization pool with OIDC publishing on GitHub', () => { for (const path of globSync('.github/workflows/*.{yml,yaml}')) { const workflow = parse(readFileSync(path, 'utf8'));