iam-tap
v0.1.0
Published
Live AWS SDK call interceptor (CSM UDP) that emits least-privilege IAM policies as JSON, Terraform, or CDK
Maintainers
Readme
iam-tap
One line: npx iam-tap -- npm test (or bunx iam-tap -- bun test) produces a least-privilege IAM policy from real AWS SDK calls via Client-Side Monitoring (CSM UDP :31000).
Install
bunx iam-tap -- npm test
npx iam-tap -- npm test
# or install in your project / globally
bun add -d iam-tap
npm i -D iam-tapJSR:
bunx jsr add @kanchingyg/iam-tap
npx jsr add @kanchingyg/iam-tapgo install github.com/kanchingyg/iam-tap@latestThe core engine is Go (main.go, internal/): CSM UDP listener with token auth, argv-only child spawn (no shell), IAM policy emission, and --mcp JSON-RPC on stdio. TypeScript under src/*.ts is included for npx / bunx / JSR usage and MCP bridge helpers when no native binary is present.
Quick start
npx iam-tap -- npm test
bunx iam-tap -- bun test
npx iam-tap --format terraform -- vitest run
npx iam-tap --mcp
iam-tap --help # after go installDry-run is the default: mutating MCP tools (write_policy_file) are blocked until you pass --allow-write (which disables dry-run). Policy writes are path-contained under the working directory.
MCP & local models
{
"mcpServers": {
"iam-tap": {
"command": "npx",
"args": ["-y", "iam-tap", "--mcp"]
}
}
}