Packs / cybersecurity-public
file-permission-audit
Find world-writable files and readable private keys/secrets files under a directory we own
Install
logicpacks pack use cybersecurity-public/file-permission-auditget_pack cybersecurity-public/file-permission-auditThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 1 in
outcome/checks.yaml - Code:
perm_audit.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A list of risky permissions under a path: world-writable files/dirs (without sticky bit), private-key and .env style files readable by group/others, executable config files.
Verified by: Self-test builds a temp tree with 3 planted issues (world-writable file, 0644 key file, 0644 .env) and the audit reports exactly those 3.
Steps
- Run
python3 code/perm_audit.py ~/projects. - Fix with
chmod 600 <file>/chmod o-w <path>after checking the owner. - Re-run until clean.
Edge cases
- Symlinks are not followed.
- Shared group dirs may be intentionally group-writable; only 'other' write is flagged.
- The script never prints file contents, only paths and modes.
Don'ts
- Never point this at machines, hosts or networks we do not own or are not authorised to audit.
- Don't change settings automatically; report, then a human applies fixes.
- Don't print or copy the secrets files you find; only fix their mode.