Repository navigation
fix(rekor-monitor): separate infra noise from security alerts - #1897
Conversation
The hourly Rekor v2 monitor paged maintainers with an "OIDC/key compromise" alert on any failure, including transient Sigstore/TUF/ GitHub-API outages. Separately, a legitimate release tripped the same identity alarm and wedged the monitor (findings never advance the checkpoint), causing hourly Slack pages until manual intervention. Classify the tool's terminal error as tamper (proof.RootMismatchError), identity (ErrCodeConflict), or operational (everything else); exit 0/1/2/3 and print a CLASSIFICATION line. Retry operational failures only. The workflow now pages (security issue + Slack + maintainer mention) only for tamper/identity, opens a calm area/ci "degraded" issue after three consecutive operational (or pre-monitor) failures, and closes both on a clean run. The job still goes red on any failure. Correlate identity matches against known release tags: the workflow fetches the repo's tags and passes them via --known-tags-file, and the tool suppresses matches whose @refs/tags/<tag> is a known release. An unknown tag, a malformed SAN, an empty allowlist, or a missing allowlist file all still surface a finding (fail closed). Harden the GitHub-API fetches (checkpoint artifact and tags) with a temp-file retry that recovers 5xx and preserves the binary zip. Fixes #1887 Related #1813 Signed-off-by: Brian Lockwood <[email protected]>
📝 WalkthroughWalkthroughThe Rekor monitor now loads known release tags, suppresses matching identity findings, classifies outcomes, and retries operational failures. The workflow uses classifications to page on tamper or identity findings, create degraded issues after persistent operational failures, and close both issue types after a clean run. API retrieval is paginated and retried. Tests cover filtering, classification, retries, flag parsing, and tag-file validation. Documentation describes the updated behavior. Estimated code review effort: 4 (Complex) | ~60 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/rekor-monitor.yaml:
- Around line 156-170: Extract the duplicated gh_api_retry helper used by the
checkpoint-fetch and known-tags-fetch steps into a checked-in script under
.github/workflows/scripts, then source that script from both steps. Remove the
inline copies while preserving the existing retry, backoff, temporary-file,
warning, and error behavior so both call sites use the same implementation.
In `@tools/rekor-monitor/README.md`:
- Around line 81-82: Update the --known-tags-file description in the README
options table to state that omitting the option or providing a
missing/unreadable file is a hard operational error, while an existing empty
file disables suppression and allows all matches to alert.
- Around line 84-96: Clarify that the final CLASSIFICATION line is emitted only
for normal monitor outcomes, not invalid-argument parse or load failures where
realMain returns 2. Update the exit-status introduction and classification table
in tools/rekor-monitor/README.md at lines 4-6 and 84-96, and the corresponding
documentation in tools/rekor-monitor/doc.go at lines 50-55; preserve the
existing classifications and exit codes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: ff81fd79-69dd-45d9-8453-ebc6a99e68a6
📒 Files selected for processing (9)
.github/workflows/rekor-monitor.yamldocs/contributor/maintaining.mdtools/rekor-monitor/README.mdtools/rekor-monitor/doc.gotools/rekor-monitor/main.gotools/rekor-monitor/main_test.gotools/rekor-monitor/monitor.gotools/rekor-monitor/monitor_test.gotools/rekor-monitor/observe_test.go
| gh_api_retry() { # usage: gh_api_retry OUTFILE api-args... | ||
| local out="$1"; shift | ||
| local attempt | ||
| for attempt in 1 2 3; do | ||
| if gh api "$@" > "${out}.part"; then | ||
| mv "${out}.part" "${out}" | ||
| return 0 | ||
| fi | ||
| echo "::warning::gh api failed (attempt ${attempt}/3): $*" | ||
| sleep $(( attempt * 3 )) | ||
| done | ||
| rm -f "${out}.part" | ||
| echo "::error::gh api failed after 3 attempts: $*" | ||
| return 1 | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Deduplicate the gh_api_retry helper. The function is copied byte-for-byte into the checkpoint-fetch and known-tags-fetch steps. Since this retry/backoff logic guards the flaky GitHub-API paths this PR is hardening, keeping two copies risks silent drift where one fetch loses a fix the other gained. Consider extracting it to a checked-in script sourced by both steps (e.g. source ./.github/workflows/scripts/gh_api_retry.sh) so both call sites stay identical.
Also applies to: 190-204
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/rekor-monitor.yaml around lines 156 - 170, Extract the
duplicated gh_api_retry helper used by the checkpoint-fetch and known-tags-fetch
steps into a checked-in script under .github/workflows/scripts, then source that
script from both steps. Remove the inline copies while preserving the existing
retry, backoff, temporary-file, warning, and error behavior so both call sites
use the same implementation.
| | `--known-tags-file` | Optional file of newline-separated known release tags. Identity matches whose `@refs/tags/<tag>` is listed are suppressed as expected releases; empty/omitted disables suppression (all matches alert). | | ||
| | `--user-agent` | User-Agent for requests to the log. | |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Document missing allowlists as hard errors.
docs/contributor/maintaining.md states that a missing --known-tags-file is a hard operational error, but this table says “omitted disables suppression.” Update the README to distinguish omitted/missing files from empty files so operators do not expect an alerting run when the monitor actually fails closed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tools/rekor-monitor/README.md` around lines 81 - 82, Update the
--known-tags-file description in the README options table to state that omitting
the option or providing a missing/unreadable file is a hard operational error,
while an existing empty file disables suppression and allows all matches to
alert.
| ## Exit status and classification | ||
|
|
||
| The process prints a final `CLASSIFICATION=<value>` line to stdout and exits: | ||
|
|
||
| | Exit | Classification | Meaning | | ||
| |------|----------------|---------| | ||
| | `0` | `clean` | Consistency verified and no unexpected identity entry; the cursor advanced. | | ||
| | `1` | `tamper` | The consistency (Merkle) proof failed: the log did not verify as append-only. | | ||
| | `1` | `identity` | An entry under the release identity for a tag with no corresponding release (or an entry that failed verification). | | ||
| | `3` | `operational` | Could not complete the check (Sigstore/Rekor/TUF/network trouble, or a timeout). Operational errors are retried a few times before this is returned. | | ||
| | `2` | (none) | Invalid arguments. | | ||
|
|
||
| Only `tamper` and `identity` are security signals; the calling workflow pages maintainers on those and treats `operational` as infrastructure noise. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== files ==\n'
git ls-files tools/rekor-monitor/README.md tools/rekor-monitor/doc.go tools/rekor-monitor
printf '\n== README excerpt ==\n'
sed -n '1,130p' tools/rekor-monitor/README.md
printf '\n== doc.go excerpt ==\n'
sed -n '1,120p' tools/rekor-monitor/doc.go
printf '\n== search for CLASSIFICATION / invalid args ==\n'
rg -n "CLASSIFICATION=|invalid arguments|exit 2|exit code|classification" tools/rekor-monitor -SRepository: NVIDIA/aicr
Length of output: 12611
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Focus on the implementation paths that decide whether classification is printed.
rg -n "func main|realMain|flag\.|os\.Exit|CLASSIFICATION|invalid|Usage|Parse" tools/rekor-monitor -SRepository: NVIDIA/aicr
Length of output: 2863
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the most likely source file for invalid-argument handling.
fd -a -t f 'rekor-monitor' tools/rekor-monitorRepository: NVIDIA/aicr
Length of output: 149
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,220p' tools/rekor-monitor/main.goRepository: NVIDIA/aicr
Length of output: 9734
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '220,310p' tools/rekor-monitor/main.goRepository: NVIDIA/aicr
Length of output: 3710
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,120p' tools/rekor-monitor/main.goRepository: NVIDIA/aicr
Length of output: 5909
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cat -n tools/rekor-monitor/main.go | sed -n '240,290p'Repository: NVIDIA/aicr
Length of output: 2283
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '250,285p' tools/rekor-monitor/main.goRepository: NVIDIA/aicr
Length of output: 1367
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cat -n tools/rekor-monitor/main_test.go | sed -n '70,95p'Repository: NVIDIA/aicr
Length of output: 1024
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '== main.go around realMain ==\n'
sed -n '250,285p' tools/rekor-monitor/main.go
printf '\n== main_test invalid-args coverage ==\n'
cat -n tools/rekor-monitor/main_test.go | sed -n '70,95p'Repository: NVIDIA/aicr
Length of output: 2311
Clarify the CLASSIFICATION= exception for invalid arguments.
realMain returns 2 for parse/load failures before writing any classification, so the README intro and doc.go should say the line is emitted only for normal monitor outcomes, not every invocation.
tools/rekor-monitor/README.md#L4-L6tools/rekor-monitor/doc.go#L50-L55
📍 Affects 2 files
tools/rekor-monitor/README.md#L84-L96(this comment)tools/rekor-monitor/README.md#L4-L6tools/rekor-monitor/doc.go#L50-L55
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tools/rekor-monitor/README.md` around lines 84 - 96, Clarify that the final
CLASSIFICATION line is emitted only for normal monitor outcomes, not
invalid-argument parse or load failures where realMain returns 2. Update the
exit-status introduction and classification table in
tools/rekor-monitor/README.md at lines 4-6 and 84-96, and the corresponding
documentation in tools/rekor-monitor/doc.go at lines 50-55; preserve the
existing classifications and exit codes.
Coverage Report ✅
Coverage BadgeMerging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
The first scheduled run after #1897 hit the 15-minute per-pass timeout in the identity scan: the checkpoint had been wedged for hours, so the scan window had grown to roughly 380k entries. The tool classified the timeout as operational (correct: no security page, a calm degraded issue), but a window that large cannot finish inside 15m, so the cursor never advances and the monitor cannot catch up. Raise the per-pass timeout (defaultTimeout) from 15m to 45m and the job backstop (timeout-minutes) from 20m to 50m so a single pass can scan a large backlog (a multi-hour Sigstore/TUF outage, or an untriaged finding that deliberately holds the cursor) and advance, after which the hourly windows return to a few minutes. This doubles as a durable resilience buffer against future large-window conditions. Also fold in the post-merge CodeRabbit review nits from #1897: - Extract the duplicated gh_api_retry helper into .github/scripts/gh-api-retry.sh, invoked by both fetch steps, so the two copies cannot drift. - Clarify in the tool README and doc.go that a set-but-missing --known-tags-file is a hard error (exit 2), distinct from an empty file (disables suppression), and that the CLASSIFICATION line is printed for a completed run (exit 0/1/3) but not the exit-2 argument-error path. Follow-up to #1897. Related #1898 Related #1899 Signed-off-by: Brian Lockwood <[email protected]>
The first scheduled run after #1897 hit the 15-minute per-pass timeout in the identity scan: the checkpoint had been wedged for hours, so the scan window had grown to roughly 380k entries. The tool classified the timeout as operational (correct: no security page, a calm degraded issue), but a window that large cannot finish inside 15m, so the cursor never advances and the monitor cannot catch up. Raise the per-pass timeout (defaultTimeout) from 15m to 45m and the job backstop (timeout-minutes) from 20m to 50m so a single pass can scan a large backlog (a multi-hour Sigstore/TUF outage, or an untriaged finding that deliberately holds the cursor) and advance, after which the hourly windows return to a few minutes. This doubles as a durable resilience buffer against future large-window conditions. Also fold in the post-merge CodeRabbit review nits from #1897: - Extract the duplicated gh_api_retry helper into .github/scripts/gh-api-retry.sh, invoked by both fetch steps, so the two copies cannot drift. - Clarify in the tool README and doc.go that a set-but-missing --known-tags-file is a hard error (exit 2), distinct from an empty file (disables suppression), and that the CLASSIFICATION line is printed for a completed run (exit 0/1/3) but not the exit-2 argument-error path. Follow-up to #1897. Related #1898 Related #1899 Signed-off-by: Brian Lockwood <[email protected]>
The first scheduled run after #1897 hit the 15-minute per-pass timeout in the identity scan: the checkpoint had been wedged for hours, so the scan window had grown to roughly 380k entries. The tool classified the timeout as operational (correct: no security page, a calm degraded issue), but a window that large cannot finish inside 15m, so the cursor never advances and the monitor cannot catch up. Raise the per-pass timeout (defaultTimeout) from 15m to 45m and the job backstop (timeout-minutes) from 20m to 50m so a single pass can scan a large backlog (a multi-hour Sigstore/TUF outage, or an untriaged finding that deliberately holds the cursor) and advance, after which the hourly windows return to a few minutes. This doubles as a durable resilience buffer against future large-window conditions. Also fold in the post-merge CodeRabbit review nits from #1897: - Extract the duplicated gh_api_retry helper into .github/scripts/gh-api-retry.sh, invoked by both fetch steps, so the two copies cannot drift. - Clarify in the tool README and doc.go that a set-but-missing --known-tags-file is a hard error (exit 2), distinct from an empty file (disables suppression), and that the CLASSIFICATION line is printed for a completed run (exit 0/1/3) but not the exit-2 argument-error path. Follow-up to #1897. Related #1898 Related #1899 Signed-off-by: Brian Lockwood <[email protected]>
The first scheduled run after #1897 hit the 15-minute per-pass timeout in the identity scan: the checkpoint had been wedged for hours, so the scan window had grown to roughly 380k entries. The tool classified the timeout as operational (correct: no security page, a calm degraded issue), but a window that large cannot finish inside 15m, so the cursor never advances and the monitor cannot catch up. Raise the per-pass timeout (defaultTimeout) from 15m to 45m and the job backstop (timeout-minutes) from 20m to 50m so a single pass can scan a large backlog (a multi-hour Sigstore/TUF outage, or an untriaged finding that deliberately holds the cursor) and advance, after which the hourly windows return to a few minutes. This doubles as a durable resilience buffer against future large-window conditions. Also fold in the post-merge CodeRabbit review nits from #1897: - Extract the duplicated gh_api_retry helper into .github/scripts/gh-api-retry.sh, invoked by both fetch steps, so the two copies cannot drift. - Clarify in the tool README and doc.go that a set-but-missing --known-tags-file is a hard error (exit 2), distinct from an empty file (disables suppression), and that the CLASSIFICATION line is printed for a completed run (exit 0/1/3) but not the exit-2 argument-error path. Follow-up to #1897. Related #1898 Related #1899 Signed-off-by: Brian Lockwood <[email protected]>
The first scheduled run after #1897 hit the 15-minute per-pass timeout in the identity scan: the checkpoint had been wedged for hours, so the scan window had grown to roughly 380k entries. The tool classified the timeout as operational (correct: no security page, a calm degraded issue), but a window that large cannot finish inside 15m, so the cursor never advances and the monitor cannot catch up. Raise the per-pass timeout (defaultTimeout) from 15m to 45m and the job backstop (timeout-minutes) from 20m to 50m so a single pass can scan a large backlog (a multi-hour Sigstore/TUF outage, or an untriaged finding that deliberately holds the cursor) and advance, after which the hourly windows return to a few minutes. This doubles as a durable resilience buffer against future large-window conditions. Also fold in the post-merge CodeRabbit review nits from #1897: - Extract the duplicated gh_api_retry helper into .github/scripts/gh-api-retry.sh, invoked by both fetch steps, so the two copies cannot drift. - Clarify in the tool README and doc.go that a set-but-missing --known-tags-file is a hard error (exit 2), distinct from an empty file (disables suppression), and that the CLASSIFICATION line is printed for a completed run (exit 0/1/3) but not the exit-2 argument-error path. Follow-up to #1897. Related #1898 Related #1899 Signed-off-by: Brian Lockwood <[email protected]>
The identity-scan release correlation added in #1897 checked the repo's current tags (/tags). But a release candidate's tag and GitHub Release are deleted once the final ships (cleanup), while its signing entries are permanent in the transparency log. So a legitimately-signed-then-deleted tag (v0.18.0-rc1) was no longer in /tags, went unsuppressed, and paged a false "OIDC/key compromise" alert (#1902). Correlate against the on-tag.yaml (release signing workflow) run history instead. The identity SAN is on-tag.yaml@refs/tags/<tag>, so a tag-push run of that workflow is the authoritative proof that a real release signed <tag> -- and run history persists after the tag/release is deleted, unlike /tags or /releases. The "Fetch signed release tags" step now reads head_branch from the workflow's runs (event=push, any conclusion, de-duplicated). The workflow file name is centralized in a new RELEASE_WORKFLOW_FILE env var shared with CERT_SUBJECT so the identity regex and the correlation source cannot drift. Fail-closed and no new attack surface: run history cannot be forged without repo write (a strictly higher bar than the OIDC/key compromise monitored for), a forged entry for a tag the workflow never ran still alerts, and the job already has actions: read. The tool is unchanged (--known-tags-file is source-agnostic); only the workflow's correlation source and the docs move. Fixes #1902 Related #1897 Signed-off-by: Brian Lockwood <[email protected]>
The identity-scan release correlation added in #1897 checked the repo's current tags (/tags). But a release candidate's tag and GitHub Release are deleted once the final ships (cleanup), while its signing entries are permanent in the transparency log. So a legitimately-signed-then-deleted tag (v0.18.0-rc1) was no longer in /tags, went unsuppressed, and paged a false "OIDC/key compromise" alert (#1902). Correlate against the on-tag.yaml (release signing workflow) run history instead. The identity SAN is on-tag.yaml@refs/tags/<tag>, so a tag-push run of that workflow is the authoritative proof that a real release signed <tag> -- and run history persists after the tag/release is deleted, unlike /tags or /releases. The "Fetch signed release tags" step now reads head_branch from the workflow's runs (event=push, any conclusion, de-duplicated). The workflow file name is centralized in a new RELEASE_WORKFLOW_FILE env var shared with CERT_SUBJECT so the identity regex and the correlation source cannot drift. Fail-closed and no new attack surface: run history cannot be forged without repo write (a strictly higher bar than the OIDC/key compromise monitored for), a forged entry for a tag the workflow never ran still alerts, and the job already has actions: read. The tool is unchanged (--known-tags-file is source-agnostic); only the workflow's correlation source and the docs move. Fixes #1902 Related #1897 Signed-off-by: Brian Lockwood <[email protected]>
The identity-scan release correlation added in #1897 checked the repo's current tags (/tags). But a release candidate's tag and GitHub Release are deleted once the final ships (cleanup), while its signing entries are permanent in the transparency log. So a legitimately-signed-then-deleted tag (v0.18.0-rc1) was no longer in /tags, went unsuppressed, and paged a false "OIDC/key compromise" alert (#1902). Correlate against the on-tag.yaml (release signing workflow) run history instead. The identity SAN is on-tag.yaml@refs/tags/<tag>, so a tag-push run of that workflow is the authoritative proof that a real release signed <tag> -- and run history persists after the tag/release is deleted, unlike /tags or /releases. The "Fetch signed release tags" step now reads head_branch from the workflow's runs (event=push, any conclusion, de-duplicated). The workflow file name is centralized in a new RELEASE_WORKFLOW_FILE env var shared with CERT_SUBJECT so the identity regex and the correlation source cannot drift. Fail-closed and no new attack surface: run history cannot be forged without repo write (a strictly higher bar than the OIDC/key compromise monitored for), a forged entry for a tag the workflow never ran still alerts, and the job already has actions: read. The tool is unchanged (--known-tags-file is source-agnostic); only the workflow's correlation source and the docs move. Fixes #1902 Related #1897 Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
The identity scan is linear in the window size, so a window that has not advanced for a while (a multi-hour Sigstore/TUF outage, or a finding that deliberately holds the cursor) can grow past what one run can scan inside the 45m pass deadline. On 2026-07-24 the window reached ~1.17M entries and timed out (operational) every run; the monitor could not self-heal without a re-baseline, which skips the backlog (a coverage gap). Make the scan resumable. Split the signed checkpoint (the consistency anchor, advanced only once the scan reaches head) from a new scannedTo cursor persisted in a <checkpoint>.scan companion carried in the same artifact. Each run scans a bounded slice (maxScanEntriesPerRun, in scanChunkSize chunks), persists progress after each clean chunk, and resumes there next run. A large backlog is caught up over several hourly runs, each within budget, with no coverage gap and no re-baseline. A partial catch-up pass is a clean (exit 0) run; a finding still halts at its chunk and is re-detected until triaged (so a partial-clean pass never coexists with an open finding alert). The consistency proof stays O(log n), so it is never the bottleneck. Also re-enable the scheduled cron (commented out on 2026-07-24 to pause the wedged monitor) and upload the progress companion alongside the checkpoint. An artifact without the companion (a run before this shipped, or one that did not scan) resumes from 0, i.e. the prior full-window behavior. Follows #1897 / #1900 / #1903. Signed-off-by: Brian Lockwood <[email protected]>
Summary
Split the hourly Rekor v2 monitor's single "any failure pages maintainers" path into a classified one: only a genuine tamper or an unexplained identity hit pages, while infrastructure flakiness stays quiet. Also stop legitimate releases from tripping (and wedging) the identity alarm by correlating matches against known release tags.
Motivation / Context
The monitor opened a scary "potential OIDC/key compromise" issue and posted a Slack alert on any failure, so transient Sigstore/TUF/GitHub-API outages paged maintainers with incident-response language (#1813). Separately, a legitimate release (
v0.18.0-rc1) matched the release-signer identity scan and, because findings never advance the checkpoint, wedged the monitor into re-detecting it every hour and paging Slack indefinitely (#1887).Fixes: #1887
Related: #1813
Type of Change
Component(s) Affected
docs/,examples/)tools/rekor-monitor(transparency-log monitor) +.github/workflows/rekor-monitor.yamlImplementation Notes
proof.RootMismatchError, reachable through the wrap chain), identity (ErrCodeConflictfrom a finding), or operational (everything else). It exits0/1/2/3and prints a machine-readableCLASSIFICATION=line; operational failures are retried in-pass; a security classification is never retried.area/ci"degraded" issue only after 3 consecutive failed runs; a clean run closes both. The job still goes red on every failure.--known-tags-file; the tool suppresses identity matches whose@refs/tags/<tag>is a known release. Fail-closed: an unknown tag, a malformed SAN, or an empty allowlist still alerts, and a missing allowlist file is a hard error.RootMismatchErrorconsistency proof is classified operational (only a true root mismatch is tamper). A persistent malformed-proof condition therefore surfaces as the calm degraded issue, not a page.Testing
New/changed functions are covered ~100% (
classify,runWithRetry,extractTag,filterKnownReleases,realMain;loadKnownTags94%,observe91%). Fullmake qualify(e2e + grype scan) was not run locally; relying on CI for those stages.Risk Assessment
Rollout notes: No migration. On merge, the next scheduled run fetches known tags, suppresses the
v0.18.0-rc1match, records a clean pass, advances the checkpoint, and auto-closes the currently-wedged alert issue. Backwards compatible:--known-tags-fileis optional (omitted = prior behavior).Checklist
make testwith-race)make lint)git commit -S)