mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
fix(tools): confine verify_pdf --dump-text and drop the bare pdftotext allowance
settings.json pre-approves verify_pdf.py with any arguments, and --dump-text wrote the PDF's text layer to any path it was given, creating missing parent directories and overwriting existing files. Reproduced on master through the real CLI: a one-page PDF's text was written to a new directory outside the repo with no prompt. The CLI now writes only a .txt under the repo's cv/ or cover_letters/ (where apply.md Step 5d puts it) and refuses a symlinked target. Bash(pdftotext:*) is dropped for the same reason: Poppler writes to any output path, and `pdftotext <file> -` prints any PDF on disk into the session. verify_pdf.py already wraps it; the documented manual fallback still works and now asks first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ca456318c
commit
bc2c583c44
7 files changed
+91
-5
No files matched your search
@@ -82,7 +82,8 @@ ALLOWED_PERMISSIONS = {
|
||||
"Bash(python3 tools/verify_pdf.py:*)",
|
||||
"Bash(python tools/verify_layout.py:*)",
|
||||
"Bash(python3 tools/verify_layout.py:*)",
|
||||
"Bash(pdftotext:*)",
|
||||
# No bare Bash(pdftotext:*): it writes its output to any path it is given,
|
||||
# and tools/verify_pdf.py already wraps it with that path confined.
|
||||
# The browser-header retry in 09-web-research.md. fetch_page.py is GET-only
|
||||
# with a fixed argv and refuses to write inside the repo, which is why the
|
||||
# grant names the script and not `curl`.
|
||||
|
||||
Reference in new issue
Block a user