Skip to content

chore: repo hygiene and security hardening - #11

Closed
mkultraWasHere wants to merge 8 commits into
mainfrom
chore/repo-hygiene
Closed

chore: repo hygiene and security hardening#11
mkultraWasHere wants to merge 8 commits into
mainfrom
chore/repo-hygiene

Conversation

@mkultraWasHere

Copy link
Copy Markdown
Collaborator

Summary

  • Versioning & licensing: bump to 0.5.0, add template licensing (LPPL-1.3c, ACM dtx source), commit uv.lock
  • Privacy: self-host JetBrains Mono font, remove Google Fonts CDN link
  • SSRF protection: validate DNS resolution against internal ranges, manually follow redirects with per-hop validation
  • Injection fixes: pass paper path via sys.argv in validate.sh (was shell-interpolated into Python), add -norc to all latexmk invocations
  • Command hardening: denylist network-exfiltration binaries (curl, wget, nc, ssh, etc.), scrub credential-shaped env vars from subprocess environments
  • Template fixes: remove stale fancyhdr.sty/natbib.sty from ICLR/ICML extra_files (broke template switching)
  • UI: PDF download names the file after the paper title, download icon uses visible color
  • Docs: add Security section to README documenting mitigations and limitations

Test plan

  • All 155 tests pass (task test)
  • SSRF: verified internal IP blocking, redirect-to-internal blocking, scheme validation (9 formal tests + 6-scenario stress test)
  • Command denylist: verified direct, absolute-path, and bash -c bypass blocking (5 formal tests + 28-case stress test)
  • Env scrub: verified credential stripping, passthrough for S2_API_KEY, non-sensitive var preservation (4 formal tests + 28-case stress test)
  • Template extra_files: verified all 15 templates have matching files on disk
  • Filename sanitization: tested with special chars, path traversal, XSS payloads, unicode, empty/null inputs

🤖 Generated with Claude Code

mkultraWasHere and others added 7 commits August 19, 2026 14:46
- Bump version to 0.5.0 in pyproject.toml (matches README badge)
- Update Node requirement to 20+ (matches pdfjs-dist engine)
- Remove uv.lock from .gitignore and commit lockfile
- Self-host JetBrains Mono font, remove Google Fonts dependency
- Fix false privacy claim in README comparison table
- Add PDF download button to viewer header
- Remove vendored system packages (natbib.sty, fancyhdr.sty) that
  violate LPPL redistribution terms — TeX Live provides them
- Bundle acmart.dtx alongside acmart.cls per LPPL requirements
- Add LPPL-1.3c license text and THIRD_PARTY_LICENSES manifest

Co-Authored-By: Claude <noreply@anthropic.com>
Block requests to private/loopback/link-local/reserved IPs, validate
URL schemes, and catch redirect-based bypasses via aiohttp TraceConfig.
Also upgrades the PDF download icon to SVG with white color.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Replaces the upstream command tool with a sandboxed version that blocks
network-exfiltration binaries (curl, wget, nc, ssh, etc.) and env-exposure
commands. Adds -norc to all latexmk invocations to prevent .latexmkrc
Perl code execution from untrusted paper directories.

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace trace-based redirect hook with manual redirect following that
  validates each Location header before connecting
- Name downloaded PDFs after the paper title instead of generic paper.pdf
- Remove stale fancyhdr.sty/natbib.sty from ICLR/ICML template configs

Co-Authored-By: Claude <noreply@anthropic.com>
Subprocesses spawned by the agent command tool inherited the full
server environment including API keys. Strip credential-shaped
variables (*_API_KEY, *_TOKEN, *_SECRET, *_PASSWORD, *_CREDENTIAL,
plus AWS keys and DATABASE_URL) while preserving S2_API_KEY for
Semantic Scholar and all non-sensitive vars.

Co-Authored-By: Claude <noreply@anthropic.com>
Document the defense-in-depth mitigations (command denylist, env
scrubbing, SSRF protection, build isolation) and their limitations.
Include recommendations for running against untrusted papers.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant