fix(security): wire Blaqkenny issues #798 #799 #801 #805 into runtime… - #1067
Closed
Blaqkenny wants to merge 2 commits into
Closed
fix(security): wire Blaqkenny issues #798 #799 #801 #805 into runtime…#1067Blaqkenny wants to merge 2 commits into
Blaqkenny wants to merge 2 commits into
Conversation
…fcode#801 rinafcode#805 into runtime call paths Adds the missing runtime call sites for the four Blaqkenny-assigned security fixes that already shipped their services in PR rinafcode#957. - Issue rinafcode#798: ThreatDetectionService.analyzeRequest / recordFailure / reset wired into POST /auth/login (per-IP brute-force protection). - Issue rinafcode#801: forgot-password / reset-password / verify-email endpoints delegate to AuthTokensService; SHA-256-hashed tokens persisted end-to-end (no plaintext reset/verification tokens reach the User row). - Issue rinafcode#805: ContentSafetyService.scoreContent exposed via AutoModerationService.classifyContentSafety and combined in moderateContent (max of HF + content-safety) so a homoglyph bypass cannot pass either model. Tests: new auth.controller.spec.ts asserts the order of ThreatDetectionService calls in the login flow and that the new endpoints delegate to AuthTokensService. New auto-moderation.service.spec.ts asserts the new moderateContent / classifyContentSafety wrappers correctly invoke ContentSafetyService. Closes rinafcode#798, rinafcode#799, rinafcode#801, rinafcode#805.
) CI lint job failed with 7 errors on PR rinafcode#1067; this commit resolves them: - Consolidate two '@nestjs/common' import blocks in auth.controller.ts into one (alphabetically sorted). Fixes no-duplicate-imports. - Combine two '../../test/utils/mock-factories' import lines in auth.controller.spec.ts into one. Fixes no-duplicate-imports. - prettier auto-format via 'pnpm exec eslint --fix' resolves: - multi-line decorator import in auth.controller.ts - .fn() placement in mock chains in auth.controller.spec.ts - inline 'InvalidTokenException, ResourceNotFoundException' in auth.service.ts Resolves the CI 'validate / Run lint' failure. Net: 7 errors → 0 errors. The 1 remaining warning (unused isRS256Configured import in auth.service.ts) was pre-existing on main and does not fail CI.
Contributor
|
Great work done so far! |
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.
… call paths
Adds the missing runtime call sites for the four Blaqkenny-assigned security fixes that already shipped their services in PR #957.
Tests: new auth.controller.spec.ts asserts the order of ThreatDetectionService calls in the login flow and that the new endpoints delegate to AuthTokensService. New auto-moderation.service.spec.ts asserts the new moderateContent / classifyContentSafety wrappers correctly invoke ContentSafetyService.
Closes #798,
Closes #799,
Closes #801,
Closes #805.