feat(security): Spec 076 US4 — consensus risk-score + report transparency (T020-T021)#776
Open
Dumbris wants to merge 1 commit into
Open
feat(security): Spec 076 US4 — consensus risk-score + report transparency (T020-T021)#776Dumbris wants to merge 1 commit into
Dumbris wants to merge 1 commit into
Conversation
…Spec 076 US4) T020: risk-score aggregation now treats independent signals on a tool as additive instead of collapsing agreement. The deterministic scanner emits one ScanFinding per tool whose Signals list every check that fired; CalculateRiskScore weights each (deduplicated) finding by its distinct-signal count, so a tool flagged by several checks scores higher than one flagged by a single check (FR-006, SC-007). Legacy/cross-scanner findings carry no signals and weigh 1, so existing scoring and the same-rule+location de-duplication are unchanged. T021: surface confidence + signals in the CLI report (printFindingsList renders "Confidence:" and "Signals:" lines) and confirm they serialize through the REST aggregated scan report. Docs note added under security-commands.md. Tests: consensus-raises-score + cross-scanner-dedup-retained scoring tests, CLI render + absent-field tests, report-level serialization test. Related #MCP-3578
Deploying mcpproxy-docs with
|
| Latest commit: |
5194bce
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5b45bf4e.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://076-t5-consensus-score.mcpproxy-docs.pages.dev |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 28262188419 --repo smart-mcp-proxy/mcpproxy-go
|
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 076 US4 (transparent, consensus-aware findings) — T020 + T021. Branched off
origin/main(carries the T1 detect-engine foundation #769 and theScanFinding.Confidence/Signalsfields from T004).T020 — consensus-additive risk score (FR-006, SC-007)
CalculateRiskScorepreviously dedup-collapsed agreement: a tool flagged by several independent checks counted the same as one flagged once. The deterministic scanner (Spec 076) emits oneScanFindingper tool whoseSignalslist every check that fired. The score now weights each (deduplicated) finding by its distinct-signal count, so check agreement raises the composite risk score instead of being collapsed.6; same finding with 3 signals →12(consensus visible).1→ legacy scoring unchanged.rule_id+locationfrom multiple scanners) is retained — only independent signals within a finding add.T021 — report transparency (FR-010, SC-007)
printFindingsListnow rendersConfidence:andSignals:lines under a finding (skipped when absent, so plain CVE findings stay compact).confidence/signalsserialize through the REST aggregated scan report (report-level marshal test), not just on a bareScanFinding.docs/cli/security-commands.md(ENG-9).Testing
go test -race ./internal/security/... ./cmd/mcpproxy/— greengolangci-lint run --config .github/.golangci.yml ./internal/security/scanner/... ./cmd/mcpproxy/...— 0 issuesLayering note
The additive scoring is inert on
maintoday —Signalsis only populated once the US1/US2 detect→scanner wiring (#770/#775) lands; until then every finding weighs 1 and behavior is identical. This is the correct foundational layering (US4 depends on Foundational aggregation only).Related #MCP-3578