Commit a60836a
⭐ Expand Security Hub with standards controls, findings, and insights (#7156)
* ⭐ Expand Security Hub with standards controls, findings, automation rules, and insights
Add typed resources for comprehensive Security Hub querying:
- standardSubscription: enabled standards with status
- standardControl: individual controls with pass/fail status, severity, remediation URLs
- finding: ASFF findings with severity, compliance status, workflow state, affected resources
- automationRule: rule metadata with status and execution order
- insight + insightResult: saved filters with computed result aggregations
This enables queries like:
aws.securityhub.hubs { standardSubscriptions { controls.where(controlStatus == "ENABLED") { controlId severity title } } }
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 Fix error handling, perf, and logic issues in Security Hub resources
Fix duplicate arn/productArn on findings (arn was incorrectly set to
ProductArn), swallowed error in insight filters, by-value copy of large
finding struct in hot loop, off-by-one in 1000-finding cap, and
misleading standard name (was raw ARN). Replace custom strPtr/int32Ptr
with sdk aws.String/aws.Int32.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🧹 Address review: migrate deprecated API, fix severityScore type
- Replace deprecated DescribeStandardsControls with
ListSecurityControlDefinitions + BatchGetStandardsControlAssociations
- Rename severityScore float → severityNormalized int to match SDK type
(*int32 range 0-100, not a decimal value)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🐛 Fix standardNameFromArn to handle ruleset/ prefix
CIS standards use "ruleset/" instead of "standards/" in their ARN
(e.g., arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/...).
Handle both prefixes so all standard names are human-readable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🟢 Add unit tests for Security Hub standardNameFromArn
Tests all ARN formats: standards/, ruleset/, PCI-DSS, NIST,
no-match fallback, empty string, and ARN without version suffix.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 🧹 Update permissions for new Security Hub APIs
Replace deprecated DescribeStandardsControls with
BatchGetStandardsControlAssociations and ListSecurityControlDefinitions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 📄 Document that permissions.json must always be committed
It tracks IAM permissions required by each provider and changes
to it are part of the PR, not throwaway build artifacts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 📄 Note that expect.txt removals are fine if CI passes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent bf0486f commit a60836a
File tree
7 files changed
+1818
-7
lines changed- providers/aws/resources
7 files changed
+1818
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
486 | 487 | | |
487 | 488 | | |
488 | 489 | | |
| |||
565 | 566 | | |
566 | 567 | | |
567 | 568 | | |
568 | | - | |
| 569 | + | |
569 | 570 | | |
570 | 571 | | |
571 | 572 | | |
| |||
585 | 586 | | |
586 | 587 | | |
587 | 588 | | |
| 589 | + | |
588 | 590 | | |
589 | 591 | | |
590 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3035 | 3035 | | |
3036 | 3036 | | |
3037 | 3037 | | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
3038 | 3178 | | |
3039 | 3179 | | |
3040 | 3180 | | |
| |||
0 commit comments