No description
Find a file
le king fu 6eda076a25 feat(reports): add GET /reports/scans endpoint for defenseur-auto
Replaces the SSH/rsync canal between Max's workstation cron and the VPS
for fetching defenseur scan reports. The defenseur-auto orchestrator now
pulls reports/defenseur-X_<date>*.json over HTTPS, reusing HEALTH_TOKEN.

The handler mirrors the style of index.js (HTTP native, no framework),
includes the same isScanReport guard as defenseurs/src/report.ts (filters
out defenseur-auto_*.json run reports), and validates the date param
against /^\d{4}-\d{2}-\d{2}$/ to short-circuit path traversal before any
filesystem access.

Validated by test-curl.sh — 11 cases covering auth, validation, date
filter, isScanReport filter, sort order, GET-only and 404 paths.

Spike: ~/claude-code/.spikes/archived/endpoint-reports-sur-vps-health-api-pour/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 20:50:29 -04:00
.env.example feat(reports): add GET /reports/scans endpoint for defenseur-auto 2026-05-07 20:50:29 -04:00
.gitignore feat: initial vps-health-api service 2026-02-26 20:48:09 -05:00
CLAUDE.md feat(reports): add GET /reports/scans endpoint for defenseur-auto 2026-05-07 20:50:29 -04:00
Dockerfile feat: initial vps-health-api service 2026-02-26 20:48:09 -05:00
index.js feat(reports): add GET /reports/scans endpoint for defenseur-auto 2026-05-07 20:50:29 -04:00
package.json feat: initial vps-health-api service 2026-02-26 20:48:09 -05:00
test-curl.sh feat(reports): add GET /reports/scans endpoint for defenseur-auto 2026-05-07 20:50:29 -04:00