Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01494hRBrpFog5PySYkZfNCU
- A failed list call now reads null instead of NOT_CONFIGURED/false/[]: DnssecValidation, DnsFirewall, QueryLogging, and OrphanedDnssecConfigs (which no longer lists every DNSSEC config when describe-vpcs fails). - A rule group whose rules could not be read has Rules: null, and the failure is logged at error level like the other calls. - DNS Firewall Advanced rules: DomainListName is null when there is no domain list; FirewallThreatProtectionId, DnsThreatProtection and ConfidenceThreshold are captured. - QueryLogging lists each association's ConfigId, Status and Error. - A failure building the evidence JSON is recorded and still writes a file. - Instructions rewritten to the authoring guide's layout and describe every DNSSEC, association and error value; fetcher added to the text-format contract check. - Tests: stub-CLI tests for the normal and failure paths; AWS fetcher count 80 -> 81; aws_discovery_beta gains a route53resolver type so test_every_service_an_aws_fetcher_reads_is_discovered passes. - CHANGELOG entry; docs/ksi_mapping.md regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01494hRBrpFog5PySYkZfNCU
|
Giving me too much credit Claude, it was just a different claude session that wrote the v1 not me lol |
Reviewers can see the payload from a GovCloud run without account identifiers. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Ran this against GovCloud with a read-only SSO permission set, one target each for Both targets exited 0 in about 4 seconds and wrote one envelope each. That permission set covered every call this fetcher makes ( What the live responses confirmed:
Still only covered by the stub tests, because the account I ran against has none of them: DNS Firewall rule groups (rule A sanitized |
Requested by Isaac Teuscher · Slack thread
Before: Nothing collected Route 53 Resolver settings. Whether a VPC validated DNSSEC, filtered its DNS queries through DNS Firewall, or logged its queries had to be shown by hand, and nothing flagged a DNSSEC config still pointing at a VPC that had been deleted.
After:
aws_route53_resolver_dns_security(EVD-R53-RESOLVER-DNS-SECURITY) writes one record per VPC per profile/region target. Each record hasDnssecValidation,DnsFirewall(Associated, plus each rule group with its rules'Actionand domain list or DNS Firewall Advanced threat protection) andQueryLogging(Enabled, plus each association'sStatusandError). It also writesOrphanedDnssecConfigs. A field whose AWS call failed reads null, not off or empty, and the run exits 1 with the AWS error inmetadata.error.How: A bash fetcher based on
aws/vpc_flow_logs. It makes five region-wide list calls (ec2 describe-vpcsand fourroute53resolverlist calls) plus onelist-firewall-rulesper associated rule group, then joins the results per VPC withjq. The AWS CLI v2 paginates the calls itself, and none of them turns that off. The fetcher uses the sharedaws.shhelpers (aws_target_id, failure classification,aws_finish).KSIs:
KSI-SVC-VCM,KSI-CNA-RNT,KSI-MLA-LET. Linear: PAR-91, PAR-1322 (query logging), PAR-1488 (DNS Firewall).Review changes on top of Isaac's version
NOT_CONFIGURED,falseor[].OrphanedDnssecConfigsis null whendescribe-vpcsor the DNSSEC list fails. Before this change, a faileddescribe-vpcslisted every DNSSEC config as orphaned.Rulesis null, and the failure is logged at error level like the other calls.DomainListNameis now null for them instead of"unknown".FirewallThreatProtectionId,DnsThreatProtectionandConfidenceThresholdare captured."unknown"now means only that the rule has a domain list id that can't be named.QueryLogging.ConfigIdsbecameQueryLogging.Associations, withConfigId,StatusandErrorfor each association, soACTION_NEEDEDandFAILEDassociations show in the evidence.Enabledis still true only forACTIVE.ValidationStatusvalues plusNOT_CONFIGURED, the association statuses and the query-log error codes. The fetcher is added to the text-format contract check intests/test_contracts.py.tests/test_aws_route53_resolver_dns_security.pyruns the fetcher against a stubawsCLI. It covers the normal case, a failed rule-group read, failed list calls and a failed VPC list.tests/test_aws_failure_classification.pygoes from 80 to 81.aws_discovery_betagets adns_firewall_associationtype, becausetest_every_service_an_aws_fetcher_reads_is_discoveredrequires discovery to coverroute53resolver.docs/ksi_mapping.mdis regenerated. The mapping on main was out of date, so the regeneration also addsaws_inspector_ecr_findings,aws_inspector_ecr_reportandazure_entra_sign_in_logs.Still needed
sample.json. A real GovCloud run is still needed, thenparamify samplesto sanitize it. CI doesn't require one, and about 39 other AWS fetchers don't have one either. No synthetic sample is committed.--queryshapes come from the AWS API reference and haven't been checked against a live account.route53profilesread. This hasn't been checked against AWS.USE_LOCAL_RESOURCE_SETTING/UPDATING_TO_USE_LOCAL_RESOURCE_SETTINGare passed through as AWS reports them. The instructions say onlyENABLEDproves validation is on.route53resolver list-resolver-query-log-configswould add each config'sDestinationArn, which shows where the query logs go. It needs one more IAM action.metadata.partial_failure/api_failures. The failure reason goes tometadata.errorthroughaws_finish.Validator ideas (not committed; validators aren't committed on fetcher branches)
DnssecValidation == "ENABLED".DnsFirewall.Associatedtrue with at least oneBLOCKrule on anAWSManaged*list. This passes once PAR-1488 is fixed and should accept ALERT during rollout.QueryLogging.Enabledtrue.OrphanedDnssecConfigsis empty, and noDefault: trueVPC exists.Testing
pytest -q -n auto: 8845 passed, 83 skipped, 0 failed.ruff check framework/andmypy framework/are clean.paramify listshows the fetcher as[fanout],catalogandksipass,describeworks for all 344 fetchers, andtools/cli_goldens.pypasses.--queryexpressions with jmespath: normal case, a VPC with no DNSSEC config, a default VPC, an orphaned DNSSEC config, a BLOCK rule on AWSManagedDomainsAggregateThreatList, and a DNS Firewall Advanced rule. Failure cases for sts, describe-vpcs, the DNSSEC list, one rule group, and three list calls together each exit 1, write the JSON, and put anot_authorizedreason in the status file.paramify runwith two region targets wrote one envelope per target.shellcheckreports only SC1091, the same as sibling fetchers. Not run: gitleaks, the Wiz scan, the TUI job, and Python 3.10–3.12/3.14 (only 3.13 locally).Generated by Claude Code