Skip to content

Phase 7: Supply-Chain & Security Hardening - #18

Merged
suradet-ps merged 3 commits into
mainfrom
feat/phase-7-security-hardening
Aug 5, 2026
Merged

Phase 7: Supply-Chain & Security Hardening#18
suradet-ps merged 3 commits into
mainfrom
feat/phase-7-security-hardening

Conversation

@suradet-ps

Copy link
Copy Markdown
Owner

Summary

Implements Phase 7 of ROADMAP.md: Supply-Chain & Security Hardening.

What changed

1. Content-Security-Policy header (vercel.json)

  • Added strict CSP: default-src 'none' deny-by-default policy
  • script-src 'self' - only Trunk-generated JS allowed
  • style-src 'self' 'unsafe-inline' - self-hosted CSS + Leptos inline styles
  • img-src 'self', font-src 'self', connect-src 'self' - all self-hosted
  • worker-src 'self', manifest-src 'self' - PWA assets
  • No unsafe-eval anywhere

2. CSP verification CI job (.github/workflows/ci.yml)

  • New csp-verify job that parses vercel.json and validates:
    • All 8 required directives present
    • No unsafe-eval in any directive
    • No unsafe-inline in script-src
    • unsafe-inline allowed only in style-src (Leptos requirement)
  • build job now depends on csp-verify

Already verified (no changes needed)

  • Dependency pinning: All Cargo.toml use version ranges
  • #![deny(unsafe_code)]: Present in all 4 crates

CI pipeline (now 8 jobs)

check, clippy, fmt, test, audit, deny, hex-audit, csp-verify -> build -> perf-budget

CSP directives:
- default-src 'none' (deny by default)
- script-src 'self' (Trunk-generated JS only)
- style-src 'self' 'unsafe-inline' (Leptos needs inline styles)
- img-src 'self', font-src 'self', connect-src 'self'
- worker-src 'self' (service worker)
- manifest-src 'self' (PWA manifest)

No unsafe-eval. No external resources.
New CI job 'csp-verify' that:
- Extracts CSP value from vercel.json
- Validates all required directives are present
- Rejects unsafe-eval
- Rejects unsafe-inline in script-src
- Allows unsafe-inline in style-src (Leptos requirement)
- build job now depends on csp-verify
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codeshot Canceled Canceled Aug 5, 2026 2:13am

@suradet-ps
suradet-ps merged commit 4c1cc80 into main Aug 5, 2026
12 of 13 checks passed
@suradet-ps
suradet-ps deleted the feat/phase-7-security-hardening branch August 5, 2026 01:43
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