Skip to main content
← All rules

mcp-scan rule

Broad filesystem access

broad-filesystem-accessmedium

What mcp-scan saw

The permission scanner found an argument starting with /Users, /home, or /root that splits into three or fewer slash-separated segments. /Users/you qualifies; /Users/you/projects does not, because it splits into four. A --flag= prefix is stripped before the test.

Why it fires

It sits one level below excessive-permissions on purpose: a home directory is not a system directory, but it is where every project, every dotfile, and every downloaded artifact lives. The segment count is the whole mechanism, so the rule is really asking whether you handed over a user root or a specific directory.

When this is a false positive

  • A personal notes or vault server that is meant to see the whole home directory. Granting /Users/you is the correct configuration for that use, and the rule cannot distinguish intent from reach.
  • A container or sandbox where /home/node is the entire filesystem the process can see. The grant looks broad and is actually the whole world the server has.
  • A path that is exactly three segments for unrelated reasons, for example /home/shared as a deliberately narrow mount point.
  • The rule is skipped entirely once the path is four segments deep, so /Users/you/Documents is not reported even though it is still broad. Absence of this finding is not evidence of a narrow grant.

How to fix it

  1. Read the path quoted in the finding. It is the resolved value after any --flag= prefix is stripped.
  2. Narrow it to the directory the server actually needs. One level deeper is enough to clear the rule, so choose the level that is actually correct rather than the level that silences it.
  3. If several directories are needed, pass them as separate arguments instead of widening to a common parent.
  4. For a container where the grant is already the whole sandbox, keep it and add the server's config key to .mcp-scan-ignore.
  5. This finding is marked not fixable, so mcp-scan fix will skip it. Edit the config by hand.