Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/desktop-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
native=false
while IFS= read -r path; do
case "$path" in
src-tauri/*|.cargo/*|rust-toolchain*|deny.toml|package.json|package-lock.json|.github/workflows/desktop-builds.yml)
src-tauri/*|.cargo/*|rust-toolchain*|deny.toml|package.json|package-lock.json|scripts/audit-release.js|.github/workflows/desktop-builds.yml)
native=true
break
;;
Expand Down
16 changes: 12 additions & 4 deletions scripts/audit-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,18 @@ assert.match(
/THIRD_PARTY_SBOM\.spdx\.json.*Pasted_\$\{RELEASE_VERSION\}_source\.spdx\.json/,
'The release must publish the deterministic dependency-graph SBOM',
);
assert.equal(
(releaseWorkflow.match(/anchore\/sbom-action@3ad7283483fc7af8ff2b4ea19663c2d5ca935e26/g) ?? []).length,
3,
'Every release platform must generate an exact-artifact SBOM with the reviewed action revision',
const reviewedSbomActionRevisions = new Set([
'3ad7283483fc7af8ff2b4ea19663c2d5ca935e26', // v0.24.2
'66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c', // v0.24.3
]);
const sbomActionRevisions = [releaseWorkflow, desktopBuildWorkflow].flatMap((workflow) =>
[...workflow.matchAll(/anchore\/sbom-action@([^\s#]+)/g)].map((match) => match[1]),
);
Comment thread
JJJ marked this conversation as resolved.
assert.equal(sbomActionRevisions.length, 5, 'Build and release platforms must generate exact-artifact SBOMs');
assert.equal(new Set(sbomActionRevisions).size, 1, 'Build and release SBOM actions must use one revision');
assert.ok(
reviewedSbomActionRevisions.has(sbomActionRevisions[0]),
'Exact-artifact SBOMs must use a reviewed action revision',
);
assert.match(
desktopBuildWorkflow,
Expand Down
Loading