@intentius/chant-lexicon-aws 0.124.30 → 0.124.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/dynamodb.js +41 -0
- package/dist/actions/ecr.js +9 -0
- package/dist/actions/ecs.js +5 -0
- package/dist/actions/iam.js +3 -0
- package/dist/actions/index.js +9 -0
- package/dist/actions/lambda.js +11 -0
- package/dist/actions/logs.js +4 -0
- package/dist/actions/s3.js +40 -0
- package/dist/actions/sns.js +5 -0
- package/dist/actions/sqs.js +15 -0
- package/dist/agentcore/trace-fetch.d.ts.map +1 -1
- package/dist/agentcore/trace-fetch.js +472 -0
- package/dist/agentcore/trace-render.js +359 -0
- package/dist/ambient.js +148 -0
- package/dist/api/credential-chain.d.ts +30 -3
- package/dist/api/credential-chain.d.ts.map +1 -1
- package/dist/api/credential-chain.js +509 -0
- package/dist/api/read-client.d.ts +16 -43
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/api/read-client.js +458 -0
- package/dist/api/sigv4.d.ts +4 -4
- package/dist/api/sigv4.js +185 -0
- package/dist/behaviour-kinds.js +114 -0
- package/dist/caller-identity.d.ts +3 -5
- package/dist/caller-identity.d.ts.map +1 -1
- package/dist/caller-identity.js +146 -0
- package/dist/codegen/docs-cli.js +2 -0
- package/dist/codegen/docs.js +120 -0
- package/dist/codegen/enum-overlay.js +162 -0
- package/dist/codegen/extensions.js +139 -0
- package/dist/codegen/fallback.js +32 -0
- package/dist/codegen/generate-cli.js +15 -0
- package/dist/codegen/generate-lexicon.js +70 -0
- package/dist/codegen/generate-typescript.js +226 -0
- package/dist/codegen/generate.d.ts.map +1 -1
- package/dist/codegen/generate.js +234 -0
- package/dist/codegen/naming.js +135 -0
- package/dist/codegen/package.js +67 -0
- package/dist/codegen/patches.d.ts +26 -1
- package/dist/codegen/patches.d.ts.map +1 -1
- package/dist/codegen/patches.js +90 -0
- package/dist/codegen/property-overlay.js +85 -0
- package/dist/codegen/property-overlay.json +1 -16
- package/dist/codegen/sam.js +402 -0
- package/dist/codegen/typecheck.js +4 -0
- package/dist/codegen/versions.js +31 -0
- package/dist/components/__tests__/mock-cloud-executor.js +326 -0
- package/dist/components/apply.d.ts +44 -1
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +752 -0
- package/dist/components/builders.js +37 -0
- package/dist/components/capability-plugin.js +66 -0
- package/dist/components/cloud-executor.d.ts +35 -0
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +576 -0
- package/dist/components/config-bom.js +207 -0
- package/dist/components/host-delivery.js +117 -0
- package/dist/components/index.js +18 -0
- package/dist/components/job-submission.js +77 -0
- package/dist/components/publish.js +234 -0
- package/dist/components/safety.js +62 -0
- package/dist/components/wait-aws.js +68 -0
- package/dist/composites/agentcore-agent.js +187 -0
- package/dist/composites/agentcore-trust-policy.js +13 -0
- package/dist/composites/alb-shared.js +84 -0
- package/dist/composites/bucket-deployment.js +93 -0
- package/dist/composites/catalog.js +2714 -0
- package/dist/composites/dynamodb-table.js +66 -0
- package/dist/composites/ec2-instance-bundle.js +75 -0
- package/dist/composites/ec2-instance-role.js +26 -0
- package/dist/composites/ecr-repository.js +64 -0
- package/dist/composites/ecs-trust-policy.js +10 -0
- package/dist/composites/efs-with-access-point.js +44 -0
- package/dist/composites/eks-cluster.js +118 -0
- package/dist/composites/fargate-alb.js +216 -0
- package/dist/composites/fargate-service.js +222 -0
- package/dist/composites/index.js +28 -0
- package/dist/composites/lambda-api.js +15 -0
- package/dist/composites/lambda-dynamodb.js +77 -0
- package/dist/composites/lambda-eventbridge.js +27 -0
- package/dist/composites/lambda-function.js +54 -0
- package/dist/composites/lambda-s3.js +93 -0
- package/dist/composites/lambda-sns.js +23 -0
- package/dist/composites/lambda-sqs.js +34 -0
- package/dist/composites/landing-zone.js +82 -0
- package/dist/composites/microvm-app.js +293 -0
- package/dist/composites/minimal-vpc.js +40 -0
- package/dist/composites/monitoring-stack.js +105 -0
- package/dist/composites/nlb-service.js +61 -0
- package/dist/composites/rds-instance.js +98 -0
- package/dist/composites/scheduled-lambda.js +28 -0
- package/dist/composites/solr-fargate-service.js +33 -0
- package/dist/composites/step-functions-workflow.js +78 -0
- package/dist/composites/vpc-default.js +132 -0
- package/dist/condition.js +43 -0
- package/dist/coverage.js +4 -0
- package/dist/deep-observe.d.ts.map +1 -1
- package/dist/deep-observe.js +709 -0
- package/dist/deep-topology.js +226 -0
- package/dist/default-tags.js +50 -0
- package/dist/defaults.js +85 -0
- package/dist/dependencies.js +269 -0
- package/dist/detect.js +21 -0
- package/dist/disruption.d.ts.map +1 -1
- package/dist/disruption.js +129 -0
- package/dist/effect-receipt-row.js +107 -0
- package/dist/generated/index.d.ts +1297 -82
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +12382 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +131 -0
- package/dist/identity-observe.d.ts.map +1 -1
- package/dist/identity-observe.js +127 -0
- package/dist/import/generator.js +757 -0
- package/dist/import/live-export.js +34 -0
- package/dist/import/parser.js +394 -0
- package/dist/index.js +69 -0
- package/dist/integrity.json +6 -6
- package/dist/intrinsics.js +393 -0
- package/dist/lint/audit-catalog.js +87 -0
- package/dist/lint/audit-lineage.js +150 -0
- package/dist/lint/post-synth/cf-refs.js +247 -0
- package/dist/lint/post-synth/cor020.js +60 -0
- package/dist/lint/post-synth/ext001.d.ts.map +1 -1
- package/dist/lint/post-synth/ext001.js +197 -0
- package/dist/lint/post-synth/index.js +124 -0
- package/dist/lint/post-synth/waw010.js +41 -0
- package/dist/lint/post-synth/waw011.js +41 -0
- package/dist/lint/post-synth/waw013.js +38 -0
- package/dist/lint/post-synth/waw014.js +42 -0
- package/dist/lint/post-synth/waw015.js +88 -0
- package/dist/lint/post-synth/waw016.d.ts.map +1 -1
- package/dist/lint/post-synth/waw016.js +116 -0
- package/dist/lint/post-synth/waw017.js +43 -0
- package/dist/lint/post-synth/waw018.js +61 -0
- package/dist/lint/post-synth/waw019.js +64 -0
- package/dist/lint/post-synth/waw020.js +56 -0
- package/dist/lint/post-synth/waw021.js +44 -0
- package/dist/lint/post-synth/waw022.js +36 -0
- package/dist/lint/post-synth/waw023.js +40 -0
- package/dist/lint/post-synth/waw024.js +46 -0
- package/dist/lint/post-synth/waw025.js +36 -0
- package/dist/lint/post-synth/waw026.js +38 -0
- package/dist/lint/post-synth/waw027.js +41 -0
- package/dist/lint/post-synth/waw028.js +39 -0
- package/dist/lint/post-synth/waw029.js +54 -0
- package/dist/lint/post-synth/waw030.js +282 -0
- package/dist/lint/post-synth/waw031.js +58 -0
- package/dist/lint/post-synth/waw032.js +45 -0
- package/dist/lint/post-synth/waw033.js +75 -0
- package/dist/lint/post-synth/waw034.js +52 -0
- package/dist/lint/post-synth/waw035.js +56 -0
- package/dist/lint/post-synth/waw036.js +79 -0
- package/dist/lint/post-synth/waw037.js +67 -0
- package/dist/lint/post-synth/waw038.js +42 -0
- package/dist/lint/post-synth/waw039.js +42 -0
- package/dist/lint/post-synth/waw040.js +45 -0
- package/dist/lint/post-synth/waw041.js +40 -0
- package/dist/lint/post-synth/waw042.js +99 -0
- package/dist/lint/post-synth/waw043.js +51 -0
- package/dist/lint/post-synth/waw044.js +64 -0
- package/dist/lint/post-synth/waw045.js +49 -0
- package/dist/lint/post-synth/waw046.js +52 -0
- package/dist/lint/post-synth/waw047.js +43 -0
- package/dist/lint/post-synth/waw048.js +40 -0
- package/dist/lint/post-synth/waw049.js +78 -0
- package/dist/lint/post-synth/waw050.js +44 -0
- package/dist/lint/post-synth/waw051.js +41 -0
- package/dist/lint/post-synth/waw052.js +43 -0
- package/dist/lint/post-synth/waw053.js +43 -0
- package/dist/lint/post-synth/waw054.js +41 -0
- package/dist/lint/post-synth/waw055.js +41 -0
- package/dist/lint/post-synth/waw056.js +65 -0
- package/dist/lint/post-synth/waw057.js +43 -0
- package/dist/lint/post-synth/waw058.js +61 -0
- package/dist/lint/post-synth/waw059.js +338 -0
- package/dist/lint/post-synth/waw060.js +83 -0
- package/dist/lint/post-synth/waw061.js +60 -0
- package/dist/lint/post-synth/waw062.js +0 -0
- package/dist/lint/post-synth/waw063.js +0 -0
- package/dist/lint/post-synth/waw064.js +45 -0
- package/dist/lint/post-synth/waw065.js +104 -0
- package/dist/lint/post-synth/waw066.js +145 -0
- package/dist/lint/post-synth/waw067.js +115 -0
- package/dist/lint/post-synth/waw068.js +69 -0
- package/dist/lint/post-synth/waw069.js +0 -0
- package/dist/lint/rules/hardcoded-region.js +38 -0
- package/dist/lint/rules/iam-wildcard.js +60 -0
- package/dist/lint/rules/index.js +6 -0
- package/dist/lint/rules/s3-encryption.js +60 -0
- package/dist/live-attrs.js +42 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +18 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +66 -0
- package/dist/manifest.json +1 -1
- package/dist/mapping.js +33 -0
- package/dist/meta.json +17359 -784
- package/dist/nested-stack.js +95 -0
- package/dist/okf/index.md +203 -0
- package/dist/okf/rules/EXT001.md +1 -0
- package/dist/okf/rules/WAW016.md +2 -0
- package/dist/okf/rules/WAW019.md +1 -0
- package/dist/okf/rules/WAW028.md +1 -0
- package/dist/okf/rules/WAW030.md +2 -0
- package/dist/okf/rules/WAW039.md +1 -0
- package/dist/okf/rules/WAW049.md +1 -0
- package/dist/okf/rules/WAW056.md +1 -0
- package/dist/okf/rules/WAW058.md +1 -0
- package/dist/okf/rules/WAW062.md +1 -0
- package/dist/okf/rules/WAW064.md +1 -0
- package/dist/okf/rules/WAW065.md +1 -0
- package/dist/okf/rules/WAW066.md +1 -0
- package/dist/okf/rules/WAW067.md +1 -0
- package/dist/okf/rules/WAW068.md +1 -0
- package/dist/okf/rules/WAW069.md +4 -0
- package/dist/okf/types/AIWorkloadConfig.md +23 -0
- package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
- package/dist/okf/types/AccountAccessApplication.md +28 -0
- package/dist/okf/types/AccountAccessEntitlement.md +22 -0
- package/dist/okf/types/ActionTarget.md +20 -0
- package/dist/okf/types/AdConfiguration.md +21 -0
- package/dist/okf/types/Adapter.md +26 -0
- package/dist/okf/types/AgentContext.md +35 -0
- package/dist/okf/types/AgentGoal.md +31 -0
- package/dist/okf/types/AgentProfile.md +34 -0
- package/dist/okf/types/Alarm.md +3 -1
- package/dist/okf/types/AlarmModel.md +14 -9
- package/dist/okf/types/AmplifyWebhook.md +25 -0
- package/dist/okf/types/ApiCache.md +8 -8
- package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
- package/dist/okf/types/AppAuthorization.md +35 -0
- package/dist/okf/types/AppBlockBuilder.md +1 -0
- package/dist/okf/types/AppInstance.md +2 -2
- package/dist/okf/types/AppInstanceBot.md +2 -2
- package/dist/okf/types/AppStreamFleet.md +3 -2
- package/dist/okf/types/AppSyncApiKey.md +6 -6
- package/dist/okf/types/AppSyncType.md +22 -0
- package/dist/okf/types/ApplicationStatusCheck.md +36 -0
- package/dist/okf/types/ApplicationVersion.md +4 -1
- package/dist/okf/types/ApplicationsList.md +26 -0
- package/dist/okf/types/ApprovalPolicy.md +28 -0
- package/dist/okf/types/ArchiveRule.md +24 -0
- package/dist/okf/types/Asset.md +30 -0
- package/dist/okf/types/Backup.md +31 -0
- package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
- package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
- package/dist/okf/types/BedrockSession.md +28 -0
- package/dist/okf/types/BillEstimate.md +35 -0
- package/dist/okf/types/Brand.md +32 -0
- package/dist/okf/types/CallAnalyticsCategory.md +25 -0
- package/dist/okf/types/Campaign.md +28 -0
- package/dist/okf/types/CapacityProvider.md +30 -0
- package/dist/okf/types/Case.md +24 -0
- package/dist/okf/types/CertificateAssociation.md +13 -0
- package/dist/okf/types/ChangeSet.md +36 -0
- package/dist/okf/types/ChannelFlow.md +29 -0
- package/dist/okf/types/ChimeChannel.md +39 -0
- package/dist/okf/types/Classifier.md +6 -6
- package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
- package/dist/okf/types/ClientVpnEndpoint.md +2 -0
- package/dist/okf/types/ClientVpnRoute.md +5 -5
- package/dist/okf/types/CloudConnector.md +29 -0
- package/dist/okf/types/Cluster.md +39 -0
- package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
- package/dist/okf/types/CodeCommitRepository.md +12 -12
- package/dist/okf/types/CodeConnectionsHost.md +26 -0
- package/dist/okf/types/CodeRepository.md +5 -5
- package/dist/okf/types/CompositeAlarm.md +1 -0
- package/dist/okf/types/ComputeEnvironment.md +2 -0
- package/dist/okf/types/ComputeNodeGroup.md +1 -1
- package/dist/okf/types/ComputeQuota.md +34 -0
- package/dist/okf/types/ConfigRule.md +1 -1
- package/dist/okf/types/ConfigurationRecorder.md +7 -6
- package/dist/okf/types/ConnectAttachment.md +2 -0
- package/dist/okf/types/ConnectQueue.md +5 -1
- package/dist/okf/types/ConnectVocabulary.md +28 -0
- package/dist/okf/types/ConnectionType.md +24 -0
- package/dist/okf/types/ConsentPortal.md +33 -0
- package/dist/okf/types/ContactMethod.md +29 -0
- package/dist/okf/types/ContainerAssociation.md +26 -0
- package/dist/okf/types/ContainerFleet.md +1 -1
- package/dist/okf/types/ContainerGroupDefinition.md +1 -1
- package/dist/okf/types/Content.md +40 -0
- package/dist/okf/types/ContentAssociation.md +28 -0
- package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
- package/dist/okf/types/CustomEntityType.md +4 -9
- package/dist/okf/types/Customization.md +22 -0
- package/dist/okf/types/CwIntegration.md +31 -0
- package/dist/okf/types/DAXParameterGroup.md +3 -8
- package/dist/okf/types/DAXSubnetGroup.md +0 -5
- package/dist/okf/types/DBClusterEndpoint.md +31 -0
- package/dist/okf/types/DBProxyTargetGroup.md +1 -0
- package/dist/okf/types/DBSnapshot.md +62 -0
- package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
- package/dist/okf/types/DLPSetting.md +31 -0
- package/dist/okf/types/DMSInstanceProfile.md +1 -1
- package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
- package/dist/okf/types/Daemon.md +1 -0
- package/dist/okf/types/DataExchangeDataSet.md +29 -0
- package/dist/okf/types/DataIntegrationFlow.md +27 -0
- package/dist/okf/types/DataMigration.md +1 -1
- package/dist/okf/types/DataProvider.md +2 -1
- package/dist/okf/types/DataQualityRuleset.md +6 -11
- package/dist/okf/types/DataSource.md +23 -0
- package/dist/okf/types/Dataset.md +20 -0
- package/dist/okf/types/DatasetIntegration.md +23 -0
- package/dist/okf/types/DbCluster.md +1 -1
- package/dist/okf/types/DbInstance.md +8 -2
- package/dist/okf/types/DeadlineBudget.md +29 -0
- package/dist/okf/types/DelegationSet.md +23 -0
- package/dist/okf/types/DeliveryChannel.md +6 -11
- package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
- package/dist/okf/types/DevOpsAgentService.md +1 -0
- package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
- package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
- package/dist/okf/types/Directory.md +60 -0
- package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
- package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
- package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
- package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
- package/dist/okf/types/Domain.md +27 -0
- package/dist/okf/types/EKSCertificateAuthority.md +42 -0
- package/dist/okf/types/EKSCluster.md +8 -0
- package/dist/okf/types/EcSnapshot.md +66 -0
- package/dist/okf/types/EmailIdentityCertificate.md +15 -0
- package/dist/okf/types/EndpointConfig.md +14 -13
- package/dist/okf/types/EntityRecognizer.md +27 -0
- package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
- package/dist/okf/types/EnvironmentEC2.md +13 -13
- package/dist/okf/types/EvaluationForm.md +1 -0
- package/dist/okf/types/Evaluator.md +6 -2
- package/dist/okf/types/EventAction.md +26 -0
- package/dist/okf/types/EventRule.md +2 -0
- package/dist/okf/types/EventSource.md +30 -0
- package/dist/okf/types/EventTracker.md +22 -0
- package/dist/okf/types/EventsV2EventBus.md +28 -0
- package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
- package/dist/okf/types/EventsV2Subscriber.md +39 -0
- package/dist/okf/types/ExperimentDefinition.md +39 -0
- package/dist/okf/types/ExperimentRun.md +33 -0
- package/dist/okf/types/ExperimentTrialComponent.md +13 -11
- package/dist/okf/types/FHIRDatastore.md +3 -0
- package/dist/okf/types/FSxSnapshot.md +5 -5
- package/dist/okf/types/FSxVolume.md +9 -9
- package/dist/okf/types/FeaturedResultsSet.md +26 -0
- package/dist/okf/types/Feed.md +1 -0
- package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
- package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
- package/dist/okf/types/FileCache.md +45 -0
- package/dist/okf/types/Filter.md +27 -0
- package/dist/okf/types/Firewall.md +6 -0
- package/dist/okf/types/FlowMediaStream.md +28 -0
- package/dist/okf/types/FlowOutput.md +1 -0
- package/dist/okf/types/FpgaImage.md +38 -0
- package/dist/okf/types/Function.md +2 -2
- package/dist/okf/types/Gateway.md +41 -0
- package/dist/okf/types/GatewayClusterAssociations.md +23 -0
- package/dist/okf/types/GatewayRateLimit.md +26 -0
- package/dist/okf/types/GatewayRule.md +32 -0
- package/dist/okf/types/GlobalReplicationGroup.md +3 -0
- package/dist/okf/types/GlobalResolver.md +1 -1
- package/dist/okf/types/GlobalTable.md +1 -0
- package/dist/okf/types/GlueConnection.md +5 -4
- package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
- package/dist/okf/types/GlueSession.md +38 -0
- package/dist/okf/types/GlueTable.md +5 -10
- package/dist/okf/types/GlueWorkflow.md +5 -10
- package/dist/okf/types/Group.md +27 -0
- package/dist/okf/types/Harness.md +1 -0
- package/dist/okf/types/HostKey.md +33 -0
- package/dist/okf/types/HostedZone.md +1 -0
- package/dist/okf/types/HttpApi.md +2 -0
- package/dist/okf/types/HttpNamespace.md +5 -5
- package/dist/okf/types/HubV2.md +1 -0
- package/dist/okf/types/HumanTaskUi.md +22 -0
- package/dist/okf/types/IPv4Pool.md +28 -0
- package/dist/okf/types/ImageBuilder.md +1 -0
- package/dist/okf/types/ImageBuilderImage.md +1 -1
- package/dist/okf/types/ImagePipeline.md +1 -1
- package/dist/okf/types/InferenceComponent.md +5 -1
- package/dist/okf/types/InfluxDBBackup.md +65 -0
- package/dist/okf/types/InfluxDBCluster.md +3 -0
- package/dist/okf/types/InfrastructureConfiguration.md +2 -0
- package/dist/okf/types/IngestionDestination.md +28 -0
- package/dist/okf/types/InputSecurityGroup.md +6 -4
- package/dist/okf/types/InspectorV2Connector.md +38 -0
- package/dist/okf/types/InstanceEventWindow.md +25 -0
- package/dist/okf/types/InstanceFleetConfig.md +10 -10
- package/dist/okf/types/InstanceGroupConfig.md +3 -3
- package/dist/okf/types/InstrumentationConfig.md +31 -0
- package/dist/okf/types/IntegrationAssociation.md +3 -0
- package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
- package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
- package/dist/okf/types/IoTSiteWiseTask.md +24 -0
- package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
- package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
- package/dist/okf/types/Job.md +35 -0
- package/dist/okf/types/JobTemplate.md +26 -0
- package/dist/okf/types/KinesisChannel.md +31 -0
- package/dist/okf/types/KinesisStream.md +1 -0
- package/dist/okf/types/LambdaResourcePolicy.md +14 -0
- package/dist/okf/types/Lexicon.md +34 -0
- package/dist/okf/types/LicenseAssetGroup.md +23 -0
- package/dist/okf/types/LicenseConfiguration.md +33 -0
- package/dist/okf/types/LicenseServerEndpoint.md +32 -0
- package/dist/okf/types/LightsailKeyPair.md +29 -0
- package/dist/okf/types/LimitsProfile.md +27 -0
- package/dist/okf/types/LocationAzureBlob.md +2 -1
- package/dist/okf/types/LocationObjectStorage.md +1 -0
- package/dist/okf/types/LogAlarm.md +2 -0
- package/dist/okf/types/MGNConnector.md +23 -0
- package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
- package/dist/okf/types/MLTransform.md +15 -15
- package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
- package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
- package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
- package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
- package/dist/okf/types/MediaConvertQueue.md +8 -10
- package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
- package/dist/okf/types/MediaLiveInput.md +41 -18
- package/dist/okf/types/MediaPackageV2Channel.md +3 -0
- package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
- package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
- package/dist/okf/types/MediaTailorFunction.md +27 -0
- package/dist/okf/types/MedicalVocabulary.md +21 -0
- package/dist/okf/types/Member.md +26 -0
- package/dist/okf/types/Memory.md +6 -0
- package/dist/okf/types/MemoryDBSnapshot.md +29 -0
- package/dist/okf/types/Metric.md +59 -0
- package/dist/okf/types/MetricAttribution.md +23 -0
- package/dist/okf/types/MicrosoftAD.md +11 -11
- package/dist/okf/types/MigrationProject.md +8 -1
- package/dist/okf/types/Monitor.md +26 -0
- package/dist/okf/types/NFSFileShare.md +44 -0
- package/dist/okf/types/NeptuneGraphGraph.md +1 -0
- package/dist/okf/types/NetworkConnector.md +4 -0
- package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
- package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
- package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
- package/dist/okf/types/NotebookInstance.md +18 -18
- package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
- package/dist/okf/types/NotifyConfiguration.md +35 -0
- package/dist/okf/types/OTelEnrichment.md +2 -0
- package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
- package/dist/okf/types/OrganizationConfigRule.md +7 -7
- package/dist/okf/types/Outpost.md +32 -0
- package/dist/okf/types/ParallelData.md +40 -0
- package/dist/okf/types/Partition.md +5 -5
- package/dist/okf/types/PaymentConnector.md +4 -1
- package/dist/okf/types/Pentest.md +1 -0
- package/dist/okf/types/PerfReports.md +28 -0
- package/dist/okf/types/PermissionAssociation.md +30 -0
- package/dist/okf/types/PersonalizeDataset.md +1 -0
- package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
- package/dist/okf/types/PersonalizeSchema.md +1 -0
- package/dist/okf/types/Pipeline.md +25 -0
- package/dist/okf/types/PlaybackConfiguration.md +1 -0
- package/dist/okf/types/PolicyAssociation.md +1 -1
- package/dist/okf/types/PolicyGrant.md +2 -2
- package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
- package/dist/okf/types/PortalProduct.md +24 -0
- package/dist/okf/types/PrefetchSchedule.md +25 -0
- package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
- package/dist/okf/types/PrincipalAssociation.md +27 -0
- package/dist/okf/types/PrivateDnsNamespace.md +8 -8
- package/dist/okf/types/PrivateVirtualInterface.md +1 -0
- package/dist/okf/types/ProcurementPortalPreference.md +45 -0
- package/dist/okf/types/Program.md +33 -0
- package/dist/okf/types/ProjectMembership.md +1 -1
- package/dist/okf/types/ProtocolsList.md +26 -0
- package/dist/okf/types/PublicDnsNamespace.md +7 -7
- package/dist/okf/types/PublicVirtualInterface.md +1 -0
- package/dist/okf/types/QEV2IdcApplication.md +25 -0
- package/dist/okf/types/QueryLoggingConfig.md +21 -0
- package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
- package/dist/okf/types/QuickSightAssignment.md +24 -0
- package/dist/okf/types/RAMResourceAssociation.md +27 -0
- package/dist/okf/types/RDSClusterSnapshot.md +54 -0
- package/dist/okf/types/RDSDBParameterGroup.md +5 -0
- package/dist/okf/types/RDSDeployment.md +41 -0
- package/dist/okf/types/RcsAgent.md +38 -0
- package/dist/okf/types/ReceiptRule.md +5 -5
- package/dist/okf/types/ReceiptRuleSet.md +1 -6
- package/dist/okf/types/RecommenderFilter.md +27 -0
- package/dist/okf/types/RecommenderSchema.md +25 -0
- package/dist/okf/types/RecordSet.md +16 -22
- package/dist/okf/types/RecoveryPlan.md +28 -0
- package/dist/okf/types/RedshiftIdcApplication.md +31 -0
- package/dist/okf/types/RedshiftSnapshot.md +59 -0
- package/dist/okf/types/RegistrationAttachment.md +28 -0
- package/dist/okf/types/Registry.md +41 -0
- package/dist/okf/types/RegistryRecord.md +38 -0
- package/dist/okf/types/RelatedItem.md +24 -0
- package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
- package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
- package/dist/okf/types/ReplicationTask.md +14 -14
- package/dist/okf/types/ReportGenerator.md +29 -0
- package/dist/okf/types/ReportGroup.md +1 -3
- package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
- package/dist/okf/types/ResilienceHubV2Service.md +1 -0
- package/dist/okf/types/ResourceConfiguration.md +1 -1
- package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
- package/dist/okf/types/RestApi.md +1 -0
- package/dist/okf/types/RetrievalInstruction.md +32 -0
- package/dist/okf/types/RouterOutput.md +1 -0
- package/dist/okf/types/Rule.md +31 -0
- package/dist/okf/types/RunCache.md +29 -0
- package/dist/okf/types/Runtime.md +2 -1
- package/dist/okf/types/SCNInstance.md +33 -0
- package/dist/okf/types/SDBDomain.md +2 -2
- package/dist/okf/types/SMBFileShare.md +49 -0
- package/dist/okf/types/SageMakerArtifact.md +27 -0
- package/dist/okf/types/SageMakerEndpoint.md +0 -1
- package/dist/okf/types/ScalableTarget.md +1 -0
- package/dist/okf/types/ScalingPlan.md +6 -6
- package/dist/okf/types/ScheduledReport.md +31 -0
- package/dist/okf/types/SecondaryNetwork.md +26 -0
- package/dist/okf/types/SecurityAgentArtifact.md +25 -0
- package/dist/okf/types/SecurityAgentIntegration.md +31 -0
- package/dist/okf/types/Server.md +1 -0
- package/dist/okf/types/ServerlessCache.md +2 -0
- package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
- package/dist/okf/types/ServerlessRepoApplication.md +32 -0
- package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
- package/dist/okf/types/SipMediaApplication.md +27 -0
- package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
- package/dist/okf/types/SnapshotCopyGrant.md +20 -0
- package/dist/okf/types/Solution.md +1 -0
- package/dist/okf/types/SourceAssociation.md +25 -0
- package/dist/okf/types/SourceCredential.md +6 -6
- package/dist/okf/types/SourceNetwork.md +23 -0
- package/dist/okf/types/StackFleetAssociation.md +2 -7
- package/dist/okf/types/StorageTierPolicy.md +20 -0
- package/dist/okf/types/StorageVirtualMachine.md +9 -9
- package/dist/okf/types/Stream.md +28 -0
- package/dist/okf/types/SubnetCidrReservation.md +26 -0
- package/dist/okf/types/SubscriptionProvider.md +26 -0
- package/dist/okf/types/SupportPermit.md +29 -0
- package/dist/okf/types/Table.md +2 -1
- package/dist/okf/types/TableOptimizer.md +5 -10
- package/dist/okf/types/Tape.md +31 -0
- package/dist/okf/types/Template.md +36 -0
- package/dist/okf/types/Tenant.md +2 -0
- package/dist/okf/types/Terminology.md +39 -0
- package/dist/okf/types/Thesaurus.md +25 -0
- package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
- package/dist/okf/types/Topic.md +1 -0
- package/dist/okf/types/TopicRuleDestination.md +1 -0
- package/dist/okf/types/TrafficPolicy.md +26 -0
- package/dist/okf/types/TrafficPolicyInstance.md +28 -0
- package/dist/okf/types/TranscribeVocabulary.md +27 -0
- package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
- package/dist/okf/types/TransitVirtualInterface.md +1 -0
- package/dist/okf/types/Tunnel.md +25 -0
- package/dist/okf/types/UsageLimit.md +26 -0
- package/dist/okf/types/UseCase.md +23 -0
- package/dist/okf/types/User.md +47 -0
- package/dist/okf/types/VPCEndpoint.md +1 -1
- package/dist/okf/types/VPCEndpointService.md +6 -0
- package/dist/okf/types/VPCPeeringConnection.md +2 -2
- package/dist/okf/types/VPNConcentrator.md +1 -1
- package/dist/okf/types/VPNConnection.md +1 -1
- package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
- package/dist/okf/types/View.md +27 -0
- package/dist/okf/types/VoiceConnector.md +30 -0
- package/dist/okf/types/Volume.md +44 -0
- package/dist/okf/types/Vpc.md +1 -1
- package/dist/okf/types/VpcAttachment.md +2 -0
- package/dist/okf/types/WebFunction.md +27 -0
- package/dist/okf/types/WebFunctionEndpoint.md +44 -0
- package/dist/okf/types/WebFunctionRevision.md +32 -0
- package/dist/okf/types/WickrNetwork.md +27 -0
- package/dist/okf/types/Worker.md +29 -0
- package/dist/okf/types/Workforce.md +26 -0
- package/dist/okf/types/Workload.md +35 -0
- package/dist/okf/types/WorkloadEstimate.md +35 -0
- package/dist/okf/types/Workspace.md +28 -0
- package/dist/okf/types/Workteam.md +8 -8
- package/dist/op/activities/aws-apply.js +214 -0
- package/dist/op/activities/floci.js +97 -0
- package/dist/op/activities/index.js +32 -0
- package/dist/op/builders.js +50 -0
- package/dist/ownership.js +52 -0
- package/dist/package-cli.js +25 -0
- package/dist/parameter.js +19 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1006 -0
- package/dist/properties.js +166 -0
- package/dist/pseudo.js +25 -0
- package/dist/receipt-store.d.ts.map +1 -1
- package/dist/receipt-store.js +233 -0
- package/dist/reference-catalog.js +106 -0
- package/dist/rules/ext001.ts +3 -3
- package/dist/rules/waw016.ts +2 -2
- package/dist/serializer.js +529 -0
- package/dist/spec/fetch.js +193 -0
- package/dist/spec/parse.js +259 -0
- package/dist/spec/pin.js +185 -0
- package/dist/spec/pinned-types.json +203 -0
- package/dist/stack-errors.js +14 -0
- package/dist/taggable.d.ts.map +1 -1
- package/dist/taggable.js +33 -0
- package/dist/teardown.js +199 -0
- package/dist/template-sections.js +53 -0
- package/dist/template-transform.js +50 -0
- package/dist/types/index.d.ts +18847 -1124
- package/dist/validate-cli.js +16 -0
- package/dist/validate.js +33 -0
- package/package.json +9 -9
- package/src/agentcore/trace-fetch.ts +2 -1
- package/src/api/credential-chain.ts +119 -9
- package/src/api/credential-isolation.test.ts +72 -0
- package/src/api/read-client-chain.test.ts +159 -0
- package/src/api/read-client.ts +42 -6
- package/src/api/sigv4.ts +4 -4
- package/src/caller-identity.ts +3 -5
- package/src/codegen/any-budget.test.ts +12 -2
- package/src/codegen/generate.ts +9 -0
- package/src/codegen/package.ts +2 -2
- package/src/codegen/patches.test.ts +95 -0
- package/src/codegen/patches.ts +53 -9
- package/src/codegen/property-overlay.json +1 -16
- package/src/components/apply.ts +218 -6
- package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
- package/src/components/cfn-plan.test.ts +225 -16
- package/src/components/cloud-executor.ts +73 -25
- package/src/deep-observe.ts +2 -1
- package/src/disruption.ts +2 -1
- package/src/generated/index.d.ts +18847 -1124
- package/src/generated/index.ts +1376 -161
- package/src/generated/lexicon-aws.json +17359 -784
- package/src/identity-observe.ts +2 -1
- package/src/lint/post-synth/ext001.ts +3 -3
- package/src/lint/post-synth/waw016.ts +2 -2
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +2 -1
- package/src/receipt-store.ts +2 -1
- package/src/spec/pin.ts +3 -3
- package/src/spec/pinned-types.json +203 -0
- package/src/taggable.ts +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW043: KMS Key Rotation Disabled
|
|
3
|
+
*
|
|
4
|
+
* Flags customer-managed KMS keys without EnableKeyRotation: true. Skips
|
|
5
|
+
* asymmetric/HMAC keys (a non-default KeySpec) — AWS does not support
|
|
6
|
+
* automatic rotation for those.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
function supportsRotation(props) {
|
|
10
|
+
const keySpec = props.KeySpec;
|
|
11
|
+
if (keySpec === undefined)
|
|
12
|
+
return true; // default is SYMMETRIC_DEFAULT
|
|
13
|
+
if (isIntrinsic(keySpec))
|
|
14
|
+
return false; // can't statically verify — don't guess
|
|
15
|
+
return keySpec === "SYMMETRIC_DEFAULT";
|
|
16
|
+
}
|
|
17
|
+
export function checkKmsKeyRotation(ctx) {
|
|
18
|
+
const diagnostics = [];
|
|
19
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
20
|
+
const template = parseCFTemplate(output);
|
|
21
|
+
if (!template?.Resources)
|
|
22
|
+
continue;
|
|
23
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
24
|
+
if (resource.Type !== "AWS::KMS::Key")
|
|
25
|
+
continue;
|
|
26
|
+
const props = resource.Properties ?? {};
|
|
27
|
+
if (!supportsRotation(props))
|
|
28
|
+
continue;
|
|
29
|
+
const rotation = props.EnableKeyRotation;
|
|
30
|
+
if (isIntrinsic(rotation))
|
|
31
|
+
continue;
|
|
32
|
+
if (rotation !== true) {
|
|
33
|
+
diagnostics.push({
|
|
34
|
+
checkId: "WAW043",
|
|
35
|
+
severity: "warning",
|
|
36
|
+
message: `KMS key "${logicalId}" does not have EnableKeyRotation: true — enable automatic annual key rotation`,
|
|
37
|
+
entity: logicalId,
|
|
38
|
+
lexicon: "aws",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return diagnostics;
|
|
44
|
+
}
|
|
45
|
+
export const waw043 = {
|
|
46
|
+
id: "WAW043",
|
|
47
|
+
description: "KMS customer-managed key does not have automatic key rotation enabled",
|
|
48
|
+
check(ctx) {
|
|
49
|
+
return checkKmsKeyRotation(ctx);
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW044: ALB HTTP Listener Not Redirecting To HTTPS (full tier)
|
|
3
|
+
*
|
|
4
|
+
* Flags load balancer Listener resources on Protocol: HTTP whose
|
|
5
|
+
* DefaultActions don't redirect to HTTPS — the listener serves plaintext
|
|
6
|
+
* traffic instead of upgrading it. Access logging is WAW024; this covers
|
|
7
|
+
* transport security on the listener itself.
|
|
8
|
+
*
|
|
9
|
+
* Tier-aware (#917), same seam as WAW040/WAW052 (#894): a relaxed "light"
|
|
10
|
+
* stack (local/Floci, or no --env/ownership.env set) only warns, since the
|
|
11
|
+
* light tier is intentionally HTTP-only with no ACM cert to redirect to; the
|
|
12
|
+
* strict "full"/production tier (ctx.env === "prod"/"production"/"full", the
|
|
13
|
+
* existing #201 env seam — see isFullTierEnv) fails the build.
|
|
14
|
+
*/
|
|
15
|
+
import { parseCFTemplate, isIntrinsic, isFullTierEnv } from "./cf-refs.js";
|
|
16
|
+
function redirectsToHttps(actions) {
|
|
17
|
+
if (!Array.isArray(actions))
|
|
18
|
+
return false;
|
|
19
|
+
return actions.some((action) => {
|
|
20
|
+
if (typeof action !== "object" || action === null)
|
|
21
|
+
return false;
|
|
22
|
+
const a = action;
|
|
23
|
+
if (a.Type !== "redirect")
|
|
24
|
+
return false;
|
|
25
|
+
const redirectConfig = a.RedirectConfig;
|
|
26
|
+
if (typeof redirectConfig !== "object" || redirectConfig === null)
|
|
27
|
+
return false;
|
|
28
|
+
return redirectConfig.Protocol === "HTTPS";
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export function checkAlbHttpRedirect(ctx) {
|
|
32
|
+
const diagnostics = [];
|
|
33
|
+
const severity = isFullTierEnv(ctx.env) ? "error" : "warning";
|
|
34
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
35
|
+
const template = parseCFTemplate(output);
|
|
36
|
+
if (!template?.Resources)
|
|
37
|
+
continue;
|
|
38
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
39
|
+
if (resource.Type !== "AWS::ElasticLoadBalancingV2::Listener")
|
|
40
|
+
continue;
|
|
41
|
+
const props = resource.Properties ?? {};
|
|
42
|
+
const protocol = props.Protocol;
|
|
43
|
+
if (isIntrinsic(protocol) || protocol !== "HTTP")
|
|
44
|
+
continue;
|
|
45
|
+
if (!redirectsToHttps(props.DefaultActions)) {
|
|
46
|
+
diagnostics.push({
|
|
47
|
+
checkId: "WAW044",
|
|
48
|
+
severity,
|
|
49
|
+
message: `Listener "${logicalId}" is HTTP and does not redirect to HTTPS — add a redirect DefaultAction (Protocol: HTTPS) on the full/production tier`,
|
|
50
|
+
entity: logicalId,
|
|
51
|
+
lexicon: "aws",
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return diagnostics;
|
|
57
|
+
}
|
|
58
|
+
export const waw044 = {
|
|
59
|
+
id: "WAW044",
|
|
60
|
+
description: "ALB HTTP listener does not redirect to HTTPS (full tier)",
|
|
61
|
+
check(ctx) {
|
|
62
|
+
return checkAlbHttpRedirect(ctx);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW045: ALB Weak Or Missing TLS Policy
|
|
3
|
+
*
|
|
4
|
+
* Flags HTTPS/TLS listeners without a modern SslPolicy (TLS 1.2+). The
|
|
5
|
+
* account-wide default (`ELBSecurityPolicy-2016-08`) still allows TLS 1.0, so
|
|
6
|
+
* a missing SslPolicy is flagged the same as an explicit legacy one.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
const SECURE_PROTOCOLS = new Set(["HTTPS", "TLS"]);
|
|
10
|
+
/** AWS's predefined TLS 1.2+ policies all carry a "-1-2-" or "-1-3-" segment (FS/TLS13 variants included). */
|
|
11
|
+
function isModernTlsPolicy(policy) {
|
|
12
|
+
return /-1-2-|-1-3-/.test(policy);
|
|
13
|
+
}
|
|
14
|
+
export function checkAlbTlsPolicy(ctx) {
|
|
15
|
+
const diagnostics = [];
|
|
16
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
17
|
+
const template = parseCFTemplate(output);
|
|
18
|
+
if (!template?.Resources)
|
|
19
|
+
continue;
|
|
20
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
21
|
+
if (resource.Type !== "AWS::ElasticLoadBalancingV2::Listener")
|
|
22
|
+
continue;
|
|
23
|
+
const props = resource.Properties ?? {};
|
|
24
|
+
const protocol = props.Protocol;
|
|
25
|
+
if (isIntrinsic(protocol) || typeof protocol !== "string" || !SECURE_PROTOCOLS.has(protocol))
|
|
26
|
+
continue;
|
|
27
|
+
const sslPolicy = props.SslPolicy;
|
|
28
|
+
if (isIntrinsic(sslPolicy))
|
|
29
|
+
continue;
|
|
30
|
+
if (typeof sslPolicy !== "string" || !isModernTlsPolicy(sslPolicy)) {
|
|
31
|
+
diagnostics.push({
|
|
32
|
+
checkId: "WAW045",
|
|
33
|
+
severity: "error",
|
|
34
|
+
message: `Listener "${logicalId}" (${protocol}) ${sslPolicy ? `uses SslPolicy "${sslPolicy}"` : "has no SslPolicy set"} — use a TLS 1.2+ predefined policy (e.g. ELBSecurityPolicy-TLS13-1-2-2021-06)`,
|
|
35
|
+
entity: logicalId,
|
|
36
|
+
lexicon: "aws",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return diagnostics;
|
|
42
|
+
}
|
|
43
|
+
export const waw045 = {
|
|
44
|
+
id: "WAW045",
|
|
45
|
+
description: "ALB HTTPS/TLS listener does not use a modern (TLS 1.2+) SslPolicy",
|
|
46
|
+
check(ctx) {
|
|
47
|
+
return checkAlbTlsPolicy(ctx);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW046: ECS Secret-Looking Value In Plaintext Environment
|
|
3
|
+
*
|
|
4
|
+
* Flags ECS TaskDefinition container `Environment` entries whose name looks
|
|
5
|
+
* like a credential (password/secret/token/key/credential) — those values are
|
|
6
|
+
* visible in the task definition and console. They should be passed via
|
|
7
|
+
* `Secrets` (Secrets Manager / SSM Parameter Store) instead.
|
|
8
|
+
*/
|
|
9
|
+
import { parseCFTemplate, getContainerDefinitions, isIntrinsic } from "./cf-refs.js";
|
|
10
|
+
const SECRET_NAME_PATTERN = /password|secret|token|api[_-]?key|credential/i;
|
|
11
|
+
export function checkEcsPlaintextSecrets(ctx) {
|
|
12
|
+
const diagnostics = [];
|
|
13
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
14
|
+
const template = parseCFTemplate(output);
|
|
15
|
+
if (!template?.Resources)
|
|
16
|
+
continue;
|
|
17
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
18
|
+
if (resource.Type !== "AWS::ECS::TaskDefinition")
|
|
19
|
+
continue;
|
|
20
|
+
for (const container of getContainerDefinitions(resource)) {
|
|
21
|
+
const env = container.Environment;
|
|
22
|
+
if (!Array.isArray(env))
|
|
23
|
+
continue;
|
|
24
|
+
for (const entry of env) {
|
|
25
|
+
if (typeof entry !== "object" || entry === null)
|
|
26
|
+
continue;
|
|
27
|
+
const name = entry.Name;
|
|
28
|
+
if (isIntrinsic(name) || typeof name !== "string")
|
|
29
|
+
continue;
|
|
30
|
+
if (SECRET_NAME_PATTERN.test(name)) {
|
|
31
|
+
const containerName = typeof container.Name === "string" ? container.Name : "<unnamed>";
|
|
32
|
+
diagnostics.push({
|
|
33
|
+
checkId: "WAW046",
|
|
34
|
+
severity: "error",
|
|
35
|
+
message: `TaskDefinition "${logicalId}" container "${containerName}" passes "${name}" via plaintext Environment — use Secrets (Secrets Manager/SSM) instead`,
|
|
36
|
+
entity: logicalId,
|
|
37
|
+
lexicon: "aws",
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return diagnostics;
|
|
45
|
+
}
|
|
46
|
+
export const waw046 = {
|
|
47
|
+
id: "WAW046",
|
|
48
|
+
description: "ECS container passes a secret-looking value via plaintext Environment instead of Secrets",
|
|
49
|
+
check(ctx) {
|
|
50
|
+
return checkEcsPlaintextSecrets(ctx);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW047: ECS Privileged Container
|
|
3
|
+
*
|
|
4
|
+
* Flags ECS TaskDefinition containers running with Privileged: true — the
|
|
5
|
+
* container gets elevated access to the host, equivalent to root on the EC2
|
|
6
|
+
* instance (and rejected outright on Fargate).
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, getContainerDefinitions, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
export function checkEcsPrivilegedContainer(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::ECS::TaskDefinition")
|
|
17
|
+
continue;
|
|
18
|
+
for (const container of getContainerDefinitions(resource)) {
|
|
19
|
+
const privileged = container.Privileged;
|
|
20
|
+
if (isIntrinsic(privileged))
|
|
21
|
+
continue;
|
|
22
|
+
if (privileged === true) {
|
|
23
|
+
const containerName = typeof container.Name === "string" ? container.Name : "<unnamed>";
|
|
24
|
+
diagnostics.push({
|
|
25
|
+
checkId: "WAW047",
|
|
26
|
+
severity: "error",
|
|
27
|
+
message: `TaskDefinition "${logicalId}" container "${containerName}" runs with Privileged: true — drop elevated host access`,
|
|
28
|
+
entity: logicalId,
|
|
29
|
+
lexicon: "aws",
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return diagnostics;
|
|
36
|
+
}
|
|
37
|
+
export const waw047 = {
|
|
38
|
+
id: "WAW047",
|
|
39
|
+
description: "ECS container runs privileged — drop elevated host access",
|
|
40
|
+
check(ctx) {
|
|
41
|
+
return checkEcsPrivilegedContainer(ctx);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW048: ECS Missing Log Configuration
|
|
3
|
+
*
|
|
4
|
+
* Flags ECS TaskDefinition containers with no LogConfiguration — container
|
|
5
|
+
* stdout/stderr is discarded, leaving no audit trail. Mirrors WAW024 (ALB
|
|
6
|
+
* access logging): advisory, not a hard block.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, getContainerDefinitions } from "./cf-refs.js";
|
|
9
|
+
export function checkEcsLogConfiguration(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::ECS::TaskDefinition")
|
|
17
|
+
continue;
|
|
18
|
+
for (const container of getContainerDefinitions(resource)) {
|
|
19
|
+
if (container.LogConfiguration === undefined) {
|
|
20
|
+
const containerName = typeof container.Name === "string" ? container.Name : "<unnamed>";
|
|
21
|
+
diagnostics.push({
|
|
22
|
+
checkId: "WAW048",
|
|
23
|
+
severity: "warning",
|
|
24
|
+
message: `TaskDefinition "${logicalId}" container "${containerName}" has no LogConfiguration — container output is discarded`,
|
|
25
|
+
entity: logicalId,
|
|
26
|
+
lexicon: "aws",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return diagnostics;
|
|
33
|
+
}
|
|
34
|
+
export const waw048 = {
|
|
35
|
+
id: "WAW048",
|
|
36
|
+
description: "ECS container does not have a LogConfiguration — enable logging for audit trails",
|
|
37
|
+
check(ctx) {
|
|
38
|
+
return checkEcsLogConfiguration(ctx);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW049: Security Group Broad Ingress (any port, except ALB:80/443)
|
|
3
|
+
*
|
|
4
|
+
* Generalizes WAW019 beyond the four named sensitive ports (SSH/RDP/MySQL/
|
|
5
|
+
* Postgres): flags 0.0.0.0/0 or ::/0 ingress on *any* port, with a carve-out
|
|
6
|
+
* for the conventional public ALB listener ports (exactly 80 or 443).
|
|
7
|
+
*
|
|
8
|
+
* Port 80 is exempt unconditionally, not just on a relaxed tier (#917): a
|
|
9
|
+
* public ALB's HTTP listener is meant to be internet-facing on every tier —
|
|
10
|
+
* on the full/production tier it still needs an SG rule open to 0.0.0.0/0 so
|
|
11
|
+
* clients can reach the listener that redirects them to HTTPS (WAW044 is the
|
|
12
|
+
* rule that enforces the redirect actually happens; this rule only judges the
|
|
13
|
+
* SG's shape). The "light" tier serves plaintext HTTP straight off that same
|
|
14
|
+
* port instead of redirecting, which doesn't change the SG's exposure at all.
|
|
15
|
+
* A genuinely over-broad rule (all ports, SSH, etc.) still errors regardless
|
|
16
|
+
* of tier.
|
|
17
|
+
*/
|
|
18
|
+
import { parseCFTemplate, getSecurityGroupIngress, isIntrinsic } from "./cf-refs.js";
|
|
19
|
+
const OPEN_CIDRS = new Set(["0.0.0.0/0", "::/0"]);
|
|
20
|
+
const ALB_LISTENER_PORTS = new Set([80, 443]);
|
|
21
|
+
function isAlbListenerException(rule) {
|
|
22
|
+
return (typeof rule.FromPort === "number" &&
|
|
23
|
+
rule.FromPort === rule.ToPort &&
|
|
24
|
+
ALB_LISTENER_PORTS.has(rule.FromPort));
|
|
25
|
+
}
|
|
26
|
+
function checkIngressRule(rule, logicalId, diagnostics) {
|
|
27
|
+
const cidrIp = rule.CidrIp;
|
|
28
|
+
const cidrIpv6 = rule.CidrIpv6;
|
|
29
|
+
const hasOpenCidr = (typeof cidrIp === "string" && OPEN_CIDRS.has(cidrIp)) ||
|
|
30
|
+
(typeof cidrIpv6 === "string" && OPEN_CIDRS.has(cidrIpv6));
|
|
31
|
+
if (!hasOpenCidr)
|
|
32
|
+
return;
|
|
33
|
+
// Can't statically verify a port pinned by an intrinsic — don't guess.
|
|
34
|
+
if (isIntrinsic(rule.FromPort) || isIntrinsic(rule.ToPort))
|
|
35
|
+
return;
|
|
36
|
+
if (isAlbListenerException(rule))
|
|
37
|
+
return;
|
|
38
|
+
const cidr = typeof cidrIp === "string" && OPEN_CIDRS.has(cidrIp) ? cidrIp : cidrIpv6;
|
|
39
|
+
const fromPort = rule.FromPort;
|
|
40
|
+
const toPort = rule.ToPort;
|
|
41
|
+
const portDesc = fromPort !== undefined && toPort !== undefined ? ` on ports ${fromPort}-${toPort}` : " on all ports";
|
|
42
|
+
diagnostics.push({
|
|
43
|
+
checkId: "WAW049",
|
|
44
|
+
severity: "error",
|
|
45
|
+
message: `Security group "${logicalId}" allows unrestricted ingress from ${cidr}${portDesc} — restrict to specific CIDR ranges (only ALB:80/443 is exempt)`,
|
|
46
|
+
entity: logicalId,
|
|
47
|
+
lexicon: "aws",
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export function checkBroadIngress(ctx) {
|
|
51
|
+
const diagnostics = [];
|
|
52
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
53
|
+
const template = parseCFTemplate(output);
|
|
54
|
+
if (!template?.Resources)
|
|
55
|
+
continue;
|
|
56
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
57
|
+
if (resource.Type === "AWS::EC2::SecurityGroup") {
|
|
58
|
+
for (const rule of getSecurityGroupIngress(resource)) {
|
|
59
|
+
checkIngressRule(rule, logicalId, diagnostics);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (resource.Type === "AWS::EC2::SecurityGroupIngress") {
|
|
63
|
+
const props = resource.Properties ?? {};
|
|
64
|
+
if (!isIntrinsic(props)) {
|
|
65
|
+
checkIngressRule(props, logicalId, diagnostics);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return diagnostics;
|
|
71
|
+
}
|
|
72
|
+
export const waw049 = {
|
|
73
|
+
id: "WAW049",
|
|
74
|
+
description: "Security group allows unrestricted ingress on a port other than ALB:80/443",
|
|
75
|
+
check(ctx) {
|
|
76
|
+
return checkBroadIngress(ctx);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW050: Cognito Advanced Security Disabled
|
|
3
|
+
*
|
|
4
|
+
* Flags Cognito UserPools without UserPoolAddOns.AdvancedSecurityMode set to
|
|
5
|
+
* AUDIT or ENFORCED — without it, Cognito does not evaluate risk (compromised
|
|
6
|
+
* credentials, adaptive auth) on sign-in/sign-up.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
export function checkCognitoAdvancedSecurity(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::Cognito::UserPool")
|
|
17
|
+
continue;
|
|
18
|
+
const props = resource.Properties ?? {};
|
|
19
|
+
const addOns = props.UserPoolAddOns;
|
|
20
|
+
if (isIntrinsic(addOns))
|
|
21
|
+
continue;
|
|
22
|
+
const mode = typeof addOns === "object" && addOns !== null ? addOns.AdvancedSecurityMode : undefined;
|
|
23
|
+
if (isIntrinsic(mode))
|
|
24
|
+
continue;
|
|
25
|
+
if (mode !== "AUDIT" && mode !== "ENFORCED") {
|
|
26
|
+
diagnostics.push({
|
|
27
|
+
checkId: "WAW050",
|
|
28
|
+
severity: "error",
|
|
29
|
+
message: `Cognito UserPool "${logicalId}" does not have advanced security enabled — set UserPoolAddOns.AdvancedSecurityMode to AUDIT or ENFORCED`,
|
|
30
|
+
entity: logicalId,
|
|
31
|
+
lexicon: "aws",
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return diagnostics;
|
|
37
|
+
}
|
|
38
|
+
export const waw050 = {
|
|
39
|
+
id: "WAW050",
|
|
40
|
+
description: "Cognito UserPool does not have advanced security (risk-based auth) enabled",
|
|
41
|
+
check(ctx) {
|
|
42
|
+
return checkCognitoAdvancedSecurity(ctx);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW051: Cognito Implicit OAuth Grant Allowed
|
|
3
|
+
*
|
|
4
|
+
* Flags UserPoolClients whose AllowedOAuthFlows include the deprecated
|
|
5
|
+
* "implicit" grant — it returns tokens directly in the redirect URL (exposed
|
|
6
|
+
* in browser history/referrer headers) instead of via a code exchange.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
export function checkCognitoImplicitGrant(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::Cognito::UserPoolClient")
|
|
17
|
+
continue;
|
|
18
|
+
const props = resource.Properties ?? {};
|
|
19
|
+
const flows = props.AllowedOAuthFlows;
|
|
20
|
+
if (isIntrinsic(flows) || !Array.isArray(flows))
|
|
21
|
+
continue;
|
|
22
|
+
if (flows.some((f) => f === "implicit")) {
|
|
23
|
+
diagnostics.push({
|
|
24
|
+
checkId: "WAW051",
|
|
25
|
+
severity: "error",
|
|
26
|
+
message: `Cognito UserPoolClient "${logicalId}" allows the implicit OAuth grant — use the authorization code grant instead`,
|
|
27
|
+
entity: logicalId,
|
|
28
|
+
lexicon: "aws",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return diagnostics;
|
|
34
|
+
}
|
|
35
|
+
export const waw051 = {
|
|
36
|
+
id: "WAW051",
|
|
37
|
+
description: "Cognito UserPoolClient allows the deprecated implicit OAuth grant",
|
|
38
|
+
check(ctx) {
|
|
39
|
+
return checkCognitoImplicitGrant(ctx);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW052: Cognito MFA Not Required (full tier)
|
|
3
|
+
*
|
|
4
|
+
* Flags UserPools without MfaConfiguration: ON. Tier-aware (#894), same
|
|
5
|
+
* seam as WAW040: a relaxed "light" stack (local/Floci, or no --env/
|
|
6
|
+
* ownership.env set) only warns; the strict "full"/production tier
|
|
7
|
+
* (ctx.env === "prod"/"production"/"full") fails the build.
|
|
8
|
+
*/
|
|
9
|
+
import { parseCFTemplate, isIntrinsic, isFullTierEnv } from "./cf-refs.js";
|
|
10
|
+
export function checkCognitoMfaRequired(ctx) {
|
|
11
|
+
const diagnostics = [];
|
|
12
|
+
const severity = isFullTierEnv(ctx.env) ? "error" : "warning";
|
|
13
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
14
|
+
const template = parseCFTemplate(output);
|
|
15
|
+
if (!template?.Resources)
|
|
16
|
+
continue;
|
|
17
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
18
|
+
if (resource.Type !== "AWS::Cognito::UserPool")
|
|
19
|
+
continue;
|
|
20
|
+
const props = resource.Properties ?? {};
|
|
21
|
+
const mfaConfiguration = props.MfaConfiguration;
|
|
22
|
+
if (isIntrinsic(mfaConfiguration))
|
|
23
|
+
continue;
|
|
24
|
+
if (mfaConfiguration !== "ON") {
|
|
25
|
+
diagnostics.push({
|
|
26
|
+
checkId: "WAW052",
|
|
27
|
+
severity,
|
|
28
|
+
message: `Cognito UserPool "${logicalId}" does not require MFA (MfaConfiguration: ON) — require it on the full/production tier`,
|
|
29
|
+
entity: logicalId,
|
|
30
|
+
lexicon: "aws",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return diagnostics;
|
|
36
|
+
}
|
|
37
|
+
export const waw052 = {
|
|
38
|
+
id: "WAW052",
|
|
39
|
+
description: "Cognito UserPool does not require MFA (full tier)",
|
|
40
|
+
check(ctx) {
|
|
41
|
+
return checkCognitoMfaRequired(ctx);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW053: ECR Image Scanning Disabled
|
|
3
|
+
*
|
|
4
|
+
* Flags ECR repositories without ImageScanningConfiguration.ScanOnPush: true
|
|
5
|
+
* — pushed images aren't scanned for known CVEs.
|
|
6
|
+
*/
|
|
7
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
8
|
+
export function checkEcrScanOnPush(ctx) {
|
|
9
|
+
const diagnostics = [];
|
|
10
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
11
|
+
const template = parseCFTemplate(output);
|
|
12
|
+
if (!template?.Resources)
|
|
13
|
+
continue;
|
|
14
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
15
|
+
if (resource.Type !== "AWS::ECR::Repository")
|
|
16
|
+
continue;
|
|
17
|
+
const props = resource.Properties ?? {};
|
|
18
|
+
const scanConfig = props.ImageScanningConfiguration;
|
|
19
|
+
if (isIntrinsic(scanConfig))
|
|
20
|
+
continue;
|
|
21
|
+
const scanOnPush = typeof scanConfig === "object" && scanConfig !== null ? scanConfig.ScanOnPush : undefined;
|
|
22
|
+
if (isIntrinsic(scanOnPush))
|
|
23
|
+
continue;
|
|
24
|
+
if (scanOnPush !== true) {
|
|
25
|
+
diagnostics.push({
|
|
26
|
+
checkId: "WAW053",
|
|
27
|
+
severity: "error",
|
|
28
|
+
message: `ECR repository "${logicalId}" does not have ImageScanningConfiguration.ScanOnPush: true — pushed images aren't scanned for vulnerabilities`,
|
|
29
|
+
entity: logicalId,
|
|
30
|
+
lexicon: "aws",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return diagnostics;
|
|
36
|
+
}
|
|
37
|
+
export const waw053 = {
|
|
38
|
+
id: "WAW053",
|
|
39
|
+
description: "ECR repository does not scan images on push",
|
|
40
|
+
check(ctx) {
|
|
41
|
+
return checkEcrScanOnPush(ctx);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW054: ECR Tag Mutability Not Immutable
|
|
3
|
+
*
|
|
4
|
+
* Flags ECR repositories without ImageTagMutability: IMMUTABLE — mutable tags
|
|
5
|
+
* let a previously deployed/scanned/signed tag (e.g. "prod") silently point at
|
|
6
|
+
* different image content later.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
export function checkEcrTagImmutability(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::ECR::Repository")
|
|
17
|
+
continue;
|
|
18
|
+
const props = resource.Properties ?? {};
|
|
19
|
+
const mutability = props.ImageTagMutability;
|
|
20
|
+
if (isIntrinsic(mutability))
|
|
21
|
+
continue;
|
|
22
|
+
if (mutability !== "IMMUTABLE") {
|
|
23
|
+
diagnostics.push({
|
|
24
|
+
checkId: "WAW054",
|
|
25
|
+
severity: "error",
|
|
26
|
+
message: `ECR repository "${logicalId}" does not have ImageTagMutability: IMMUTABLE — a tag can silently be repointed at different image content`,
|
|
27
|
+
entity: logicalId,
|
|
28
|
+
lexicon: "aws",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return diagnostics;
|
|
34
|
+
}
|
|
35
|
+
export const waw054 = {
|
|
36
|
+
id: "WAW054",
|
|
37
|
+
description: "ECR repository does not have immutable image tags",
|
|
38
|
+
check(ctx) {
|
|
39
|
+
return checkEcrTagImmutability(ctx);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WAW055: CloudWatch Logs Retention Not Set
|
|
3
|
+
*
|
|
4
|
+
* Flags Logs::LogGroup resources without RetentionInDays — an unset
|
|
5
|
+
* retention means "Never expire," which is rarely the intended cost/
|
|
6
|
+
* compliance posture.
|
|
7
|
+
*/
|
|
8
|
+
import { parseCFTemplate, isIntrinsic } from "./cf-refs.js";
|
|
9
|
+
export function checkLogsRetention(ctx) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
for (const [_lexicon, output] of ctx.outputs) {
|
|
12
|
+
const template = parseCFTemplate(output);
|
|
13
|
+
if (!template?.Resources)
|
|
14
|
+
continue;
|
|
15
|
+
for (const [logicalId, resource] of Object.entries(template.Resources)) {
|
|
16
|
+
if (resource.Type !== "AWS::Logs::LogGroup")
|
|
17
|
+
continue;
|
|
18
|
+
const props = resource.Properties ?? {};
|
|
19
|
+
const retention = props.RetentionInDays;
|
|
20
|
+
if (isIntrinsic(retention))
|
|
21
|
+
continue;
|
|
22
|
+
if (retention === undefined) {
|
|
23
|
+
diagnostics.push({
|
|
24
|
+
checkId: "WAW055",
|
|
25
|
+
severity: "warning",
|
|
26
|
+
message: `Log group "${logicalId}" has no RetentionInDays set — logs are kept forever by default; set an explicit retention period`,
|
|
27
|
+
entity: logicalId,
|
|
28
|
+
lexicon: "aws",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return diagnostics;
|
|
34
|
+
}
|
|
35
|
+
export const waw055 = {
|
|
36
|
+
id: "WAW055",
|
|
37
|
+
description: "CloudWatch Logs log group has no retention period set",
|
|
38
|
+
check(ctx) {
|
|
39
|
+
return checkLogsRetention(ctx);
|
|
40
|
+
},
|
|
41
|
+
};
|