Dshamir bolts a security layer onto the back door

Six commits turn the fork's request handling into something you'd actually trust with client files.

securityinfrastructure

Dshamir hardened the way the app receives and processes requests - the plumbing every upload and query passes through. The standout for legal teams: uploaded files are now checked by their actual contents, not their name, so a renamed executable can't slip in disguised as a PDF. On top of that, incoming requests are validated against strict rules before anything touches them, errors are captured and reported in a clean, standardized format instead of leaking raw stack traces, and a tightened browser security policy (CSP, the rule set that limits what a page is allowed to load) reduces the blast radius if something goes wrong.

There's also structured logging that automatically scrubs sensitive fields and tags each request so issues can be traced end to end - useful when you need an audit trail rather than a guess.

So what Anyone evaluating a Mike fork to handle real client documents should note this one takes intake security and traceability seriously.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

6 commits from Dshamir/AI-Legal, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
d13c77a3 [P2] chore: add zod, pino, sentry, file-type dependencies Dshamir 2026-05-23 ↗ GitHub
46efac39 [P2] feat: add magic-byte MIME validation for uploads Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
440da990 [P2] feat: add Pino structured logger with redaction and request ID middleware Dshamir 2026-05-23 ↗ GitHub
Add structured logging via Pino with sensitive field redaction and
per-request child loggers tied to X-Request-ID headers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
caf82b04 [P2] feat: add GlitchTip/Sentry error tracking and global error handler Dshamir 2026-05-23 ↗ GitHub
commit body
Add error tracking initialization with GlitchTip/Sentry and a global
Express error handler producing RFC 7807 problem detail responses with
Zod validation error formatting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25e099b1 [P2] feat: add Zod validation framework and common schemas Dshamir 2026-05-23 ↗ GitHub
Add Express middleware for Zod schema validation and reusable common
schemas for UUIDs, pagination, and route params.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7f2aa547 [P2] feat: wire validation, logging, error handling, CSP into Express Dshamir 2026-05-23 ↗ GitHub
commit body
- Add requestId, globalErrorHandler middleware to Express pipeline
- Initialize error tracking (GlitchTip/Sentry) before app setup
- Enable CSP via Helmet with strict directives
- Replace all console.log/error/warn with Pino structured logger
- Fix file-type ESM module resolution with @ts-ignore

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-520.md from inside the repo you want the changes in.

⬇ Download capture-thread-520.md