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
feat(dashboard+ci): close DASH-04/06/07, add login route, wire CI for pilot + dashboard tests
Dashboard security — all 8 findings now resolved (was 5/8):
- DASH-04: app/api/risk/scores returns synthetic:true + DEMO disclaimer so mock
series can't be mistaken for an SR 11-7 model output.
- DASH-06: next.config.js sets CSP + X-Content-Type-Options/X-Frame-Options/
Referrer-Policy/Permissions-Policy/HSTS; middleware.ts + lib/http/rateLimit.ts
add per-client rate limiting (120 req/min) on /api/*.
- DASH-07: consentLedger.ts signs each event hash (HMAC stand-in for the
Dilithium/ML-DSA HSM signer), verifies the chain on export, and FAILS CLOSED on
prevHash read errors (no silent new chain). Also fixed pre-existing invalid
'catch (e: Error)' TypeScript in this file.
- Added app/api/auth/login/route.ts: demo login issuing a signed, HttpOnly,
SameSite=Strict sentinel_session cookie via mintToken (real IdP/OIDC in prod).
- Tests extended to assert the fixes: vitest 19/19 pass (16 security + 3 gov).
New/modified files typecheck clean (0 TS errors).
CI (.github/workflows/runnable-assurance.yml):
- Install solc (contracts) so assurance steps 7 (zk relayer) + 10 (contract
compile) actually run in CI; install Terraform 1.9.8 for the pilot IaC gate.
- Add contract-logic pytest to unit tests.
- Add '2028 pilot acceptance-gate checklist' step (6/6 automated gates).
- Add separate 'dashboard-tests' job running next-app vitest.
- Trigger on governance_blueprint/** and next-app/** too.
Regression: run_runnable_assurance.sh 11/11 PASS; pilot 6/6 automated; vitest 19/19.
@@ -35,10 +45,10 @@ documented with remediations and are platform-hardening, not authz/safety gaps.
35
45
| DASH-01 | High |`app/api/consent/route.ts`| Unauthenticated consent **export** of arbitrary `userId` (IDOR) |**Resolved** — authn + `canAccessSubject` authz |
36
46
| DASH-02 | High |`app/api/consent/route.ts`| Unauthenticated consent **write** (no session binding, spoofable `userId`) |**Resolved** — identity bound to principal |
37
47
| DASH-03 | High |`app/api/chat/stream/route.ts`| No authn/authz, no input size cap, unvalidated JSON body |**Resolved** — authn + 16 KiB cap; GET text-gen removed |
38
-
| DASH-04 | Medium |`app/api/risk/scores/route.ts`| Risk scores are `Math.random()` mock served from a governance surface |Open (must be labelled `synthetic`)|
48
+
| DASH-04 | Medium |`app/api/risk/scores/route.ts`| Risk scores are `Math.random()` mock served from a governance surface |**Resolved** — `synthetic:true` + DEMO disclaimer|
39
49
| DASH-05 | Medium |`lib/safety/pipeline.ts` + chat route | Moderation `block` computed but **not enforced**|**Resolved** — block now suppresses reply |
40
-
| DASH-06 | Medium | All routes | No security headers / CSP / rate limiting / audit logging |Open (platform hardening) |
41
-
| DASH-07 | Low |`lib/privacy/consentLedger.ts`| Hash chain present but no signature; `prevHash` swallow-on-error |Open (sign chain head; fail-closed)|
50
+
| DASH-06 | Medium | All routes | No security headers / CSP / rate limiting / audit logging |**Resolved** — CSP+headers (next.config) + rate limit (middleware) |
51
+
| DASH-07 | Low |`lib/privacy/consentLedger.ts`| Hash chain present but no signature; `prevHash` swallow-on-error |**Resolved** — signed events; verify-on-export; fail-closed |
42
52
| DASH-08 | Low |`app/api/intent/route.ts`| Edge route reads unvalidated body; unbounded |**Resolved** — authn + body cap + validation |
0 commit comments