MCP scan allowlist ignores `tool:` field, so entries apply server-wide
Maintainer antworten meist innerhalb von 11 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 76/100
Rechercherichtung
Start with scripts/mcp-scan/process_scan_results.py, especially load_security_config() and is_issue_allowed(), then inspect the scanner tests. Add coverage for per-tool matches, duplicate codes across tools, and entries without tool:. Done means tool-scoped entries only allow matching findings, server-wide entries retain their current behavior, and each match reports its own reason.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
security.allowed_issues entries in MCP server specs commonly include a tool: field, which reads as scoping the entry to one tool. scripts/mcp-scan/process_scan_results.py never reads it. load_security_config() builds a dict keyed only by code (line 84), and is_issue_allowed() checks only the finding's AITech/AISubtech codes against that dict (lines 91-127). So every entry allowlists its code for every tool on the server, including tools added in future versions.
Impact
- 7 specs use
tool:across 17 entries (heroku, phoenix, sentry, server-everything, arxiv, clickhouse, redis). All of them are broader than they look. npx/heroku-mcp-server/spec.yamlhas eight separateAISubtech-12.1.2entries, one per tool. They collapse into a single dict key, so 12.1.2 is allowlisted on every Heroku tool, and only the last entry'sreasonsurvives into the scan output.- Prefix matching widens this further. An
AITech-12.1entry also covers everyAISubtech-12.1.xon every tool. - It makes narrow allowlists for LLM-analyzer flakes unsafe. For example, supabase's main build just failed on a nondeterministic AITech-8.2 (data exfiltration) finding on
get_publishable_keys. Allowlisting that would also silence any future 8.2 finding onexecute_sql.
Proposed fix
- Store allowlist entries as a list of
(code, tool, reason)rather than a dict keyed by code. - When an entry has
tool, match only findings whosetool_nameequals it. Entries withouttoolkeep today's server-wide behavior, so existing specs withouttool:don't change. - Keep each matched entry's own
reasonin the output. - Add tests for per-tool matching, duplicate codes across tools, and the no-
toolfallback.
Rollout note
Turning this on will narrow 17 existing entries. A spec whose allowlist was quietly covering other tools could start failing its scan. Running the scanner over those 7 specs before merging would show which entries need to be widened or duplicated.
- Vorherrschende Sprache
- Go
- Sterne
- 8
- Forks
- 7
- Ø Merge
- 6 T. 15 Std.
- Gemergte PRs (30 T.)
- 74
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus stacklok/dockyard
-
grype high security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 53/100
Maintainer antworten meist innerhalb von 11 Tagen
-
grype high security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 56/100
Maintainer antworten meist innerhalb von 11 Tagen
-
Package Postman with proxy-compatible NodeEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offenneeds-triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
stacklok/dockyard#1195 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 11 Tagen
-
grype high security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 52/100
stacklok/dockyard#1191 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 11 Tagen
-
grype high security
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
stacklok/dockyard#1189 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 11 Tagen
Alle Issues in stacklok/dockyard
Ähnliche Issues
-
HTTP probe loses insecureSkipVerify in the generated probe manifestEvtl. vergeben @BahaaMattar hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 87/100
litmuschaos/litmus#5745 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 2 Tagen
-
type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata valuesEvtl. vergeben @patelshivani2283-lab hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
stacklok/toolhive-catalog#2024 ·
Maintainer antworten meist innerhalb von 1 Tag