Repository navigation
Conversation
Spec 077 US2 (T018-T022). Collapse the per-scanner findings into a single unified report and let independent scanners agreeing on the same issue raise confidence and the risk score instead of producing duplicate entries. ## Changes - MergeFindings: dedup by (rule_id, location) into one entry whose Sources lists every contributing scanner; boost confidence when >=2 distinct sources agree on the same (location, threat_type) (T018/T019/T021). - CalculateRiskScore: matched external/Docker findings on (location, threat_type) now ADD to consensus (counted once, weighted by the number of agreeing sources) instead of flattening to weight 1; legacy per-rule dedup and detect Signals weighting preserved for the empty-threat_type path (T020). - AggregateReports: run MergeFindings after classification so the aggregated report carries populated Sources and consensus-boosted confidence (T021). - ClassifyThreat: backfill a user-readable severity from the classified threat level for external/legacy SARIF findings that arrive without one (T022). ## Testing - New: dedup-to-one, consensus-confidence-boost, cross-source-consensus-score, severity-backfill. Existing risk-score/dedup/aggregate tests unchanged. Related: Spec 077 (specs/077-scanner-simplification)
Spec 077 US2 (T023). Surface the merged, deduplicated finding list in the scan report: each finding shows its severity, its contributing source(s), and a "consensus xN" badge when two or more scanners independently agreed. Adds the additive `sources`/`tier`/`confidence`/`signals` fields to SecurityScanFinding. ## Changes - api.ts: extend SecurityScanFinding with sources/tier/confidence/signals. - ScanReport.vue: severity badge + consensus badge in the finding header; Source(s) row (falls back to the single scanner id for legacy findings). ## Testing - vue-tsc + vite build clean. Related: Spec 077 (specs/077-scanner-simplification)
Deploying mcpproxy-docs with
|
| Latest commit: |
7a2f7e5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c3a07ccc.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://077-us2-unified-report.mcpproxy-docs.pages.dev |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 28503641176 --repo smart-mcp-proxy/mcpproxy-go
|
…er fields on merge CalculateRiskScore consensus branch now scores each (location, threat_type) group at the most-severe threat category and the max per-finding weight among all agreeing findings, instead of whichever finding was encountered first. For severity-derived threat_types (supply_chain, uncategorized, malicious_code fallback) agreeing findings can carry different threat_levels, so the previous first-wins behavior made the score order-dependent and could drop a genuine high/warning finding. Extracted a threatCategory helper and precompute the group max in the existing consensus pass for determinism. MergeFindings phase-1 dedup now absorbs the duplicate's stronger fields: it takes max(Confidence), the more-severe Tier (hard > soft via tierRank), and the union of Signals, so merging a hard/high-confidence finding with a same- (rule_id, location) soft/low-confidence duplicate no longer discards the hard tier and higher confidence. Adds tests locking order-independent max-severity consensus scoring and max-confidence + hard-tier-wins on merge. Related: Spec 077
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Spec 077 US2 — one unified, readable report. Collapses the per-scanner
findings into a single deduplicated list, lets independent scanners that agree
on the same issue raise confidence and the risk score (instead of producing
duplicate entries), guarantees every finding carries a severity, and surfaces
source attribution in the Web UI.
Base is
077-us1-baseline— this PR is stacked on US1 (#786). Review/merge US1 first.Per-task changes
internal/security/scanner/sarif_test.go— dedupby
(rule_id, location)yields exactly one finding; two independent sourcesagreeing on
(location, threat_type)boost confidence above single-source.sarif.goMergeFindings+engine.goAggregateReports— merge isrun after classification; the merged entry's
Sourceslists everycontributing scanner (union, sorted, deterministic). Findings with an empty
rule_idare never merged.sarif.goCalculateRiskScore— matched external/Docker findings on(location, threat_type)now ADD to consensus: the issue is counted once,weighted by the number of agreeing sources, rather than each flattening to
weight 1. The legacy per-
(rule_id, location)dedup and detectSignalsweighting are preserved for the empty-
threat_typepath, so all existingscoring tests are unchanged.
sarif.goClassifyThreat— backfills a user-readable severity fromthe classified threat level for external/legacy SARIF findings that arrive
without one. An explicit severity is never overwritten.
frontend/src/views/ScanReport.vue+types/api.ts— the singlemerged finding list now renders a severity badge, a
Source(s)row, and aconsensus xNbadge when ≥2 scanners agreed.SecurityScanFindinggains theadditive
sources/tier/confidence/signalsfields.No new third-party dependency. The quarantine state machine
(
internal/runtime/tool_quarantine.go) is untouched.Verification (actual output)
go build ./...— clean (exit 0).go test ./...— pass. The only failures were theinternal/serverTestBinary*/TestMCPProtocol*E2E cases, which require a pre-builtmcpproxybinary (binary not found ... run: go build -o mcpproxy ./cmd/mcpproxy);after
go build -o mcpproxy ./cmd/mcpproxy && cp mcpproxy internal/server/,go test ./internal/server/passes (exit 0). All other packages green,including
internal/security/scanner.go run ./cmd/scan-eval --corpus specs/065-evaluation-foundation/datasets/detect_corpus_v1.json --gate --min-recall 0.90 --max-fp 0.05→
GATE PASSED: recall=1.0000 (>=0.9000), fp=0.0000 (<=0.0500).golangci-lint run --config .github/.golangci.yml ./...→0 issues.cd frontend && npm run build(vue-tsc && vite build) → built clean.🤖 Generated with Claude Code