Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: harden fail-fast workflow token handling (#5519)
[._.]/ Adam Eivyfe4d4d7892aa
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 5ff90ac507..a20b2fd40d 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -118,6 +118,7 @@ jobs:steps:- uses: actions/checkout@v7with:+ persist-credentials: false# See the impact job: depth 2 is the whole PR merge ref, which is all# the planner needs to identify changed sources.fetch-depth: 2@@ -271,6 +272,7 @@ jobs:steps:- uses: actions/checkout@v7with:+ persist-credentials: false# See the impact job: depth 2 is the whole PR merge ref, which is all# the planner needs to identify changed sources.fetch-depth: 2@@ -353,6 +355,8 @@ jobs:PGPASSWORD: portossteps:- uses: actions/checkout@v7+ with:+ persist-credentials: false- name: Use Node.js 24.xuses: actions/setup-node@v7@@ -476,6 +480,7 @@ jobs:steps:- uses: actions/checkout@v7with:+ persist-credentials: false# See the impact job: depth 2 is the whole PR merge ref, which is all# the planner needs to identify changed sources.fetch-depth: 2diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex a9fa69a49b..9c34521f9b 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -50,6 +50,9 @@ jobs:full-ci:needs: verify-ciif: needs.verify-ci.outputs.verified != 'true'+ permissions:+ contents: read+ actions: writeuses: ./.github/workflows/ci.ymlwith:full: truediff --git a/scripts/ci-fail-fast.test.js b/scripts/ci-fail-fast.test.jsindex ed580e8ec4..56058a692a 100644--- a/scripts/ci-fail-fast.test.js+++ b/scripts/ci-fail-fast.test.js@@ -65,4 +65,20 @@ describe('ci.yml fail-fast cancellation contract', () => {expect(body, id).toContain('if: failure()');}});++ it('does not persist the elevated checkout token into leaf job steps', () => {+ for (const id of LEAF_JOBS) {+ const body = jobs[id];+ const checkoutStart = body.indexOf(' - uses: actions/checkout@v7');+ const nextStep = body.indexOf('\n - ', checkoutStart + 1);+ const checkout = body.slice(checkoutStart, nextStep === -1 ? undefined : nextStep);+ expect(checkout, id).toContain('persist-credentials: false');+ }+ });++ it('grants the reusable release caller the permission leaf jobs require', () => {+ const releaseWorkflow = readFileSync(join(REPO_ROOT, '.github/workflows/release.yml'), 'utf8');+ const fullCi = releaseWorkflow.slice(releaseWorkflow.indexOf('\n full-ci:'));+ expect(fullCi).toMatch(/\n permissions:\n contents: read\n actions: write\n/);+ });});