Skip to content

feat(scan): persist scan failures and expose them to search - #2095

Merged
paralta merged 12 commits into
mainfrom
feat/persist-scan-report
Sep 3, 2026
Merged

paralta merged 12 commits into
mainfrom
feat/persist-scan-report

Conversation

@paralta

@paralta paralta commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

The reconciler only recorded a scan when it reached a verdict, so a record that could not be scanned — a private source repository, an unreachable endpoint, a missing scanner binary — left no trace at all. It matched the "needs scanning" query on every pass and was re-cloned indefinitely, and an operator had no way to list those records or tell a fault of the published record apart from a fault of our own infrastructure. Every attempt is now persisted with a status and a machine-readable failure reason, retries are bounded by exponential backoff, and --scan-status / --scan-failure-reason make the failures searchable so an admin can act on them — for example, a scheduled job that deletes records whose source repository is permanently unreachable.

Failure Examples from imported records

Cause Status Reason Records
github.com/sravanism/esrp-oss-mcp-server — private or deleted failed source-unreachable 3
github.com/bap-microsoft/MCP-Platform/ — private or deleted failed source-unreachable 2
example.com/mcp-server.git — placeholder never substituted failed source-unreachable 2
.../servers/tree/main/src/git — subdirectory URL, not a repo failed source-unreachable 1
mcp.circleci.com, mcp.newrelic.com — gated behind OAuth failed endpoint-unreachable 2

Note: the fourth example can be handled by changing the git clone code

@paralta paralta linked an issue Sep 2, 2026 that may be closed by this pull request
2 tasks done
@github-actions github-actions Bot added the size/XL Denotes a PR that changes 2000+ lines label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedSep 3, 2026, 11:58 AM

@paralta
paralta force-pushed the feat/persist-scan-report branch 2 times, most recently from e658cd6 to c05962e Compare September 3, 2026 10:04
Signed-off-by: Catarina Paralta <[email protected]>
@paralta
paralta force-pushed the feat/persist-scan-report branch from c05962e to b622900 Compare September 3, 2026 10:25
@paralta
paralta force-pushed the feat/persist-scan-report branch from 6cf68fd to 9076b1e Compare September 3, 2026 11:58
@paralta
paralta marked this pull request as ready for review September 3, 2026 11:58
@paralta
paralta requested a review from a team as a code owner September 3, 2026 11:58

@tkircsi tkircsi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@paralta
paralta merged commit e0e08da into main Sep 3, 2026
34 checks passed
@paralta
paralta deleted the feat/persist-scan-report branch September 3, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Denotes a PR that changes 2000+ lines

Projects

None yet

2 participants