Dippy
Dippy copied to clipboard
find -fprint/-fls/-fprintf write files but aren't guarded
Summary
The find handler guards -delete, -exec/-execdir, and -ok/-okdir, but misses find's file-writing actions. -fprint, -fls, and -fprintf each create/truncate the named file, yet currently classify as allow.
Repro (default config)
find . -fprint /tmp/out -> allow
find . -fls /tmp/out -> allow
find . -fprintf /tmp/out '%p' -> allow
Each of these clobbers /tmp/out (and could target any writable path, e.g. a config or data file).
Suggested fix
Add -fprint, -fprintf, -fls to the "always ask" branch in src/dippy/cli/find.py, alongside -delete. (-fprint0 too.)
Notes
- These are GNU findutils actions; BSD/macOS
finddoesn't have them, so this is a Linux-side gap. - Surfaced while investigating #130 (which was about
-delete, already guarded).