fix: P0 security remediation wave B — null checks, role enforcement, HMAC audit, hookSecret encryption#1683
Merged
OneStepAt4time merged 1 commit intodevelopfrom Apr 12, 2026
Merged
Conversation
…HMAC audit, hookSecret encryption
Contributor
There was a problem hiding this comment.
❌ REQUEST CHANGES — CodeQL failing.
Code quality is excellent — all 4 fixes are correct, well-tested, and backward compatible. But CodeQL is red. Per non-negotiable rules: never merge without CI green.
Please check the CodeQL finding and either fix it or request a re-run if it's a false positive.
This was referenced Apr 12, 2026
Closed
Closed
Closed
Closed
Closed
Closed
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.
Summary
Fixes the remaining 5 P0 CRITICAL security issues identified in the security audit (wave B, following PR #1681 which addressed O0-1/O0-2/O0-3).
Issues Fixed
Changes
\src/audit.ts\ (O0-6)
\src/server.ts\ (O0-4, O0-5, O0-8)
egisterPermissionRoutes\ to pass
esolveRole\ and lazy \getAuditLogger\
\src/permission-routes.ts\ (O0-4, O0-5)
esolveRole\ when provided — viewer is denied approve/reject
\src/session.ts\ (O0-8)
estoreSessionHookSecrets()\ detects and decrypts AES-GCM ciphertext on load
Quality Gate
\
npx tsc --noEmit ✅ clean
npm run build ✅ passed
npm test ✅ 2798 passed, 29 skipped, 0 failed (158 test files)
\\
Aegis version
Developed with: v0.3.2-alpha