@intentius/chant-lexicon-aws 0.0.13 → 0.0.15

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/package.json CHANGED
@@ -1,32 +1,35 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-aws",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
- "files": ["src/", "dist/"],
6
+ "files": [
7
+ "src/",
8
+ "dist/"
9
+ ],
7
10
  "publishConfig": {
8
- "access": "public"
9
- },
10
- "exports": {
11
- ".": "./src/index.ts",
12
- "./*": "./src/*",
13
- "./manifest": "./dist/manifest.json",
14
- "./meta": "./dist/meta.json",
15
- "./types": "./dist/types/index.d.ts"
16
- },
17
- "scripts": {
18
- "generate": "bun run src/codegen/generate-cli.ts",
19
- "bundle": "bun run src/package-cli.ts",
20
- "validate": "bun run src/validate-cli.ts",
21
- "docs": "bun src/codegen/docs-cli.ts",
22
- "prepack": "bun run bundle && bun run validate"
23
- },
24
- "dependencies": {
25
- "@intentius/chant": "0.0.12",
26
- "fflate": "^0.8.2",
27
- "js-yaml": "^4.1.0"
28
- },
29
- "devDependencies": {
30
- "typescript": "^5.9.3"
31
- }
11
+ "access": "public"
12
+ },
13
+ "exports": {
14
+ ".": "./src/index.ts",
15
+ "./*": "./src/*.ts",
16
+ "./manifest": "./dist/manifest.json",
17
+ "./meta": "./dist/meta.json",
18
+ "./types": "./dist/types/index.d.ts"
19
+ },
20
+ "scripts": {
21
+ "generate": "bun run src/codegen/generate-cli.ts",
22
+ "bundle": "bun run src/package-cli.ts",
23
+ "validate": "bun run src/validate-cli.ts",
24
+ "docs": "bun src/codegen/docs-cli.ts",
25
+ "prepack": "bun run bundle && bun run validate"
26
+ },
27
+ "dependencies": {
28
+ "@intentius/chant": "0.0.15",
29
+ "fflate": "^0.8.2",
30
+ "js-yaml": "^4.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "^5.9.3"
34
+ }
32
35
  }
@@ -149,22 +149,23 @@ When you reference a resource or attribute from another file (e.g. \`dataBucket.
149
149
 
150
150
  CloudFormation parameters let you customize a stack at deploy time. Export a \`Parameter\` to add it to the template's \`Parameters\` section:
151
151
 
152
- {{file:docs-snippets/src/parameter-ref.ts}}
152
+ {{file:docs-snippets/src/parameter-declaration.ts}}
153
153
 
154
154
  Produces:
155
155
 
156
156
  \`\`\`json
157
157
  "Parameters": {
158
- "Name": {
158
+ "Environment": {
159
159
  "Type": "String",
160
- "Description": "Project name used in resource naming"
160
+ "Default": "dev",
161
+ "Description": "Deployment environment"
161
162
  }
162
163
  }
163
164
  \`\`\`
164
165
 
165
166
  Reference parameters with \`Ref\`:
166
167
 
167
- {{file:docs-snippets/src/parameter-ref.ts}}
168
+ {{file:docs-snippets/src/parameter-cross-file-ref.ts}}
168
169
 
169
170
  ## Outputs
170
171
 
@@ -201,7 +202,7 @@ Runtime context values available in every template, accessed via the \`AWS\` nam
201
202
 
202
203
  ## Intrinsic functions
203
204
 
204
- The lexicon provides 8 intrinsic functions (\`Sub\`, \`Ref\`, \`GetAtt\`, \`If\`, \`Join\`, \`Select\`, \`Split\`, \`Base64\`) that map directly to CloudFormation \`Fn::\` calls. See [Intrinsic Functions](../intrinsics/) for full usage examples.
205
+ The lexicon provides 9 intrinsic functions (\`Sub\`, \`Ref\`, \`GetAtt\`, \`If\`, \`Join\`, \`Select\`, \`Split\`, \`Base64\`, \`GetAZs\`) that map directly to CloudFormation \`Fn::\` calls. See [Intrinsic Functions](../intrinsics/) for full usage examples.
205
206
 
206
207
  ## Dependencies
207
208
 
@@ -369,7 +370,13 @@ Splits a string by a delimiter:
369
370
 
370
371
  Encodes a string to Base64, commonly used for EC2 user data:
371
372
 
372
- {{file:docs-snippets/src/intrinsics-detail.ts:23-27}}`,
373
+ {{file:docs-snippets/src/intrinsics-detail.ts:23-27}}
374
+
375
+ ## \`GetAZs\` — availability zones
376
+
377
+ Returns the list of Availability Zones for a region:
378
+
379
+ {{file:docs-snippets/src/intrinsics-detail.ts:29-31}}`,
373
380
  },
374
381
  {
375
382
  slug: "composites",
@@ -750,6 +757,82 @@ WAW030: API Gateway Deployment "MyDeployment" has no DependsOn on any Method
750
757
  WAW030: ScalableTarget "MyTarget" targets DynamoDB but has no DependsOn on any Table
751
758
  \`\`\`
752
759
 
760
+ ### WAW018 — S3 Bucket Missing Public Access Block
761
+
762
+ **Severity:** error | **Category:** security
763
+
764
+ Flags S3 buckets without a \`PublicAccessBlockConfiguration\`. Without an explicit public access block, the bucket may be publicly accessible. Always set \`BlockPublicAcls\`, \`BlockPublicPolicy\`, \`IgnorePublicAcls\`, and \`RestrictPublicBuckets\` to \`true\`.
765
+
766
+ ### WAW019 — Security Group Unrestricted Ingress on Sensitive Ports
767
+
768
+ **Severity:** error | **Category:** security
769
+
770
+ Flags security group ingress rules that allow unrestricted access (\`0.0.0.0/0\` or \`::/0\`) on sensitive ports (22, 3389, 3306, 5432, 1433, 6379, 27017). Restrict ingress to known CIDR ranges or security groups.
771
+
772
+ ### WAW020 — IAM Policy Uses Wildcard Action
773
+
774
+ **Severity:** warning | **Category:** security
775
+
776
+ Flags IAM policy statements that use wildcard actions (\`"Action": "*"\` or \`"Action": "s3:*"\`). Use specific action names following the principle of least privilege.
777
+
778
+ ### WAW021 — RDS Storage Not Encrypted
779
+
780
+ **Severity:** error | **Category:** security
781
+
782
+ Flags RDS instances without \`StorageEncrypted: true\`. All RDS instances should encrypt data at rest to meet compliance and security requirements.
783
+
784
+ ### WAW022 — Lambda Not in VPC
785
+
786
+ **Severity:** warning | **Category:** security
787
+
788
+ Flags Lambda functions without a \`VpcConfig\`. Functions that access internal resources (databases, caches, internal APIs) should run inside a VPC. Functions that only call public APIs can safely skip VPC configuration.
789
+
790
+ ### WAW023 — CloudFront Without WAF
791
+
792
+ **Severity:** warning | **Category:** security
793
+
794
+ Flags CloudFront distributions without a \`WebACLId\`. Attaching a WAF web ACL protects your distribution from common web exploits and bots.
795
+
796
+ ### WAW024 — ALB Without Access Logging
797
+
798
+ **Severity:** warning | **Category:** best practice
799
+
800
+ Flags Application Load Balancers without access logging enabled. Enable \`access_logs.s3.enabled\` to capture request logs for debugging and compliance.
801
+
802
+ ### WAW025 — SNS Topic Not Encrypted
803
+
804
+ **Severity:** warning | **Category:** security
805
+
806
+ Flags SNS topics without \`KmsMasterKeyId\`. Encrypting topics at rest protects sensitive notification payloads.
807
+
808
+ ### WAW026 — SQS Queue Not Encrypted
809
+
810
+ **Severity:** warning | **Category:** security
811
+
812
+ Flags SQS queues without \`KmsMasterKeyId\` or \`SqsManagedSseEnabled\`. Encrypting queues at rest protects sensitive message payloads.
813
+
814
+ ### WAW027 — DynamoDB Missing Point-in-Time Recovery
815
+
816
+ **Severity:** info | **Category:** best practice
817
+
818
+ Flags DynamoDB tables without \`PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled\` set to \`true\`. Point-in-time recovery provides continuous backups and protects against accidental writes or deletes.
819
+
820
+ ### WAW028 — EBS Volume Not Encrypted
821
+
822
+ **Severity:** warning | **Category:** security
823
+
824
+ Flags EBS volumes without \`Encrypted: true\`. All EBS volumes should encrypt data at rest for compliance and security.
825
+
826
+ ### WAW031 — EKS Addon Missing ServiceAccountRoleArn
827
+
828
+ **Severity:** warning | **Category:** correctness
829
+
830
+ Flags EKS addons that require an IRSA role but don't have \`ServiceAccountRoleArn\` set. Without an IRSA role, the addon pods can't authenticate to AWS APIs and the addon hangs in CREATING status. Known addons that require IRSA: \`aws-ebs-csi-driver\`, \`aws-efs-csi-driver\`, \`adot\`, \`amazon-cloudwatch-observability\`.
831
+
832
+ \`\`\`
833
+ WAW031: EKS Addon "EbsCsiAddon" (aws-ebs-csi-driver) has no ServiceAccountRoleArn — it needs an IRSA role for EBS API access
834
+ \`\`\`
835
+
753
836
  ## Running lint
754
837
 
755
838
  \`\`\`bash
@@ -954,7 +1037,19 @@ src/
954
1037
  - **Composite presets** — \`SecureApi\` (low memory, short timeout) and \`HighMemoryApi\` (high memory, longer timeout)
955
1038
  - **Custom lint rule** — \`api-timeout.ts\` enforces API Gateway's 29-second timeout limit (see [Custom Lint Rules](../custom-rules/))
956
1039
 
957
- The example produces 10 CloudFormation resources: 1 S3 bucket + 3 composites × 3 members each.`,
1040
+ The example produces 10 CloudFormation resources: 1 S3 bucket + 3 composites × 3 members each.
1041
+
1042
+ ## RDS Instance
1043
+
1044
+ \`examples/rds-postgres/\` — production RDS PostgreSQL instance using the \`RdsInstance\` composite with VPC networking and SSM parameter references.
1045
+
1046
+ {{file:rds-postgres/src/params.ts}}
1047
+
1048
+ {{file:rds-postgres/src/network.ts}}
1049
+
1050
+ {{file:rds-postgres/src/database.ts}}
1051
+
1052
+ Produces a complete RDS stack: VPC infrastructure (from \`VpcDefault\`), DB subnet group, security group, and RDS instance with encrypted storage.`,
958
1053
  },
959
1054
  {
960
1055
  slug: "skills",
@@ -968,7 +1063,7 @@ Skills are structured markdown documents bundled with a lexicon. When an AI agen
968
1063
 
969
1064
  ## Installation
970
1065
 
971
- When you scaffold a new project with \`chant init --lexicon aws\`, the skill is installed to \`.claude/skills/chant-aws/SKILL.md\` for automatic discovery by Claude Code.
1066
+ When you scaffold a new project with \`chant init --lexicon aws\`, the skill is installed to \`skills/chant-aws/SKILL.md\` for automatic discovery by Claude Code.
972
1067
 
973
1068
  For existing projects, create the file manually:
974
1069