Skip to content

Commit 3c6c3f4

Browse files
committed
Expand the data collected on AWS secrets manager secrets
- Add last access date - Add owning service - Add the lambda function for rotation - Add a sub-resource for rotation rules Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 7f8e14b commit 3c6c3f4

File tree

4 files changed

+250
-0
lines changed

4 files changed

+250
-0
lines changed

providers/aws/resources/aws.lr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,8 @@ aws.secretsmanager.secret @defaults("arn name") {
16911691
description string
16921692
// KMS key used for encryption of the secret
16931693
kmsKey() aws.kms.key
1694+
// Last date the secret was accessed
1695+
lastAccessedDate time
16941696
// Last date the secret was changed
16951697
lastChangedDate time
16961698
// Last date the secret was automatically rotated
@@ -1699,14 +1701,30 @@ aws.secretsmanager.secret @defaults("arn name") {
16991701
name string
17001702
// Date of the next secret rotation
17011703
nextRotationDate time
1704+
// AWS service that created this secret (e.g., RDS, Redshift)
1705+
owningService string
17021706
// Primary region of the secret
17031707
primaryRegion string
17041708
// Whether rotation is enabled for the secret
17051709
rotationEnabled bool
1710+
// Lambda function used for automatic rotation
1711+
rotationLambda() aws.lambda.function
1712+
// Rotation schedule configuration
1713+
rotationRules() aws.secretsmanager.secret.rotationRules
17061714
// Tags for the secret
17071715
tags map[string]string
17081716
}
17091717

1718+
// AWS Secrets Manager secret rotation rules configuration
1719+
private aws.secretsmanager.secret.rotationRules {
1720+
// Number of days between automatic scheduled rotations
1721+
automaticallyAfterDays int
1722+
// Length of the rotation window in hours (e.g., "3h")
1723+
duration string
1724+
// Cron or rate expression defining the rotation schedule (e.g., "rate(12 hours)")
1725+
scheduleExpression string
1726+
}
1727+
17101728

17111729
// Amazon Elastic Container Service (ECS)
17121730
aws.ecs @defaults("clusters containers containerInstances") {

providers/aws/resources/aws.lr.go

Lines changed: 161 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/aws/resources/aws.lr.manifest.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,21 +3715,39 @@ resources:
37153715
min_mondoo_version: 9.0.0
37163716
kmsKey:
37173717
min_mondoo_version: 9.0.0
3718+
lastAccessedDate:
3719+
min_mondoo_version: 9.0.0
37183720
lastChangedDate:
37193721
min_mondoo_version: 9.0.0
37203722
lastRotatedDate:
37213723
min_mondoo_version: 9.0.0
37223724
name: {}
37233725
nextRotationDate:
37243726
min_mondoo_version: 9.0.0
3727+
owningService:
3728+
min_mondoo_version: 9.0.0
37253729
primaryRegion:
37263730
min_mondoo_version: 9.0.0
37273731
rotationEnabled: {}
3732+
rotationLambda:
3733+
min_mondoo_version: 9.0.0
3734+
rotationRules:
3735+
min_mondoo_version: 9.0.0
37283736
tags: {}
37293737
min_mondoo_version: 5.15.0
37303738
platform:
37313739
name:
37323740
- aws
3741+
aws.secretsmanager.secret.rotationRules:
3742+
fields:
3743+
automaticallyAfterDays: {}
3744+
duration: {}
3745+
scheduleExpression: {}
3746+
is_private: true
3747+
min_mondoo_version: 9.0.0
3748+
platform:
3749+
name:
3750+
- aws
37333751
aws.securityhub:
37343752
fields:
37353753
hubs: {}

0 commit comments

Comments
 (0)