fix(cloud-iam): harden time and config contracts#60
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d0b82ae2b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "rules", | ||
| ) | ||
| ) | ||
| CLOUD_IAM_ATTACK_MAPPING_FIELDS = frozenset(("id", "name", "tactic", "reference")) |
There was a problem hiding this comment.
Reject mismatched ATT&CK mapping ids
With the new strict-field contract, raw attack_mappings may now contain an id, but validate_attack_mapping never checks that value—it always emits the YAML mapping key as the id. When a reviewer edits or copies a mapping and mistypes this now-whitelisted nested id, validation succeeds and silently discards the configured value, so the hardening no longer catches ATT&CK mapping identity mistakes in the config.
Useful? React with 👍 / 👎.
Summary
Validation
Privacy / safety