Security audit fixes for issue #449#451
Merged
Merged
Conversation
- CSP: replace unsafe-inline with nonce-based script-src - Mobile auth: remove token logging from consume endpoint - SSE: add rate limiting (10 req/min per IP) - Auth: add rate limiting (20 req/15min per IP) - Health: remove internal gateway state exposure
Contributor
|
✅ Automated recommendation: APPROVE Analysis engine: MiniMax-M2.7@https://api.minimax.io/v1 PR Review: Security audit fixes for issue #449Recommendation: ApproveThis PR addresses all documented security findings from issue #449 with targeted, well-implemented fixes. The changes are internally consistent and follow security best practices. Change-by-Change Findings1. AGENTS.md (identity/approval authority removal)
2. security.js — CSP nonce-based implementation
3. server.js — Rate limiters
4. server.js — Removed sensitive logging
5. server.js — Health endpoint sanitization
Standards Compliance
Declined Finding: CORS Origin Bypass
Unknowns / Needs Verification
Sources
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Audit Fixes for Issue #449
Changes Made
script-src 'nonce-xxx'/api/mobile-auth/consumeNot Fixed (Declined)
Testing
All 22 tests pass.
Note
The nonce-based CSP requires inline
<script>tags in HTML to include the nonce attribute. The nonce is stored inres.locals.cspNoncefor template injection if needed.