ci(security): fail the lane when evidence generation fails
ci/woodpecker/push/woodpecker Pipeline was successful
Linux strict security lane (G-C) / strict isolation escape matrix (push) Canceled after 0s
CI / fmt + clippy + test (Linux x86_64) (push) Canceled after 0s
CI / schema instance validation + consumers (push) Canceled after 0s
CI / runtime contract (macos-latest) (push) Canceled after 0s
CI / runtime contract (windows-latest) (push) Canceled after 0s
CI / release evidence manifest (push) Canceled after 0s
CI / release candidate artifact (macos-latest) (push) Canceled after 0s
CI / release candidate artifact (ubuntu-latest) (push) Canceled after 0s

A green lane without a strict-evidence.json must not count as a gate. The EXIT
trap now turns a generator failure into a lane failure. The self-hosted
workflow exports the archive path in the run step (env written by GITHUB_ENV is
not guaranteed in the env expression context), records the pinned image digest
as an input, and verifies schema/outcome/tested_sha/non-root before uploading.
Also define SOURCE_SHA before the VM overlay commands.
This commit is contained in:
cflmy committed 2026-11-21 17:41:23 +08:00
1 parent f01e8a9bb0
commit 512b9f5f1d
3 files changed
+35 -5

No files matched your search

+7 -3
View File
@@ -23,14 +23,18 @@ finish_lane() {
if [ "$status" -eq 0 ]; then
outcome="PASS"
fi
python3 tools/ci/strict-evidence.py \
if ! python3 tools/ci/strict-evidence.py \
--repo "$repo" \
--out "$evidence" \
--outcome "$outcome" \
--started "$started_utc" \
--finished "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--log "${MARQDO_STRICT_LANE_LOG:-}" \
|| echo "warning: could not write strict evidence" >&2
--log "${MARQDO_STRICT_LANE_LOG:-}"; then
echo "error: strict evidence generation failed; a green lane without evidence is not a gate" >&2
if [ "$status" -eq 0 ]; then
status=1
fi
fi
fi
exit "$status"
}