Repository navigation
Conversation
policies/dr/checks.txt lists the curated checkov backup and DR checks (S3 versioning and replication, RDS backups and Multi-AZ, DynamoDB PITR, ElastiCache snapshots, encrypted Backup vaults, and the GCP and Azure equivalents); the SPK_DR_1 to SPK_DR_4 graph policies cover what the built-ins miss: RDS, EFS and DynamoDB in an aws_backup_selection, and backup plans with retention and a cross-region copy. The checkov composite gains checks, external-checks-dir and include-passed inputs and a results-json output so one install serves both the advisory and the strict run. dr-check-tofu.yml runs every DR check in advisory mode, turns the JSON into one updating PR comment grouped by resource with remediation and the suppressions that carry no reason (dr-report.py), then runs strict-checks as the gate. Fixtures hold a fully compliant stack and a stack that trips every control; CI runs the composite on both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
MegaLinter's v8r step maps policies/**/*.yaml to the aerleon schema from schemastore and fails on the checkov custom policies. Ignore that directory. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
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.
Closes #93. Stacked on #141 (
issue-6-iac-scan) for the checkov composite; retarget tomainonce that merges.What
policies/dr/checks.txt: the seven AWS checks from the issue plusCKV_GCP_78,CKV_GCP_14,CKV_AZURE_206,CKV_AZURE_94,CKV_AZURE_102,CKV_AZURE_129,CKV_AZURE_136,CKV_AZURE_230,CKV_AZURE_111(all present in checkov 3.3.27). One id per line with a comment, parsed withgrep -oE '^[A-Z_0-9]+'so docs: DR readiness — checklist, RTO/RPO tiers, and suppression conventions #95 can diff it against the checklist.policies/dr/spk_dr_{1..4}.yamlgraph policies:SPK_DR_1RDS instance or cluster connected to anaws_backup_selection,SPK_DR_2EFS connected,SPK_DR_3DynamoDB connected orpoint_in_time_recovery.enabled,SPK_DR_4every backup plan rule haslifecycle.delete_afterand acopy_action. The connection policies carry aresource_typefilter, because checkov's connection check otherwise also reports on the selection (a selection covering only EFS would fail the RDS rule).checkovcomposite (feat(#6): IaC misconfiguration scan reusable workflow — checkov #141 file): new inputschecks(--check),external-checks-dir,include-passed(drops--quiet, which otherwise removes skipped checks from the JSON) and outputresults-json;gate.shunchanged.dr-report.py(stdlib): groups failed checks by resource with the check name, checkov's guideline link and a remediation snippet per id, listscheckov:skipcomments without a reason (check_result.suppress_commentempty orNo comment provided) with a warning each, writes the<!-- dr-check -->comment and the step summary, outputsfailed-count,resource-count,unreasoned-skips.dr-check-tofu.yml: inputs from the issue pluscommentandactions-ref. Advisory run (all ids,fail-on-severity: none,include-passed), report, one updating PR comment (fork PRs skipped), artefact, then the strict run withstrict-checksandfail-on-severity: high.plan-jsonswitches to theterraform_planframework on the plan's directory;policies-refsparse-checks-outpolicies/drfrom another ref.DR Checkjob: composite on the compliant fixture (0 findings), the test suite, composite on the non-compliant fixture (11 findings) and the report over it.Tests
tests/dr-check/run.shruns real checkov over the fixtures: the compliant stack (versioned and replicated buckets, Multi-AZ RDS with retention, PITR table, ElastiCache snapshots, EFS, KMS-encrypted vault, plan with lifecycle and copy, selection covering RDS and EFS) yields zero findings; the non-compliant stack yields exactly one finding per control (11) and records two skips;dr-report.pyoutput is checked for the heading, grouping, ids, remediation, guideline links, the unreasoned skip listed and the reasoned one not, outputs and the clean heading.Deferred
🤖 Generated with Claude Code
https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF