Skip to content

anyshift-io/sre-skills / skills/iam-deceptive-escalation-auditor

iam-deceptive-escalation-auditor

Verified

FileKindSize
FAILURE_MODES.mdmarkdown3.6 KB
SKILL.mdskill md19.6 KB
fixtures/01-orphaned-passrole-deny/meta.jsonconfig349 B
fixtures/01-orphaned-passrole-deny/policy.jsonconfig573 B
fixtures/02-action-star-blanket-deny/meta.jsonconfig408 B
fixtures/02-action-star-blanket-deny/policy.jsonconfig604 B
fixtures/03-assumerole-broken-trust/meta.jsonconfig492 B
fixtures/03-assumerole-broken-trust/policy.jsonconfig492 B
fixtures/03-assumerole-broken-trust/trust-policy.jsonconfig473 B
fixtures/05-iam-mutation-boundary-capped/meta.jsonconfig696 B
fixtures/05-iam-mutation-boundary-capped/policy-1.jsonconfig550 B
fixtures/05-iam-mutation-boundary-capped/policy-2.jsonconfig945 B
fixtures/06-cross-account-assume-condition-gated/meta.jsonconfig700 B
fixtures/06-cross-account-assume-condition-gated/policy-1.jsonconfig690 B
fixtures/06-cross-account-assume-condition-gated/policy-2.jsonconfig512 B
fixtures/06-cross-account-assume-condition-gated/trust-policy.jsonconfig400 B
fixtures/07-passrole-sandboxed-role-orphaned/meta.jsonconfig997 B
fixtures/07-passrole-sandboxed-role-orphaned/policy-1.jsonconfig508 B
fixtures/07-passrole-sandboxed-role-orphaned/policy-2.jsonconfig571 B
fixtures/07-passrole-sandboxed-role-orphaned/policy-3.jsonconfig640 B
fixtures/08-ml-platform-passrole-launch-needle/meta.jsonconfig1.0 KB
fixtures/08-ml-platform-passrole-launch-needle/policy-1.jsonconfig713 B
fixtures/08-ml-platform-passrole-launch-needle/policy-2.jsonconfig670 B
fixtures/08-ml-platform-passrole-launch-needle/policy-3.jsonconfig745 B
fixtures/08-ml-platform-passrole-launch-needle/policy-4.jsonconfig647 B
fixtures/08-ml-platform-passrole-launch-needle/policy-5.jsonconfig959 B
fixtures/08-ml-platform-passrole-launch-needle/policy-6.jsonconfig568 B
tests/README.mdmarkdown3.8 KB
tests/_audit.pyscript32.5 KB
tests/_replay.pyscript720 B
tests/eval/README.mdmarkdown5.5 KB
tests/eval/eval_results.jsonconfig493.4 KB
tests/eval/judge_prompt.mdmarkdown3.0 KB
tests/eval/rubric.mdmarkdown3.3 KB
tests/eval/run_eval.pyscript16.1 KB
tests/eval/scenarios.pyscript11.2 KB
tests/replay_01_orphaned_passrole_deny.pyscript1.5 KB
tests/replay_02_action_star_blanket_deny.pyscript1.4 KB
tests/replay_03_assumerole_broken_trust.pyscript1.5 KB
tests/replay_05_iam_mutation_boundary_capped.pyscript2.1 KB
tests/replay_06_cross_account_assume_condition_gated.pyscript1.8 KB
tests/replay_07_passrole_sandboxed_role_orphaned.pyscript2.0 KB
tests/replay_08_ml_platform_passrole_launch_needle.pyscript2.3 KB

FAILURE_MODES.md

View on GitHub
# Failure modes: iam-deceptive-escalation-auditor

This skill resolves the effective permissions across a principal's policy documents and
reports escalation paths. It is correct for what those documents express and wrong in the
predictable ways below. Read this before acting on a finding.

## 1. It audits the documents supplied, not the principal's true permission set

Effective permissions are the union of **every** managed and inline policy attached to the
principal, plus its permissions boundary, minus org SCPs. If only some of those are passed:

- A real grant may be **missing** — the escalation exists in a policy you did not supply, so
  the audit reports clean when it is not.
- A neutralising **Deny may be missing** — the audit flags a critical that a boundary or
  another policy actually caps.

The boundary section names this every time. A clean verdict means "clean across the documents
supplied," not "this principal cannot escalate."

## 2. Deny resolution is approximated at Resource "*"

The resolver treats an action as denied when a `Deny` statement matches it on `Resource "*"`
(or an empty/everything `NotResource`). Real IAM evaluates Deny per concrete resource ARN. So:

- A **resource-specific Deny** that neutralises a grant on one ARN is *not* modelled — the
  audit may still report the grant as live.
- The approximation is deliberately conservative: it never *under*-reports a grant on a
  wildcard resource, which is the escalation case the skill cares about. It can *over*-report
  when a narrow Deny would have killed a narrow grant.

## 3. Severity assumes the targeted role is more privileged

E1 (PassRole + launch), E3 (function hijack), and E5 (trust rewrite + assume) are only
escalations if the role being passed, the function's execution role, or the assumed role is
**more privileged than the caller**. Those privileges live in *other* documents this audit
does not contain. A scoped PassRole is reported `high` precisely because the gain is
unconfirmed; an unscoped one is `critical` because *some* reachable role is almost certainly
more privileged. Confirm the target's privileges before treating a finding as a breach.

## 4. The wildcard expansion is a privilege-relevant subset, not all of AWS

When the skill expands `Action '*'` or `svc:*`, it lists the security-relevant actions from a
curated catalogue, not all ~14k AWS actions. The wildcard also grants many benign actions the
expansion does not name. The expansion is for *display* (what makes the wildcard dangerous),
not a complete enumeration. Do not read the listed actions as the full grant.

## 5. "Clean" means neutralised in this document set, not safe

A clean verdict (no real escalation) means the effective permissions, as resolved here,
neutralise the apparent escalation: a Deny kills it, a scope pins it, a trust does not point
back, a condition cannot be satisfied. It does **not** prove the principal is safe — a policy
you did not supply (section 1), a resource-specific grant the resolver did not model
(section 2), or a future edit that removes the Deny can re-arm the combo. The clean verdict
always ships with the boundary, for exactly this reason.

## 6. NotAction and case-insensitive matching are subtle

`Allow` + `NotAction` is allow-all-except, not allow-these (W3); reading it as a narrow grant
inverts its meaning entirely. IAM matches action patterns case-insensitively and with globs;
a hand audit that matches case-sensitively or treats `iam:Create*` as literal will both miss
grants and clear ones that match. The reference engine matches the way IAM does
(`fnmatch` on lowercased action); a manual read that does not will disagree with it.
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall