Fix LawNet artifact serving and storage hardening #62

Merged
dernbu merged 1 commit from feat/lawnet-artifact-storage-hardening into main 2026-06-16 17:00:38 +02:00
Owner

Summary

  • Force LawNet artifact responses, including HTML, to download as attachments.
  • Return exact artifact bytes instead of the full Buffer backing store.
  • Harden filesystem artifact path resolution against absolute paths and .. traversal.
  • Fail fast for unknown BFF_STORAGE values and add LAWNET_FILE_STORAGE_ROOT support.
  • Mark LawNet storage modules as server-only and include fixtures in the web runtime image.

Verification

  • cd services/web && pnpm test
  • cd services/web && pnpm typecheck
  • cd services/web && pnpm lint
  • cd services/web && pnpm build
  • just check-compose

Note: local pnpm commands emitted the existing Node version warning because the shell uses Node 20 while the package requires Node 22.

## Summary - Force LawNet artifact responses, including HTML, to download as attachments. - Return exact artifact bytes instead of the full Buffer backing store. - Harden filesystem artifact path resolution against absolute paths and `..` traversal. - Fail fast for unknown `BFF_STORAGE` values and add `LAWNET_FILE_STORAGE_ROOT` support. - Mark LawNet storage modules as server-only and include fixtures in the web runtime image. ## Verification - `cd services/web && pnpm test` - `cd services/web && pnpm typecheck` - `cd services/web && pnpm lint` - `cd services/web && pnpm build` - `just check-compose` Note: local pnpm commands emitted the existing Node version warning because the shell uses Node 20 while the package requires Node 22.
feat: fix some issues
Some checks failed
CI / merge-check (pull_request) Successful in 1m12s
Deploy / deploy-staging (push) Has been cancelled
Deploy / deploy-production (push) Has been cancelled
7315ea5dcd
dernbu merged commit 7315ea5dcd into main 2026-06-16 17:00:38 +02:00
dernbu deleted branch feat/lawnet-artifact-storage-hardening 2026-06-16 17:00:38 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dernbu/lawnet-scraper!62
No description provided.