feat: introduce PR mode for attestations
What
Introduces a "PR mode" for attestations that captures and propagates the pull/merge request signal as a top-level annotation on the attestation.
Changes
-
--prflag onchainloop attestation init: explicitly marks the attestation as a PR/MR build. Auto-detected from the CI runner environment (GitHub ActionsGITHUB_EVENT_NAME=pull_request, GitLabCI_PIPELINE_SOURCE=merge_request_event) when not set.--pr=falseforces it off. -
chainloop.dev/is-pull-request=trueannotation: set on the attestation when in PR mode, so downstream consumers (e.g. findings processing) can detect PR-originated attestations and skip reprocessing. -
Skip latest promotion: when in PR mode,
mark-latestdefaults tofalse(replacing the manual--mark-latest=falseworkaround). An explicitly passed--mark-latest=truestill wins. -
Push annotation preservation: the push path now preserves existing attestation-level annotations (like the PR marker) alongside contract and runtime annotations, instead of overwriting them.
Fixes #3265
Assisted-by: Claude Code
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri