MCP scan allowlist ignores `tool:` field, so entries apply server-wide
I maintainer di solito rispondono entro 11 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 8
- Fork
- 7
- Merge medio
- 6g 15h
- PR unite (30g)
- 74
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stacklok/dockyard
-
grype high security
Difficoltà 2/5 1-3 ore Idoneità per principianti 53/100
I maintainer di solito rispondono entro 11 giorni
-
grype high security
Difficoltà 2/5 1-3 ore Idoneità per principianti 56/100
I maintainer di solito rispondono entro 11 giorni
-
Package Postman with proxy-compatible NodeForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaneeds-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
stacklok/dockyard#1195 · 1 commento ·
I maintainer di solito rispondono entro 11 giorni
-
grype high security
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
stacklok/dockyard#1191 · 3 commenti ·
I maintainer di solito rispondono entro 11 giorni
-
grype high security
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
stacklok/dockyard#1189 · 3 commenti ·
I maintainer di solito rispondono entro 11 giorni
Tutte le issue di stacklok/dockyard
Issue simili
-
type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
messaging/v1: IsGRPCProtocol and InternalMetadataToGrpcMetadata panic on empty or nil metadata valuesForse già presa @patelshivani2283-lab l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
stacklok/toolhive-catalog#2024 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno