Hardcoded absolute filesystem path
Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
A string literal hardcodes an absolute path tied to one machine or one developer's account (a Windows drive letter or a /home//Users home directory). The code breaks for anyone else and in any container or CI runner where that path does not exist.
Why it matters
A string literal that hardcodes a Windows drive letter or a /home//Users/ home directory ties the code to one developer's machine. It breaks the moment anyone else runs it, and it breaks in CI, in a container, or in production, where that exact path almost certainly does not exist.
How to fix it
Read the path from configuration (an environment variable, a Spring @Value-injected property, or a command-line argument) with a sensible platform-appropriate default, or derive it relative to a known base directory such as the working directory or a configured data directory.
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