Skip to content

Commit 3f94483

Browse files
tas50claude
andcommitted
⭐ Expand CloudTrail, GuardDuty, and Config resources
Add typed sub-resources and new fields to give users better insight into security configuration and compliance posture. CloudTrail: - Typed event selectors, advanced event selectors, and insight selectors (deprecating old dict-based fields) - Trail tags via ListTags API - Typed status fields (latestDeliveryTime, latestDeliveryError, etc.) GuardDuty: - Typed detector features (deprecating dict-based features field) - Publishing destinations with S3/KMS references - IP sets and threat intel sets - Coverage statistics - Enriched findings with accountId, resourceType, service, actionType, count, and resourceDetails Config: - Conformance packs with compliance status and per-rule compliance - Rule compliance details (per-resource evaluation results) - Rule remediation configuration - Delivery channel status (frequency, last delivery times, status) - Recorder recording strategy and exclusion resource types Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 90562a2 commit 3f94483

File tree

6 files changed

+3434
-72
lines changed

6 files changed

+3434
-72
lines changed

providers/aws/resources/aws.lr

Lines changed: 251 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,21 +2777,99 @@ private aws.guardduty.detector @defaults("id region") {
27772777
region string
27782778
// Status of the detector: ENABLED or DISABLED
27792779
status() string
2780-
// Feature set for the detector
2780+
// Deprecated: Use `featureConfigurations` instead
27812781
features() []dict
2782-
// Tags for the project
2782+
// Typed feature configurations for the detector
2783+
featureConfigurations() []aws.guardduty.detector.feature
2784+
// Tags for the detector
27832785
tags() map[string]string
2784-
// Publishing frequency for the detector
2786+
// Publishing frequency for the detector: FIFTEEN_MINUTES, ONE_HOUR, SIX_HOURS
27852787
findingPublishingFrequency() string
27862788
// List of active findings by the detector
27872789
findings() []aws.guardduty.finding
27882790
// Time when the detector was created
27892791
createdAt() time
27902792
// Time when the detector was last updated
27912793
updatedAt() time
2794+
// Publishing destinations where findings are exported
2795+
publishingDestinations() []aws.guardduty.detector.publishingDestination
2796+
// Trusted IP lists that suppress findings
2797+
ipSets() []aws.guardduty.detector.ipSet
2798+
// Custom threat intelligence sets
2799+
threatIntelSets() []aws.guardduty.detector.threatIntelSet
2800+
// Coverage statistics for runtime monitoring
2801+
coverageStatistics() []aws.guardduty.detector.coverageStatistic
2802+
}
2803+
2804+
// Amazon GuardDuty detector feature configuration
2805+
private aws.guardduty.detector.feature @defaults("name status") {
2806+
// Feature name: S3_DATA_EVENTS, EKS_AUDIT_LOGS, EBS_MALWARE_PROTECTION, RDS_LOGIN_EVENTS, EKS_RUNTIME_MONITORING, LAMBDA_NETWORK_LOGS, RUNTIME_MONITORING
2807+
name string
2808+
// Feature status: ENABLED, DISABLED
2809+
status string
2810+
// Time when the feature was last updated
2811+
updatedAt time
2812+
// Additional configuration for sub-features (varies per feature)
2813+
additionalConfiguration []dict
2814+
}
2815+
2816+
// Amazon GuardDuty detector publishing destination
2817+
private aws.guardduty.detector.publishingDestination @defaults("destinationType status") {
2818+
// Unique ID of the publishing destination
2819+
destinationId string
2820+
// Destination type: S3
2821+
destinationType string
2822+
// Publishing status: PUBLISHING, UNABLE_TO_PUBLISH_FIX_DESTINATION_PROPERTY, PENDING_VERIFICATION, STOPPED
2823+
status string
2824+
// S3 bucket where findings are published
2825+
s3Bucket() aws.s3.bucket
2826+
// KMS key used to encrypt published findings
2827+
kmsKey() aws.kms.key
27922828
}
27932829

2794-
// AWS Guard Duty finding
2830+
// Amazon GuardDuty detector trusted IP set
2831+
private aws.guardduty.detector.ipSet @defaults("name status") {
2832+
// Unique ID of the IP set
2833+
id string
2834+
// Name of the IP set
2835+
name string
2836+
// Format of the IP set file: TXT, STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, FIRE_EYE
2837+
format string
2838+
// S3 URI of the IP set file
2839+
location string
2840+
// Status: INACTIVE, ACTIVATING, ACTIVE, DEACTIVATING, ERROR, DELETE_PENDING, DELETED
2841+
status string
2842+
// Tags associated with the IP set
2843+
tags map[string]string
2844+
}
2845+
2846+
// Amazon GuardDuty detector threat intelligence set
2847+
private aws.guardduty.detector.threatIntelSet @defaults("name status") {
2848+
// Unique ID of the threat intel set
2849+
id string
2850+
// Name of the threat intel set
2851+
name string
2852+
// Format of the threat intel set file: TXT, STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, FIRE_EYE
2853+
format string
2854+
// S3 URI of the threat intel set file
2855+
location string
2856+
// Status: INACTIVE, ACTIVATING, ACTIVE, DEACTIVATING, ERROR, DELETE_PENDING, DELETED
2857+
status string
2858+
// Tags associated with the threat intel set
2859+
tags map[string]string
2860+
}
2861+
2862+
// Amazon GuardDuty detector coverage statistic
2863+
private aws.guardduty.detector.coverageStatistic @defaults("resourceType") {
2864+
// Resource type: EC2, ECS, EKS
2865+
resourceType string
2866+
// Number of covered resources
2867+
coveredCount int
2868+
// Number of uncovered resources
2869+
uncoveredCount int
2870+
}
2871+
2872+
// AWS GuardDuty finding
27952873
private aws.guardduty.finding @defaults("title region severity") {
27962874
// Unique ID for the finding
27972875
arn string
@@ -2813,6 +2891,18 @@ private aws.guardduty.finding @defaults("title region severity") {
28132891
createdAt time
28142892
// Updated at time
28152893
updatedAt time
2894+
// AWS account ID where the finding was generated
2895+
accountId string
2896+
// Type of resource involved in the finding (e.g., Instance, AccessKey, S3Bucket)
2897+
resourceType string
2898+
// AWS service that generated the finding
2899+
service string
2900+
// Type of action that triggered the finding (e.g., NETWORK_CONNECTION, AWS_API_CALL, DNS_REQUEST)
2901+
actionType string
2902+
// Number of times this finding has been generated
2903+
count int
2904+
// Detailed resource information for the finding
2905+
resourceDetails() dict
28162906
}
28172907

28182908
// Amazon Macie
@@ -4096,26 +4186,96 @@ private aws.cloudtrail.trail @defaults("name region") {
40964186
s3bucket() aws.s3.bucket
40974187
// ARN of the SNS topic that the trail uses to send notifications
40984188
snsTopicARN string
4099-
// JSON list of information about the trail
4189+
// Deprecated: Use individual status fields (isLogging, latestDeliveryTime, etc.) instead
41004190
status() dict
41014191
// Log group where trail files are delivered
41024192
logGroup() aws.cloudwatch.loggroup
41034193
// Role for logs endpoint to assume when writing to log group
41044194
cloudWatchLogsRoleArn string
41054195
// Group for logs endpoint to assume when writing to log group
41064196
cloudWatchLogsLogGroupArn string
4107-
// Settings for the trail's configured event selectors
4197+
// Deprecated: Use `eventSelectorEntries` instead
41084198
eventSelectors() []dict
4199+
// Typed event selector configuration for the trail
4200+
eventSelectorEntries() []aws.cloudtrail.trail.eventSelector
4201+
// Advanced event selectors configured for the trail
4202+
advancedEventSelectors() []aws.cloudtrail.trail.advancedEventSelector
41094203
// Region in which the trail was created (home region)
41104204
region string
41114205
// Whether CloudTrail Insights is enabled for the trail (detects unusual API activity)
41124206
hasInsightSelectors bool
4113-
// Insight selectors configured for the trail (ApiCallRateInsight, ApiErrorRateInsight)
4207+
// Deprecated: Use `insightSelectorEntries` instead
41144208
insightSelectors() []dict
4209+
// Typed insight selector configuration for the trail
4210+
insightSelectorEntries() []aws.cloudtrail.trail.insightSelector
41154211
// Whether custom event selectors are configured (enables data event logging for S3/Lambda/DynamoDB)
41164212
hasCustomEventSelectors bool
41174213
// Whether logging is currently enabled for the trail
41184214
isLogging() bool
4215+
// Tags associated with the trail
4216+
tags() map[string]string
4217+
// Time of the most recent delivery of log files to the trail's S3 bucket
4218+
latestDeliveryTime() time
4219+
// Time of the most recent notification sent to the trail's SNS topic
4220+
latestNotificationTime() time
4221+
// Time of the most recent log delivery to CloudWatch Logs
4222+
latestCloudWatchLogsDeliveryTime() time
4223+
// Most recent error message from delivering log files to S3
4224+
latestDeliveryError() string
4225+
// Time of the most recent digest file delivery to the trail's S3 bucket
4226+
latestDigestDeliveryTime() time
4227+
}
4228+
4229+
// AWS CloudTrail trail event selector
4230+
private aws.cloudtrail.trail.eventSelector @defaults("readWriteType") {
4231+
// Type of events to log: All, ReadOnly, WriteOnly
4232+
readWriteType string
4233+
// Whether management events are logged
4234+
includeManagementEvents bool
4235+
// Data resources for which events are logged
4236+
dataResources []aws.cloudtrail.trail.eventSelector.dataResource
4237+
// Management event sources to exclude (e.g., kms.amazonaws.com)
4238+
excludeManagementEventSources []string
4239+
}
4240+
4241+
// AWS CloudTrail trail event selector data resource
4242+
private aws.cloudtrail.trail.eventSelector.dataResource @defaults("type") {
4243+
// Resource type (e.g., AWS::S3::Object, AWS::Lambda::Function)
4244+
type string
4245+
// Resource ARN values (e.g., arn:aws:s3::: for all S3 objects)
4246+
values []string
4247+
}
4248+
4249+
// AWS CloudTrail trail advanced event selector
4250+
private aws.cloudtrail.trail.advancedEventSelector @defaults("name") {
4251+
// Name of the advanced event selector
4252+
name string
4253+
// Field selectors that make up this advanced event selector
4254+
fieldSelectors []aws.cloudtrail.trail.advancedEventSelector.fieldSelector
4255+
}
4256+
4257+
// AWS CloudTrail trail advanced event selector field selector
4258+
private aws.cloudtrail.trail.advancedEventSelector.fieldSelector @defaults("field") {
4259+
// Field to match (e.g., eventCategory, resources.type, readOnly)
4260+
field string
4261+
// Values that must equal the field value
4262+
equals []string
4263+
// Values that the field value must start with
4264+
startsWith []string
4265+
// Values that the field value must end with
4266+
endsWith []string
4267+
// Values that must not equal the field value
4268+
notEquals []string
4269+
// Values that the field value must not start with
4270+
notStartsWith []string
4271+
// Values that the field value must not end with
4272+
notEndsWith []string
4273+
}
4274+
4275+
// AWS CloudTrail trail insight selector
4276+
private aws.cloudtrail.trail.insightSelector @defaults("insightType") {
4277+
// Type of insight: ApiCallRateInsight, ApiErrorRateInsight
4278+
insightType string
41194279
}
41204280

41214281
// Amazon S3 bucket control
@@ -7671,6 +7831,8 @@ aws.config {
76717831
deliveryChannels() []aws.config.deliverychannel
76727832
// List of configuration aggregators
76737833
aggregators() []aws.config.aggregator
7834+
// List of conformance packs (pre-built compliance frameworks)
7835+
conformancePacks() []aws.config.conformancePack
76747836
}
76757837

76767838
// AWS Config rule
@@ -7691,6 +7853,44 @@ private aws.config.rule @defaults("name id region state") {
76917853
region string
76927854
// Compliance status of the rule: COMPLIANT, NON_COMPLIANT, NOT_APPLICABLE, INSUFFICIENT_DATA
76937855
complianceStatus() string
7856+
// Detailed compliance results for individual resources evaluated by this rule
7857+
complianceDetails() []aws.config.rule.complianceDetail
7858+
// Remediation configuration associated with this rule
7859+
remediation() aws.config.rule.remediation
7860+
}
7861+
7862+
// AWS Config rule compliance detail for an individual resource
7863+
private aws.config.rule.complianceDetail @defaults("resourceType resourceId complianceType") {
7864+
// Type of resource evaluated (e.g., AWS::EC2::Instance)
7865+
resourceType string
7866+
// ID of the resource evaluated
7867+
resourceId string
7868+
// Compliance type: COMPLIANT, NON_COMPLIANT
7869+
complianceType string
7870+
// Annotation from the evaluator explaining the result
7871+
annotation string
7872+
// Time when the evaluation was ordered
7873+
orderingTimestamp time
7874+
// Time when the result was recorded
7875+
resultRecordedTime time
7876+
}
7877+
7878+
// AWS Config rule remediation configuration
7879+
private aws.config.rule.remediation @defaults("targetType targetId") {
7880+
// Remediation target type: SSM_DOCUMENT
7881+
targetType string
7882+
// Remediation target ID (e.g., AWS-DisablePublicAccessForSecurityGroup)
7883+
targetId string
7884+
// Whether auto-remediation is enabled
7885+
automatic bool
7886+
// Maximum number of concurrent remediation executions (percentage)
7887+
maxConcurrentPercentage string
7888+
// Maximum number of concurrent remediation executions (count)
7889+
maxConcurrentCount string
7890+
// Number of seconds to wait before retrying a failed remediation
7891+
retryAttemptSeconds int
7892+
// Parameters passed to the remediation target
7893+
parameters dict
76947894
}
76957895

76967896
// AWS Config recorder
@@ -7713,6 +7913,10 @@ private aws.config.recorder @defaults("name region") {
77137913
region string
77147914
// Whether the recorder records specific resource types
77157915
resourceTypes []string
7916+
// Recording strategy: ALL_SUPPORTED_RESOURCE_TYPES, INCLUSION_BY_RESOURCE_TYPES, EXCLUSION_BY_RESOURCE_TYPES
7917+
recordingStrategy() string
7918+
// Resource types explicitly excluded from recording
7919+
exclusionByResourceTypes() []string
77167920
}
77177921

77187922
// AWS Config delivery channel
@@ -7727,6 +7931,46 @@ private aws.config.deliverychannel @defaults("name region") {
77277931
snsTopicARN string
77287932
// Region for the delivery channel
77297933
region string
7934+
// Frequency at which AWS Config delivers configuration snapshots: One_Hour, Three_Hours, Six_Hours, Twelve_Hours, TwentyFour_Hours
7935+
deliveryFrequency() string
7936+
// Time of the most recent successful delivery
7937+
lastSuccessfulDeliveryTime() time
7938+
// Time of the most recent failed delivery
7939+
lastFailedDeliveryTime() time
7940+
// Status of the last delivery attempt: SUCCESS, FAILURE, NOT_APPLICABLE
7941+
lastDeliveryStatus() string
7942+
}
7943+
7944+
// AWS Config conformance pack (pre-built compliance framework)
7945+
private aws.config.conformancePack @defaults("name region") {
7946+
// Name of the conformance pack
7947+
name string
7948+
// ARN of the conformance pack
7949+
arn string
7950+
// Region for the conformance pack
7951+
region string
7952+
// S3 bucket name where conformance pack artifacts are delivered
7953+
deliveryS3Bucket string
7954+
// S3 key prefix for conformance pack artifacts
7955+
deliveryS3KeyPrefix string
7956+
// Input parameters for the conformance pack
7957+
inputParameters []dict
7958+
// Time when the conformance pack was created
7959+
createdAt time
7960+
// Time of the last update request
7961+
lastUpdateRequestedTime time
7962+
// Overall compliance status: COMPLIANT, NON_COMPLIANT, INSUFFICIENT_DATA
7963+
complianceStatus() string
7964+
// Compliance status of individual rules within the conformance pack
7965+
ruleCompliance() []aws.config.conformancePack.ruleCompliance
7966+
}
7967+
7968+
// AWS Config conformance pack rule compliance
7969+
private aws.config.conformancePack.ruleCompliance @defaults("ruleName complianceType") {
7970+
// Name of the Config rule within the conformance pack
7971+
ruleName string
7972+
// Compliance type: COMPLIANT, NON_COMPLIANT, INSUFFICIENT_DATA
7973+
complianceType string
77307974
}
77317975

77327976
// AWS Config aggregator

0 commit comments

Comments
 (0)