feat(rules): add NIS2 and DORA compliance coverage#109
Open
pszymkowiak wants to merge 1 commit into
Open
Conversation
Add cybersecurity risk-management measures from Directive (EU) 2022/2555 (NIS2 art. 21(2)) and Regulation (EU) 2022/2554 (DORA) to the supported compliance frameworks. Cloud rules across AWS/Azure/GCP, IAM, Entra ID, O365 and Google Workspace are now tagged so findings expose NIS2 and DORA controls alongside existing CIS / ISO-27001 / SOC-2 / PCI-DSS / HIPAA / NIST-800-53 mappings. - compliance-mapping.toml: register NIS2 (10 controls, art. 21(2)(a-j)) and DORA (14 controls across art. 5, 8, 9, 10-13, 17, 19, 24, 28, 30). - 151 inline [[rules.compliance]] blocks injected across 9 cloud rule files. - Process-only controls (governance, incident reporting timeframes, third-party contracts, resilience testing programmes) are declared with empty rule_patterns to make non-automatable scope explicit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
81228ee to
a38467c
Compare
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
rules/compliance-mapping.toml.[[rules.compliance]]blocks across 9 cloud rule files (aws-cis,aws-iam-cis,azure-cis,azure-iam-cis,gcp-cis,gcp-iam-cis,entra-id-cis,o365-cis,google-workspace-cis) so engine findings now surface NIS2 / DORA control references in the same way as CIS / ISO-27001 / SOC-2 / PCI-DSS / HIPAA / NIST-800-53.rule_patternsto make their non-automatable scope explicit — they cannot be evidenced by configuration scanning alone.Coverage at a glance
Test plan
cargo test -p kxn-rules— 27 tests pass; TOML parser accepts all new framework strings.python3 -c "import tomllib; tomllib.load(open(f,'rb'))"for every modified file — re-parse OK.rule_patternscross-checked against actual rulenamefields — zero orphans.kxn list-rules --include aws-cis-1.4-no-root-access-keys— rule loads cleanly with new compliance blocks.cargo check --workspace,cargo test --workspace,clippy -D warningson Linux + macOS.Notes
crates/kxn-rules/src/parser.rs) so no API change is required.compliance-mapping.tomlremains a reference/documentation file (engine skips it explicitly incrates/kxn-cli/src/commands/monitor.rs). The inline blocks are what the engine reads.🤖 Generated with Claude Code