You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build: prod config check skips CSP, HSTS, and runtime #815
scripts/validate-app-prod-config.mjs checks the off-repo production config .app.prod.yaml before every deploy, but not the Content-Security-Policy and Strict-Transport-Security headers on the /$ and /new$ handlers, nor the runtime.
If .app.prod.yaml drifts from app.yaml on those, the app shell ships without CSP or HSTS, or on an old Node runtime, and no check notices.
Why it matters
Those two handlers serve index.html as GAE static files, which never pass through Express, so Helmet's CSP and HSTS in src/server/app.ts do not cover them; the handler headers are the only protection.
Whether the current production config has them cannot be checked from the repo; the point is to catch drift either way.
The validator already enforces the same kind of mirroring for max_instances and the /static CORS header.
Fix
In validateAppProdConfig, require that the /$ and /new$ handlers have both headers, and that runtime equals the one in app.yaml (nodejs24).
Comparing the header values with app.yaml rather than just checking presence would also catch a stale CSP, at the cost of updating both files together, which the deploy checklist already asks for.
Add cases to scripts/tests/validate-app-prod-config.test.mjs.
changed the title [-]deploy: static-handler CSP/HSTS headers can silently drift out of .app.prod.yaml (and validator skips them + runtime)[/-][+]build: prod config check skips CSP, HSTS, and runtime[/+]on Oct 12, 2026
Activity
[-]deploy: static-handler CSP/HSTS headers can silently drift out of .app.prod.yaml (and validator skips them + runtime)[/-][+]build: prod config check skips CSP, HSTS, and runtime[/+]