StaticFiles mounted at the project root
Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
StaticFiles(directory=...) is pointed at '.', '..', '/', or the current working directory, so mounting it serves every file in that tree, including .env, .git, and application source, to any client.
Why it matters
Mounting StaticFiles with directory set to '.', '..', '/', or the current working directory serves everything under that path as a static file server, with no distinction between the assets you meant to publish and the rest of your project: .env, .git, requirements.txt, and your application's own source files are all fetchable by anyone who guesses or scans for the path.
How to fix it
Point directory at a dedicated folder that contains only the files meant to be public (a static/ or public/ directory checked into the repo for exactly this purpose), never the project root or any parent of it. If the static assets and application code currently live in the same directory, move the public assets into their own subdirectory before wiring up the mount.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo