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/github-actions-supply-chain.json
View on GitHub{
"id": "github-actions-supply-chain",
"title": "GitHub Actions supply-chain risk — third-party Action ingestion, SHA-pinning, pwn-request, cache poisoning",
"description": "A platform engineer adopts third-party Actions in CI workflows. Recent incidents - trivy-action March 2026 (75/76 tags compromised), tj-actions/changed-files (~23k repos affected), Sysdig Shai-Hulud worm (November 2025), Wiz prt-scan campaign, and AI-scaled fork-PR pwn-request campaigns - have all exploited adjacent primitives: workflows referencing Actions by mutable tag, orgs without an allow-list policy, privileged workflows checking out untrusted PR code, and release/deploy jobs that expose secrets or OIDC tokens to code from the wrong trust boundary. Hulumi's `OrgFoundation` (M2) ships the SHA-pin-required Actions allowlist policy at startup-hardened tier; M3's `HulumiGithubHardeningPack` enforces this declaratively at preview-time; the workflow-governance linter gives consumers a local CI gate for workflow YAML drift.",
"requiredFrameworks": [
"CCM",
"NIST-SSDF-v1.1",
"OpenSSF-Scorecard",
"MITRE-ATTCK",
"GitHub-Well-Architected",
"CIS-GitHub-v1.2.0"
],
"actors": [
"Platform Engineer (trusted, configures the org-level allowlist)",
"Workflow Author (semi-trusted, picks Actions from the allow-listed set)",
"Compromised Maintainer of a third-party Action (untrusted, primary attacker)",
"External PR Attacker (untrusted, opens AI-generated fork PRs at scale)",
"AI Coding Agent (trusted, authoring workflows; could be tricked into citing mutable tags)"
],
"assets": [
"Workflow YAML files referencing third-party Actions",
"Organization-level Actions allowlist (`ActionsOrganizationPermissions`)",
"Repository secrets accessible to the workflow",
"OIDC token minting permission (`id-token: write`)",
"Build artifacts produced by the workflow",
"Cache entries in `actions/cache`"
],
"stride": [
{
"type": "T",
"name": "Third-party Action repo compromise (trivy-action / tj-actions pattern)",
"description": "The maintainer's account is compromised (phishing, credential stuffing, or a separate supply-chain reach); attacker pushes a malicious commit to the Action's source repo and re-tags `v1` to point at it. Workflows referencing the Action by mutable tag pick up the malicious version on the next run. Mitigation: SHA-pin every external Action; org-level `ActionsOrganizationPermissions` policy with `shaPinningRequired: true` at startup-hardened tier.",
"controls": [
"CCM:DSI-04",
"NIST-SSDF-v1.1:PO.3",
"OpenSSF-Scorecard:Pinned-Dependencies",
"MITRE-ATTCK:T1195",
"GitHub-Well-Architected:PW.5"
]
},
{
"type": "S",
"name": "Cache poisoning via Action with cache-write capability",
"description": "A compromised Action with `actions/cache` write access poisons the cache for a subsequent legitimate run. The legitimate run consumes the poisoned cache and ships compromised artifacts. Mitigation: cache scoping by branch + workflow; scope-limit Actions with cache-write to the minimum branch set.",
"controls": [
"CCM:DSI-02",
"NIST-SSDF-v1.1:PW.6",
"MITRE-ATTCK:T1195",
"GitHub-Well-Architected:PW.6"
]
},
{
"type": "E",
"name": "AI-scaled pwn-request via PR diff content reaching write context",
"description": "An external contributor opens many convincing fork PRs and relies on a privileged `pull_request_target` or downstream `workflow_run` chain to check out attacker-controlled head code. Package lifecycle scripts, build steps, or tests then run with base-repo secrets, write-capable `GITHUB_TOKEN`, or OIDC minting permission and exfiltrate credentials or publish poisoned artifacts. Mitigation: keep `pull_request_target` metadata-only, never check out PR head code in a privileged workflow, keep PR CI on `pull_request` with `permissions: contents: read`, and reject cloud OIDC trust subjects for pull requests.",
"controls": [
"CCM:IAM-07",
"NIST-SSDF-v1.1:PW.7",
"OpenSSF-Scorecard:Token-Permissions",
"GitHub-Well-Architected:PS.2"
]
},
{
"type": "I",
"name": "Information disclosure via runner exfil after Action compromise",
"description": "A compromised Action running on the org's runner reads environment, secrets, or filesystem state and exfils to an attacker-controlled URL. Step-Security Maintained Actions or octo-sts-style short-lived token exchange limit blast radius.",
"controls": ["CCM:DSI-03", "NIST-SSDF-v1.1:PO.5", "MITRE-ATTCK:T1195"]
}
],
"recommendedComponents": [
{
"name": "@hulumi/baseline.github.OrgFoundation",
"availability": "Shipped in Hulumi v1.1.0 M2",
"rationale": "Provisions the org-level `ActionsOrganizationPermissions` with `shaPinningRequired: true` at startup-hardened tier; configures the Actions allowlist (selectedActionsPatterns)."
},
{
"name": "@hulumi/policies.github.HulumiGithubHardeningPack",
"availability": "Shipped in Hulumi v1.1.0 M3",
"rationale": "H1 declaratively rejects raw `github.Repository` not wrapped in `SecureRepository`; H2/H3/H4 enforce ruleset, OIDC, and tier-monotonicity invariants."
},
{
"name": "@hulumi/drift.adapters.GithubWebhookFallbackAdapter",
"availability": "Shipped in Hulumi v1.1.0 M4",
"rationale": "Detects org-level allowlist drift via the `repository_ruleset` and `organization` webhook events; surfaces `tier-degraded` honestly for non-GHEC tiers."
},
{
"name": "scripts/workflow-governance-lint.mjs",
"availability": "Shipped in Hulumi v1.4.0; WF_PR_1 added after the 2026-05-25 pwn-request review",
"rationale": "Fails privileged `pull_request_target` / `workflow_run` workflows that check out attacker-controlled head code, alongside SHA pinning, token-permission, CODEOWNERS, and protected-environment 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: 194k | Updated | Claude CodeCodex | Verified | Install |