Review agent · Platform & AI
Privilege & file permissions
Checks file permissions, temp files, symlinks and unnecessary root.
Illustrative example of how this agent reviews a finding.
Why this agent matters
World-writable files, predictable temp paths and needless root are classic ways a small foothold becomes full control of a host.
These bugs are subtle — a race on a temp file looks like ordinary code. The agent knows the safe patterns and points to them.
What it checks
- World-writable or overly broad permissions (chmod 777)
- setuid / setgid usage
- Insecure temp-file creation and unsafe symlink following
- Code that runs as root unnecessarily
When it marks a finding as a likely false positive
- Permissions match the file's purpose
- Temp files are created atomically
The fix it suggests
- Least permissions
- Atomic temp files (mkstemp)
- Symlink-safe operations and dropping privileges
Scope and limits
This agent judges findings the scanners report (Semgrep for code, secrets and IaC/config, OWASP ZAP for passive website scans, our rules for imported API collections); it doesn't hunt for new bugs on its own. A finding reaches it when its scanner, CWE or rule/path keywords match this vulnerability class. It sees only the minimal code or evidence around the finding, with secrets redacted, and Claude, via Amazon Bedrock, returns a verdict with a confidence score, a plain-English explanation and a suggested fix.
Common questions
Does it apply to Windows code?
Its checks are Unix-centred (permissions, setuid, symlinks). Findings that don't fit any specialist go to the general reviewer.
How do I create temporary files safely?
Create them atomically with an unpredictable name, for example with mkstemp, rather than opening a predictable path. Predictable temp paths invite races and unsafe symlink following.
Is chmod 777 ever okay?
It is flagged because a world-writable file can be changed by any local user. The agent accepts permissions that match the file's purpose and otherwise recommends the least permissions that work.
Related agents
- AI / LLM safety — Checks LLM application code for prompt injection and unsafe handling of model output.
- Network & transport security — Checks that data in transit is encrypted and certificates are actually verified.
- Mobile client security — Reviews Android and iOS code for on-device storage, transport and component exposure.
See all 21 review agents → · Agent setup reviewer · How the pipeline works
Run the Privilege & file permissions agent on your repository
100 free credits, no credit card. Every finding comes with a verdict and a fix.
Get started free