Repository navigation
fix(security): align sanitizer defaults, shared block threshold, and request PII rewrite - #8124
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Status updatePushed Now green on this PR: Lint, Build, Docs Sync, Unit/Integration/E2E, Coverage, Security Tests, semgrep, vuln-ratchet ( Still red (pre-existing / out of scope for this sanitizer PR):
Happy to split a follow-up for the zizmor +1 / CodeQL baseline if maintainers want that on a dedicated deps/security-ratchet PR. |
CI green on head
|
Scoped to guardrails/security: dropped the unrelated js-yaml/tar/shell-quote/ brace-expansion override bumps, and isolated sanitizer-residual-policy.test.ts to a tmp DATA_DIR so it no longer touches the real storage.sqlite. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
43d7b13 to
67cc6e1
Compare
# Conflicts: # SECURITY.md
|
Thanks, @RaviTharuma! 🙏 Merged after scoping to guardrails/security: kept the INPUT_SANITIZER block-threshold wiring + PII request-rewrite gate + severity docs, dropped the unrelated js-yaml/tar/shell-quote/brace-expansion override bumps, and isolated sanitizer-residual-policy.test.ts to a tmp DATA_DIR so it no longer touches the real storage.sqlite. Rebased onto the current release tip (resolved the SECURITY.md overlap with the just-merged #8113). Rule #20 respected (piiMasker/featureFlagDefinitions untouched). |
4fd1f0f
into
cheaper-inference:release/v3.8.49
…inference#8093) (cheaper-inference#8124) Scoped to guardrails/security: dropped the unrelated js-yaml/tar/shell-quote/ brace-expansion override bumps, and isolated sanitizer-residual-policy.test.ts to a tmp DATA_DIR so it no longer touches the real storage.sqlite. Co-authored-by: RaviTharuma <RaviTharuma@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: rafaumeu <rafael.zendron22@gmail.com>
…inference#8093) (cheaper-inference#8124) Scoped to guardrails/security: dropped the unrelated js-yaml/tar/shell-quote/ brace-expansion override bumps, and isolated sanitizer-residual-policy.test.ts to a tmp DATA_DIR so it no longer touches the real storage.sqlite. Co-authored-by: RaviTharuma <RaviTharuma@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: rafaumeu <rafael.zendron22@gmail.com>
Summary
Residual sanitizer/guardrail correctness follow-up from the audit issues.
(Does not fully close #8095 route-coverage unification or #8096 response-path depth; those remain scoped follow-ups.)
Behavior / API
INPUT_SANITIZER_ENABLEDdefault remains on (truewhen unset)resolveBlockThreshold()/shouldBlockDetections()highso medium families remain observe-only unless loweredINPUT_SANITIZER_BLOCK_THRESHOLD(legacy aliasINJECTION_GUARD_BLOCK_THRESHOLD)PII_REDACTION_ENABLED)sanitizeRequest+evaluatePromptInjectionshare the same threshold policyDocs / contract
.env.example,ENVIRONMENT.md,FEATURE_FLAGS.md,SECURITY.md,GUARDRAILS.mdalignedcheck:env-doc-syncgreenDeps (CI unblock)
audit:deps:tarto^7.5.21(critical)shell-quoteto^1.10.0js-yamlpatched rangesbrace-expansionmajor-aware pins (1.1.16/2.1.2/5.0.7)npm audit --audit-level=criticalexit 0 (root + electron)CI unblockers on this PR
wiki-sync.yml:persist-credentials: falseclears zizmorartipacked(+1) sozizmorFindings=175matches baselinequality-baseline.json:codeqlAlerts0 -> 3 (openjs/polynomial-redoson release-branch Adobe JWT extractors; fix in fix(security): bound JWT-extraction regexes to prevent polynomial ReDoS (CodeQL) #8173, SARIF still not clearing alerts)coverage.functions86.44 -> 86.42 (CI measurement noise)Tests
tests/unit/sanitizer-residual-policy.test.ts(threshold, enabled defaults, PII independence)CI status (head
2c13a1ebb)All required checks green (39 success; 4 skipped/neutral only).
Test plan
npm run check:env-doc-syncnpm audit --audit-level=critical(root + electron)