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/iam-least-privilege.json
View on GitHub{
"id": "iam-least-privilege",
"title": "IAM Least Privilege — password policy, role scoping, access analyzer, MFA",
"description": "An engineer is standing up IAM baselines for a new AWS account: password policy, Access Analyzer, role scoping for IaC and application workloads, MFA enforcement, and the `hulumi:iac-role=true` tag convention that the drift classifier depends on. Target end state matches Hulumi's `AccountFoundation.iamBaseline` — no inline admin policies, no wildcard `Resource: '*'` outside `iam:List*` / `iam:Get*` reads, Access Analyzer archive rules for Hulumi-tagged principals.",
"requiredFrameworks": ["CCM", "NIST-800-53-r5", "ATLAS", "CIS-AWS-v5.0.0"],
"actors": [
"Platform Engineer (trusted)",
"AI Coding Agent (trusted, authoring IaC)",
"External Attacker (via stolen IAM access key)",
"Compromised CI runner (semi-trusted, could exfil if over-scoped)"
],
"assets": [
"IAM user passwords and access keys",
"IAM roles and their assume-role trust policies",
"IAM policies attached to roles",
"`hulumi:iac-role=true` tag — load-bearing for drift attribution"
],
"stride": [
{
"type": "E",
"name": "Wildcard IAM policy elevation",
"description": "An LLM-authored or human-authored policy grants `Action: '*' / Resource: '*'` to a workload role. A compromised workload becomes effectively admin. Hulumi's HardeningPack refuses such policies at preview time outside narrow `iam:*` read namespaces.",
"controls": [
"CCM:IAM-07",
"CIS-AWS-v5.0.0:1.22",
"NIST-800-53-r5:AC-3",
"NIST-800-53-r5:AC-6"
]
},
{
"type": "S",
"name": "Assume-role trust spoofing",
"description": "An IAM role trust policy allows `Principal: '*'` (or a too-broad principal set) to assume it. External account principals can escalate via assume-role chains. Mitigation: explicit principal ARNs, `sts:ExternalId` conditions for cross-account.",
"controls": ["CCM:IAM-10", "CIS-AWS-v5.0.0:1.15", "NIST-800-53-r5:IA-2"]
},
{
"type": "R",
"name": "Untagged IaC role breaks attribution",
"description": "If the IaC deploy role lacks `hulumi:iac-role=true`, the drift classifier's CloudTrailAdapter cannot distinguish IaC-originated from human-console changes, corrupting every subsequent drift verdict. Tag was advisory through M2–M4 and is mandatory at v1.0.0 (paired with the SCP template shipped in M5).",
"controls": ["CCM:IAM-06", "NIST-800-53-r5:AC-2", "NIST-800-53-r5:AU-12"]
},
{
"type": "T",
"name": "Tag tampering on the IaC role",
"description": "A principal with `iam:TagRole` can add `hulumi:iac-role=true` to an attacker-controlled role, making their CloudTrail events look like IaC. The v1.0.0 SCP template (M5) denies `iam:TagRole` with that key from non-IaC principals.",
"controls": ["CCM:IAM-06", "NIST-800-53-r5:CM-2"]
},
{
"type": "I",
"name": "Access Analyzer disabled — external access blind spot",
"description": "Without Access Analyzer, external-access findings on roles, buckets, KMS keys, and Secrets Manager are invisible. Sandbox tier is advisory; Startup-Hardened enables Access Analyzer in account-local or organization mode.",
"controls": ["CCM:IAM-01", "NIST-800-53-r5:AC-3", "NIST-800-53-r5:SI-4"]
},
{
"type": "D",
"name": "Agent-driven credential brute force",
"description": "AI-agent-driven attacks can automate credential-stuffing against IAM users. MFA enforcement + IAM password policy (14+ chars, complexity, rotation) + IA-5 authenticator management are the baseline.",
"controls": [
"CCM:IAM-02",
"CIS-AWS-v5.0.0:1.8",
"CIS-AWS-v5.0.0:1.12",
"NIST-800-53-r5:IA-5",
"ATLAS:AML.T0051"
]
}
],
"recommendedComponents": [
{
"name": "hulumi.baseline.aws.AccountFoundation.iamBaseline",
"availability": "Shipped in M3 (v0.3)",
"rationale": "Password policy (CIS §1.6/1.8/1.9), Access Analyzer (Startup-Hardened, CIS §1.19), archive rules for Hulumi-tagged principals, no inline admin."
},
{
"name": "hulumi.policies.aws.HulumiHardeningPack (H3 rule: iac-role tag present)",
"availability": "Shipped in M2 advisory; mandatory at v1.0 (M5) + SCP-paired",
"rationale": "Detects missing `hulumi:iac-role=true` tag at preview time. SCP template `docs/deployment/scp.json` (shipped in M5) enforces tag-integrity server-side."
},
{
"name": "hulumi.policies.aws.CisV5Pack (section 1 — IAM)",
"availability": "Shipped in M3 (v0.3)",
"rationale": "CIS v5.0 section-1 rules enforce password policy, MFA, credential rotation, and wildcard-scoping preventive checks."
}
]
}
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 |