feat: HIPAA.Security + NIST.800.53.R5 remediation docs, fix NIST prefix fallback#146
Open
AditSKumar wants to merge 1 commit into
Open
Conversation
…ix fallback Add curated RuleDoc entries for the most commonly-hit HIPAA.Security and NIST.800.53.R5 rules (S3 versioning/SSL, RDS encryption, CloudTrail logging/validation, IAM admin-access policies), so the fix loop has actionable remediation hints for these packs, not just AwsSolutions. While verifying the prefix-level fallback per the issue's acceptance criteria, found the existing NIST.800-53. prefix default never matched a real rule ID -- cdk-nag's actual pack name/prefix is NIST.800.53.R5- (verified against node_modules/cdk-nag/lib/packs/nist-800-53-r5.js and upstream RULES.md). Fixed it to the correct prefix. Closes alphacrack#139
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.
Adds curated
RuleDocentries for the most commonly-hitHIPAA.SecurityandNIST.800.53.R5rules (S3 versioning/SSL, RDS encryption, CloudTrail logging/validation, IAM admin-access policies), giving the fix loop actionable remediation hints for these packs, not justAwsSolutions.While verifying the prefix-level fallback per the acceptance criteria, I found the existing
NIST.800-53.prefix default never matched a real rule ID — cdk-nag's actual pack name/prefix isNIST.800.53.R5-(verified againstnode_modules/cdk-nag/lib/packs/nist-800-53-r5.jsand upstreamRULES.md). Fixed it to the correct prefix.Only
src/ruleDocs.tsand its new test file change, per the issue's scope note.What changed
HIPAA.Security-*entries + 6 curatedNIST.800.53.R5-*entries (mirrored pairs, since the underlying cdk-nag checks are shared across packs)NIST.800-53.prefix fallback to the correctNIST.800.53.R5-src/test/ruleDocs.test.tsasserting new exact entries resolve, both prefix fallbacks resolve for an uncurated id, and curated-id counts meet the ≥6/≥6 acceptance barHow this was tested
npm run compile— cleannpm test(node:test sandbox suite) — 12/12 passnpm run test:jest— 195/196 pass. The one failure (validateFileTool.test.ts) is pre-existing and unrelated to this change — a hardcoded POSIX path assertion that produces backslashes under Windows path resolution. Not touched by this PR.npm run lint— clean on the files this PR touchesCloses #139