kerberosmansour/hulumi / skills/hulumi-threat-model
hulumi-threat-model
FlaggedRun an AWS or GitHub cloud / platform threat model for a specific Hulumi scenario. Produces a structured markdown threat-model document at docs/threat-model-<scenario>-<date>.md in the user's working directory, citing CSA CCM v4.1, NIST SP 800-53 Rev 5, NIST SP 800-218A, MITRE ATLAS v5.1, CIS AWS Foundations v5.0.0, CIS GitHub Benchmark v1.2.0, NIST SSDF v1.1, OpenSSF Scorecard, MITRE ATT&CK T1195, and GitHub Well-Architected SSDF by framework ID only (no verbatim control text). Use when the user asks for a threat model for an AWS or GitHub scenario, wants to ground IaC design decisions in standard controls, or wants to see which @hulumi/baseline components apply.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.0 KB |
| package.json | manifest | 572 B |
| scenarios/aws-multi-account-baseline.json | config | 5.5 KB |
| scenarios/eks-cluster-baseline.json | config | 5.0 KB |
| scenarios/eks-runtime-and-backup.json | config | 4.6 KB |
| scenarios/github-actions-supply-chain.json | config | 5.9 KB |
| scenarios/github-app-token-exposure.json | config | 5.5 KB |
| scenarios/github-oidc-trust-cloud-account.json | config | 5.4 KB |
| scenarios/github-self-hosted-runner.json | config | 5.3 KB |
| scenarios/iam-least-privilege.json | config | 4.7 KB |
| scenarios/lambda-secrets-access.json | config | 5.0 KB |
| scenarios/operations-audit-pipeline-broken.json | config | 4.3 KB |
| scenarios/operations-detective-services-disabled.json | config | 4.1 KB |
| scenarios/operations-patch-compliance-lapse.json | config | 4.0 KB |
| scenarios/rds-encryption-at-rest.json | config | 4.7 KB |
| scenarios/s3-public-bucket-hardening.json | config | 4.9 KB |
| scripts/generate-threat-model.mjs | script | 22.7 KB |
| scripts/list-scenarios.mjs | script | 2.0 KB |
| templates/threat-model.template.md | markdown | 1.1 KB |
| tsconfig.json | config | 289 B |
scenarios/s3-public-bucket-hardening.json
View on GitHub{
"id": "s3-public-bucket-hardening",
"title": "S3 Bucket Hardening — public-access-block, SSE-KMS, versioning, TLS-only, object-lock",
"description": "An engineer needs to create an S3 bucket that stores user-uploaded files, audit logs, or a Pulumi state backend. The target end state: block-public-access on all four account-level levers, SSE-KMS with a customer-managed CMK, BucketOwnerEnforced ownership, versioning enabled, TLS-only bucket policy, and — for the Startup-Hardened tier — object-lock in governance mode and mandatory access-logging to a sibling log bucket.",
"requiredFrameworks": ["CCM", "CIS-AWS-v5.0.0", "NIST-800-53-r5", "ATLAS"],
"actors": [
"Platform Engineer (trusted)",
"AI Coding Agent (trusted, authoring IaC)",
"External Attacker (untrusted)",
"Data Scraper / Crawler (untrusted, automated)"
],
"assets": [
"Bucket object data (may include PII or secrets)",
"KMS CMK used to encrypt objects",
"Bucket access logs",
"Bucket metadata (names enumerable via S3 public endpoint if misconfigured)"
],
"stride": [
{
"type": "I",
"name": "Bucket-listing information disclosure",
"description": "A bucket created without public-access-block set on all four levers (BlockPublicAcls, IgnorePublicAcls, BlockPublicPolicy, RestrictPublicBuckets) risks being enumerable via unauthenticated S3 API calls. Mitigation: Hulumi `SecureBucket` defaults all four to true; the policy pack rejects raw buckets.",
"controls": [
"CCM:DSP-01",
"CIS-AWS-v5.0.0:2.1.2",
"CIS-AWS-v5.0.0:2.1.4",
"NIST-800-53-r5:AC-3"
]
},
{
"type": "I",
"name": "Unencrypted-at-rest disclosure",
"description": "Without SSE-KMS, an attacker with raw S3 access (e.g. via a leaked access key) reads plaintext objects. `SecureBucket` mandates SSE-KMS and associates a customer-managed CMK by default; the CMK's key policy restricts decrypt to the set of principals owning the bucket's logical domain.",
"controls": [
"CCM:CEK-04",
"CIS-AWS-v5.0.0:2.1.1",
"NIST-800-53-r5:SC-28",
"NIST-800-53-r5:SC-12",
"NIST-800-53-r5:SC-13"
]
},
{
"type": "T",
"name": "Object tampering via non-TLS transport",
"description": "Without a TLS-only bucket policy, data in transit to/from S3 can travel unencrypted if the caller uses HTTP. `SecureBucket` applies a bucket policy denying any `aws:SecureTransport=false` request.",
"controls": ["CCM:CEK-01", "CIS-AWS-v5.0.0:2.1.5", "NIST-800-53-r5:SC-8"]
},
{
"type": "T",
"name": "Silent object overwrite",
"description": "Without versioning, an attacker who obtains write credentials can overwrite objects and the previous content is lost. `SecureBucket` enables versioning in both tiers.",
"controls": ["CCM:DSP-17", "CIS-AWS-v5.0.0:2.1.6", "NIST-800-53-r5:CP-9"]
},
{
"type": "R",
"name": "Repudiation via missing access logs",
"description": "Startup-Hardened tier mandates server-access-logging to a supplied log bucket. Without logs, forensic attribution of a breach is blocked. Advisory in Sandbox tier.",
"controls": ["CCM:LOG-01", "NIST-800-53-r5:AU-2", "NIST-800-53-r5:AU-12"]
},
{
"type": "E",
"name": "Bucket name squatting across accounts",
"description": "S3 bucket names are globally unique. An attacker may pre-register a name the LLM is about to create, then social-engineer the engineer to hand over control via a support ticket. Mitigation: prefix bucket names with an organisation-specific token, never expose bucket names in public URLs (CloudFront / pre-signed URLs instead).",
"controls": ["ATLAS:AML.T0001", "NIST-800-53-r5:CM-2"]
}
],
"recommendedComponents": [
{
"name": "hulumi.baseline.aws.SecureBucket",
"availability": "Shipped in M2 (v0.2)",
"rationale": "The ComponentResource that delivers this scenario's target end state. Two tiers: Sandbox (public-access-block + SSE-KMS + versioning + TLS-only + BucketOwnerEnforced) and Startup-Hardened (adds object-lock governance mode + mandatory access-logging + CloudTrail data-events)."
},
{
"name": "hulumi.policies.aws.HulumiHardeningPack",
"availability": "Shipped in M2 (v0.2; H3 iac-role-tag rule mandatory at v1.0)",
"rationale": "H1 rule blocks any raw `aws.s3.BucketV2`; H2 blocks file:// state backend; H4 ensures Startup-Hardened instances carry a `logBucketArn`. H3 (iac-role tag) shipped advisory in M2 and flipped to mandatory at v1.0 once the SCP template shipped."
},
{
"name": "hulumi.drift.DriftClassifier",
"availability": "Shipped in M4 (v0.4)",
"rationale": "If the bucket is later modified out-of-band (tag change, policy edit), the classifier distinguishes console break-glass from Pulumi-originated change using CloudTrail + git-log + provider-version signals. TLA+-bound verdict matrix; cache mode 0600; rate-limited via cache TTL."
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |