Skip to content

Expand 6 AWS services with security-focused resources#7160

Merged
tas50 merged 6 commits intomainfrom
expand-aws-security-resources
Apr 12, 2026
Merged

Expand 6 AWS services with security-focused resources#7160
tas50 merged 6 commits intomainfrom
expand-aws-security-resources

Conversation

@tas50
Copy link
Copy Markdown
Member

@tas50 tas50 commented Apr 11, 2026

Summary

  • EKS: Typed encryptionKmsKey()/encryptionResources() (deprecates encryptionConfig), upgradePolicy, zonalShiftConfig, computeConfig, storageConfig, remoteNetworkConfig on cluster; nodeRepairEnabled, nodegroupSubnets on nodegroup
  • Secrets Manager: type(), versions(), deletedAt() on secret; new secret.version resource
  • GuardDuty: New detector.filter (finding filters) and detector.member (member accounts) resources
  • CloudTrail: New eventDataStore (CloudTrail Lake) and channel (external event ingestion) resources
  • Security Hub: New member and enabledProduct resources; history() on finding; removes enabledStandards (breaking, v13.6.3 — replaced by standardSubscriptions)
  • Identity Center: New group and user resources from identity store; customerManagedPolicies(), permissionsBoundary() on permissionSet; replaces permissionSetArn with typed permissionSet() on accountAssignment (breaking, v13.6.3); adds identitystore SDK dependency

Deprecation

  • aws.eks.cluster.encryptionConfig (introduced v11.15.2, Sep 2023) deprecated in favor of encryptionKmsKey() + encryptionResources()

Test plan

  • make providers/build/aws && make providers/install/aws
  • mql run aws -c "aws.eks.clusters { encryptionKmsKey upgradePolicy }"
  • mql run aws -c "aws.secretsmanager.secrets { type versions }"
  • mql run aws -c "aws.guardduty.detectors { filters members }"
  • mql run aws -c "aws.cloudtrail.eventDataStores { name status }"
  • mql run aws -c "aws.cloudtrail.channels { name sourceType }"
  • mql run aws -c "aws.securityhub.hubs { members enabledProducts }"
  • mql run aws -c "aws.securityhub.hubs { findings { history } }"
  • mql run aws -c "aws.identitycenter.instances { groups users }"
  • mql run aws -c "aws.identitycenter.instances { permissionSets { customerManagedPolicies permissionsBoundary } }"
  • mql run aws -c "aws.identitycenter.instances { accountAssignments { permissionSet } }"

🤖 Generated with Claude Code

…erences

Adds sub-resources, typed references, and security-relevant fields across
GuardDuty, CloudTrail, Identity Center, EKS, Secrets Manager, and Security Hub
for deeper security posture visibility.

EKS: typed encryptionKmsKey/encryptionResources (deprecates encryptionConfig),
upgradePolicy, zonalShiftConfig, computeConfig, storageConfig, remoteNetworkConfig
on cluster; nodeRepairEnabled, nodegroupSubnets on nodegroup.

Secrets Manager: type, versions, deletedAt on secret; new secret.version resource.

GuardDuty: new detector.filter (finding filters with criteria/action/rank) and
detector.member (member accounts with relationship status) resources.

CloudTrail: new eventDataStore (Lake stores with retention, encryption, billing,
advanced event selectors) and channel (external event ingestion) resources.

Security Hub: new member and enabledProduct resources; finding history;
removes enabledStandards (breaking, v13.6.3 — replaced by standardSubscriptions).

Identity Center: new group and user resources from identity store; adds
customerManagedPolicies, permissionsBoundary to permissionSet; replaces
permissionSetArn with typed permissionSet() on accountAssignment (breaking,
v13.6.3); adds identitystore SDK dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tas50
Copy link
Copy Markdown
Member Author

tas50 commented Apr 11, 2026

Both breaking changes are currently unused and not announced yet so this is an acceptable breaking change

@github-actions

This comment has been minimized.

mondoo-code-review[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 11, 2026

Test Results

6 502 tests  ±0   6 498 ✅ ±0   2m 4s ⏱️ -1s
  459 suites ±0       4 💤 ±0 
   38 files   ±0       0 ❌ ±0 

Results for commit eed13de. ± Comparison against base commit 1f5e4e6.

♻️ This comment has been updated with latest results.

…resources

Backwards-compatible upgrade: existing string fields are deprecated (not removed)
and new typed reference methods are added alongside them.

- ec2.instanceConnectEndpoint: subnet(), vpc(), securityGroups()
- fsx.filesystem: subnets()
- fsx.cache: cacheSubnets()
- secretsmanager.secret.replicaRegion: kmsKey()
- securitylake.dataLake: s3Bucket()
- securitylake.subscriber: iamRole(), s3Bucket()
- cloudwatch.logDestination: iamRole()
- redshift.eventSubscription: snsTopic()
- rds.eventSubscription: snsTopic()
- directoryservice.vpcSettings: vpc(), securityGroup(), subnets()
- directoryservice.connectSettings: vpc(), securityGroup(), subnets()
- iam.role: permissionsBoundary()

Also updates expect.txt: adds AWSCURRENT/AWSPENDING/AWSPREVIOUS,
removes OTX/STIX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

This comment has been minimized.

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted .lr.versions entries for removed fields break version tracking conventions; new typed resource references look correct.

@mondoo-code-review mondoo-code-review bot dismissed their stale review April 11, 2026 19:38

Superseded by new review

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated fields restored as requested, maintaining backward compatibility.

Adds back aws.securityhub.hub.enabledStandards and
aws.identitycenter.accountAssignment.permissionSetArn with deprecation
comments pointing to their typed replacements (standardSubscriptions
and permissionSet respectively). This preserves backwards compatibility
for existing consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tas50 tas50 force-pushed the expand-aws-security-resources branch from 4ca0573 to d8764de Compare April 11, 2026 19:40
mondoo-code-review[bot]

This comment was marked as outdated.

… SM versions error handling

- CloudTrail channel sourceType() and source() both returned detail.Source;
  sourceType() now derives AWS_SERVICE vs CUSTOM from the channel name prefix
- GuardDuty filters() used a single ListFilters call missing pagination;
  switched to NewListFiltersPaginator to fetch all pages
- Secretsmanager versions() lacked access-denied handling; added
  Is400AccessDeniedError guard consistent with other list methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mondoo-code-review mondoo-code-review bot dismissed their stale review April 11, 2026 19:51

Superseded by new review

Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three previous critical/suggestion findings have been adequately addressed in this follow-up.

tas50 and others added 2 commits April 11, 2026 19:11
…field

ListRoles API never returns PermissionsBoundary (only GetRole does),
so the eagerly-set permissionsBoundaryArn was always empty. The new
permissionsBoundary() typed reference now calls GetRole on demand to
fetch the real value, and backfills permissionsBoundaryArn for
consistency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ey ID

- Rename aws.fsx.cache.cacheSubnets() → subnets() for consistency
  with the sibling aws.fsx.filesystem resource
- Guard secretsmanager replicaRegion kmsKey() against non-ARN values
  (the API can return a key ID or alias, not just an ARN)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tas50 tas50 merged commit 78fcbcf into main Apr 12, 2026
22 checks passed
@tas50 tas50 deleted the expand-aws-security-resources branch April 12, 2026 02:24
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant