Handle target-dependent privilege-escalation paths (sts:AssumeRole, ssm, CodeBuild/CloudFormation/AppRunner update) — needs reachability graph, not action matching
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- aws, python
- Domain
- authorization, cloud, security
Research direction
Start by reading PRIVILEGE_ESCALATION_METHODS in cloudsplaining/shared/constants.py and its matching logic in scan/policy_document.py, then review research/pathfinding-cloud/proposed-new-methods.json and INTEGRATION-ANALYSIS.md. Done would require an agreed approach for handling the seven target-dependent paths without treating action matches as guaranteed privilege escalation.
Written by the indexing model from the issue text.
Description
Background
PR #584 added detection for 37 of the 46 pathfinding.cloud privilege-escalation paths cloudsplaining was missing. 7 were deliberately left out — not as an oversight, but because they're a structural mismatch for cloudsplaining's analysis model. This issue tracks how to handle them properly.
The problem
cloudsplaining flags a policy when its expanded actions are a superset of a known method's action list (PRIVILEGE_ESCALATION_METHODS in cloudsplaining/shared/constants.py, matched in scan/policy_document.py). That works for self-contained escalations — e.g. iam:PassRole + lambda:CreateFunction + lambda:InvokeFunction, where the policy itself proves the escalation.
A class of pathfinding.cloud paths are instead target-dependent: the action is privilege escalation only if an existing resource already has a more-privileged role attached. cloudsplaining only sees the policy in front of it — it has no view of which roles exist, what they can do, or what's attached to which resource — so it cannot distinguish escalation from completely benign use. Flagging these on an action match alone would produce massive false positives.
The 7 held paths
| pathfinding path | trigger action | privilege escalation only if… |
|---|---|---|
sts-001 |
sts:AssumeRole |
the assumed role is more privileged than the caller |
ssm-001 |
ssm:StartSession |
the target EC2 instance has a privileged instance role |
ssm-002 |
ssm:SendCommand |
the target EC2 instance has a privileged instance role |
cloudformation-002 |
cloudformation:UpdateStack |
the existing stack has an admin service role |
apprunner-002 |
apprunner:UpdateService |
the existing service has a privileged role |
codebuild-002 |
codebuild:StartBuild |
the existing project has a privileged role (+ buildspec-override) |
codebuild-003 |
codebuild:StartBuildBatch |
the existing project has a privileged role (+ buildspec-override) |
Note: sts:AssumeRole is already surfaced today under Credentials Exposure (ACTIONS_THAT_RETURN_CREDENTIALS) — it's just not (and shouldn't be) labeled as guaranteed privilege escalation. Adding it as a standalone privesc method would also undo the precision intent of #581.
Why it's hard
cloudsplaining is fundamentally a single-policy, action-level analyzer. Deciding whether sts:AssumeRole / ssm:SendCommand / cloudformation:UpdateStack is actually privesc requires cross-resource reachability:
principal → action → target resource → attached role → that role's effective permissions
That's a graph / relationship problem, not a subset match.
Proposed direction (future — not now)
- Build a privilege-escalation reachability graph over the account authorization details (principals, roles, trust policies, resource→role attachments) so we can evaluate whether a target is genuinely more privileged before flagging.
- Interim option: surface these as a separate, lower-severity / informational signal ("potential privilege escalation if the target resource has a privileged role") kept clearly distinct from the High-severity
PrivilegeEscalationfindings, so it doesn't drown out the precise detections.
References
- PR #584 — added 37 paths; documents these 7 as intentionally excluded
research/pathfinding-cloud/proposed-new-methods.json— all 46 paths with per-path false-positive rationaleresearch/pathfinding-cloud/INTEGRATION-ANALYSIS.md— gap analysis- #581 —
sts:AssumeRolebundling fix (context for avoiding action-on-sight over-flagging) - pathfinding.cloud (DataDog)
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from salesforce/cloudsplaining
-
Data Exfiltration: flag snapshot, export and batch secret-read actionsPossibly taken @devteamaegis claimed this 26 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
salesforce/cloudsplaining#654 · 1 comment ·
-
include-actions in exclusions file has no effect on Data Exfiltration finding categoryPossibly taken @nitrocode claimed this 104 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 64/100
salesforce/cloudsplaining#624 ·
-
Proposal: Implement Automated Logic Ingestion for IAM Privilege Escalation via Pathfinding.cloudOpen
Difficulty 4/5 3-5 days Newbie friendliness 45/100
salesforce/cloudsplaining#537 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
salesforce/cloudsplaining#386 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
salesforce/cloudsplaining#324 ·
All issues in salesforce/cloudsplaining
Similar issues
-
verified whatsapp
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 6 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
salesforce/sa11y#1022 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
githubnext/gh-aw-workshop#6379 ·
Maintainers usually reply within 1 day
-
FEATURE REQUEST
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
linuxmint/cinnamon-spices-applets#9386 ·
Maintainers usually reply within 1 day