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/operations-audit-pipeline-broken.json
View on GitHub{
"id": "operations-audit-pipeline-broken",
"title": "Operations — Audit Pipeline Broken (CloudTrail / CW Logs / S3 archive)",
"description": "An engineer configures `AuditTrail` (M9) but the consumer-supplied SecureBucket archive bucket policy doesn't grant CloudTrail write access; or the CW Logs group's KMS key is rotated without granting CT IAM role kms:Encrypt; or an attacker calls StopLogging on the trail before exfiltrating. Threats focus on the integrity, availability, and tamper-resistance of the audit pipeline.",
"requiredFrameworks": ["CCM", "NIST-800-53-r5", "ATLAS", "CIS-AWS-v5.0.0"],
"actors": [
"Platform Engineer (trusted)",
"External Attacker (post-compromise; objective: cover tracks via StopLogging)",
"Compromised privileged AWS principal with `cloudtrail:*` (could disable trail)"
],
"assets": [
"CloudTrail trail (multi-region, log-file-validated)",
"S3 audit archive bucket (SecureBucket-shaped)",
"CloudWatch Logs group `/aws/cloudtrail/*` (KMS-encrypted)",
"CT-to-CWL IAM role (`cloudWatchLogsRoleArn`)"
],
"stride": [
{
"type": "S",
"name": "Spoofed source on StopLogging",
"description": "An attacker with `cloudtrail:StopLogging` disables the trail before lateral movement. Mitigation: `IdentityAlarms` event 5 (`cloudtrail-tampered`) fires on `StopLogging` / `DeleteTrail` / `UpdateTrail`. Pair with SCP denying those actions to non-IaC principals.",
"controls": ["CCM:LOG-04", "NIST-800-53-r5:AU-9", "CIS-AWS-v5.0.0:3.3"]
},
{
"type": "T",
"name": "Tampered S3 archive (without log-file validation)",
"description": "An attacker with `s3:PutObject` on the archive bucket modifies historical log files. Mitigation: `enableLogFileValidation: true` (M9 invariant) makes any post-hoc modification cryptographically detectable via `aws cloudtrail validate-logs`. SecureBucket's BucketOwnerEnforced + TLS-only policy prevent the tamper at the bucket-policy level.",
"controls": ["CCM:LOG-04", "NIST-800-53-r5:AU-9"]
},
{
"type": "R",
"name": "Repudiation via missing CW Logs delivery",
"description": "If the CT-to-CWL IAM role policy lacks `logs:CreateLogStream` for the specific log group ARN, the trail emits to S3 but not to CW Logs — `IdentityAlarms` are silent. Mitigation: M9's `RolePolicy` is scoped to `${logGroup.arn}:*`; consumer can verify with `aws cloudtrail get-trail-status`.",
"controls": ["CCM:LOG-01", "NIST-800-53-r5:AU-12"]
},
{
"type": "I",
"name": "Information disclosure via unencrypted CW Logs group",
"description": "If a consumer points `IdentityAlarms.trailLogGroupName` at a log group that ISN'T `kmsKeyId`-set, CloudTrail events at rest in CW Logs are readable by any cross-account principal with `logs:GetLogEvents`. Mitigation: M9 sets `kmsKeyId` on the log group; M10's `O_AUDIT_2` enforces it at preview for every `/aws/cloudtrail/*` group.",
"controls": ["CCM:CEK-04", "NIST-800-53-r5:SC-28"]
},
{
"type": "D",
"name": "Denial via S3 archive bucket policy regression",
"description": "If the archive bucket policy is updated to deny CloudTrail (e.g. via a typo in a Pulumi update), the trail starts failing delivery. Mitigation: `aws cloudtrail get-trail-status` exposes `LatestDeliveryError`; pair with a CloudWatch alarm watching the trail's delivery error count.",
"controls": ["CCM:LOG-01", "NIST-800-53-r5:CP-2"]
},
{
"type": "E",
"name": "Elevation via cross-account access to the audit archive",
"description": "An attacker with cross-account read on the archive bucket can correlate IaC-author identity with workload behavior. Mitigation: SecureBucket's BucketOwnerEnforced + VPC endpoint policy + per-account KMS keys.",
"controls": ["CCM:DSP-12", "NIST-800-53-r5:AC-6"]
}
],
"abuseCases": [
{
"id": "tm-hulumi-ops-abuse-stoplogging",
"title": "StopLogging before exfiltration",
"description": "Mitigation: M9 + IdentityAlarms 5.",
"controls": ["CCM:LOG-04"]
},
{
"id": "tm-hulumi-ops-abuse-archive-policy-regression",
"title": "Archive bucket policy regression breaks delivery",
"description": "Mitigation: M9 trail-status check + alarm on delivery errors.",
"controls": ["CCM:LOG-01"]
}
]
}
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 |