diff --git a/.github/workflows/benchmark-calibration.yml b/.github/workflows/benchmark-calibration.yml index b943856..ef358bb 100644 --- a/.github/workflows/benchmark-calibration.yml +++ b/.github/workflows/benchmark-calibration.yml @@ -158,7 +158,6 @@ jobs: gh attestation verify "${RUNNER_TEMP}/prepared/${subject}" \ --bundle "${RUNNER_TEMP}/prepared/prepared.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/benchmark-calibration.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -272,7 +271,6 @@ jobs: gh attestation verify "${RUNNER_TEMP}/prepared/${subject}" \ --bundle "${RUNNER_TEMP}/prepared/prepared.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/benchmark-calibration.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -304,7 +302,6 @@ jobs: gh attestation verify "$destination/reservation.receipt.json" \ --bundle "$destination/reservation.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/benchmark-calibration.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -331,7 +328,6 @@ jobs: gh attestation verify "$destination/${subject}" \ --bundle "$destination/result.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/benchmark-calibration.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a84d3b3..31812c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,7 +92,6 @@ jobs: gh attestation verify bench/baseline.json \ --bundle bench/baseline.attestation.json \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/benchmark-calibration.yml \ --signer-digest "$source_sha" \ --source-digest "$source_sha" \ @@ -283,7 +282,6 @@ jobs: gh attestation verify "${RUNNER_TEMP}/bench-live-cohort.json" \ --bundle "${RUNNER_TEMP}/bench-live-cohort.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/release.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -446,7 +444,6 @@ jobs: gh attestation verify "${RUNNER_TEMP}/bench-live-cohort.json" \ --bundle "${RUNNER_TEMP}/bench-live-cohort.attestation.json" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/release.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -469,7 +466,6 @@ jobs: gh attestation verify "$reservation" \ --bundle "$reservation_bundle" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/release.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ @@ -496,7 +492,6 @@ jobs: gh attestation verify "$subject" \ --bundle "$bundle" \ --repo postil-dev/postil-cli \ - --signer-repo postil-dev/postil-cli \ --signer-workflow postil-dev/postil-cli/.github/workflows/release.yml \ --signer-digest "${GITHUB_SHA}" \ --source-digest "${GITHUB_SHA}" \ diff --git a/bench/baseline.json b/bench/baseline.json index 19d8558..7178f26 100644 --- a/bench/baseline.json +++ b/bench/baseline.json @@ -2,7 +2,7 @@ "schemaVersion": 2, "corpus": { "fixtureCorpusSha256": "8e4c2cb9ad5a7efdfe6a875566d20133e905155b6f693a873595adf6c069e065", - "evaluatorSha256": "ca71c7172e61cb2fd5c11037117ae8003b5e3b18ab9ff2cea55943438f1ba75e" + "evaluatorSha256": "00b424fcc4fb13a1c4bd4010ef79a992d0692d59ceb70eae0669ea9823e6645e" }, "profiles": { "z-ai/glm-5.2": { diff --git a/bench/src/livemodels.test.ts b/bench/src/livemodels.test.ts index 9f2bca6..aa90fcc 100644 --- a/bench/src/livemodels.test.ts +++ b/bench/src/livemodels.test.ts @@ -1535,6 +1535,22 @@ describe("managed admission workflow", () => { workflowName, unlabelled: actionReferences.filter((match) => (match[2] ?? "").length === 0), }).toEqual({ workflowName, unlabelled: [] }); + const lines = source.split("\n"); + const attestationCommands: string[] = []; + for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) { + if (!/^[ \t]*gh attestation verify\b/u.test(lines[lineIndex] ?? "")) continue; + const commandLines = [lines[lineIndex] ?? ""]; + while (commandLines.at(-1)?.trimEnd().endsWith("\\")) { + lineIndex += 1; + commandLines.push(lines[lineIndex] ?? ""); + } + attestationCommands.push(commandLines.join("\n")); + } + expect({ + workflowName, + incompatibleSignerFlags: attestationCommands.filter((command) => + command.includes("--signer-repo") && command.includes("--signer-workflow")), + }).toEqual({ workflowName, incompatibleSignerFlags: [] }); } expect(checkedReferences).toBeGreaterThan(0); }); diff --git a/bench/src/verify-admission.test.ts b/bench/src/verify-admission.test.ts index 00018ff..66f4da8 100644 --- a/bench/src/verify-admission.test.ts +++ b/bench/src/verify-admission.test.ts @@ -269,6 +269,7 @@ describe("admission attestation verification", () => { nowUnixSeconds: issued + 60, })).toBe("verified"); expect(actualArguments).toEqual(attestationVerificationArguments(manifest, bundle, sourceSha)); + expect(actualArguments).not.toContain("--signer-repo"); expect(actualArguments).toContain("postil-dev/postil-cli/.github/workflows/bench-live.yml"); expect(actualArguments.filter((argument) => argument === sourceSha)).toHaveLength(2); expect(actualArguments).toContain("https://token.actions.githubusercontent.com"); diff --git a/bench/src/verify-admission.ts b/bench/src/verify-admission.ts index 74e66fe..dd264a1 100644 --- a/bench/src/verify-admission.ts +++ b/bench/src/verify-admission.ts @@ -92,8 +92,6 @@ export function attestationVerificationArguments( bundlePath, "--repo", REPOSITORY, - "--signer-repo", - REPOSITORY, "--signer-workflow", SIGNER_WORKFLOW, "--signer-digest",