feat: add cdk, lsof, go, mcp-atlassian, pnpm policies + expand npx/npm#10
Open
3stacks wants to merge 6 commits into
Open
feat: add cdk, lsof, go, mcp-atlassian, pnpm policies + expand npx/npm#103stacks wants to merge 6 commits into
3stacks wants to merge 6 commits into
Conversation
…e commands Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New allow-lsof policy permits lsof inspection (ports, PIDs, files), with safe pipeline support - Add tsc/typescript to npx safe-package allowlist for typechecking - Switch allow-npm/pnpm/yarn install to safeBashCommandOrPipeline so `npm ci 2>&1 | tail -5` works Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Auto-allows informational cdk commands (ls, diff, synth, doctor, context, metadata, notices); deploy, destroy, bootstrap, import, migrate, rollback, and watch fall through to prompt since they mutate live infrastructure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The AWS CLI policy previously only matched profiles passed via --profile. Shells that export AWS_PROFILE (a common workflow) fell through to a permission prompt even for ReadOnly profiles, and Admin profiles weren't gated at all. Profile resolution now falls back to call.context.env.AWS_PROFILE when no flag is set, matching AWS CLI's own precedence (flag wins over env). Bumps to 0.7.0. Adds six tests covering ReadOnly/Admin via env, destructive override, flag-wins-over-env, and unknown-profile fall-through. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- ASK verdict short-circuits the policy chain like allow/deny, emitting
permissionDecision='ask' to force a prompt regardless of settings.json
auto-allows. Used by ko-work's "Ask before Xero writes" project policy.
Exposed as ask(reason?) helper from src/index.
- New built-in policies:
- allow-docker-read-only, allow-docker-compose-exec-mysql-readonly,
allow-docker-compose-exec-tests for non-destructive docker use
- allow-subshell-cd-test for cd-in-subshell patterns used by tests
- allow-toolgate-cli-readonly for toolgate's own read-only CLI subcommands
- allow-rm-project-tmp expanded for additional temp paths
- runner.ts now logs every NEXT-verdict tool call to
~/.claude/permission-requests.jsonl for audit visibility.
- Version 0.7.0 -> 0.10.0
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds five new built-in policies and broadens two existing ones, then bumps to 0.5.0.
New policies
allow-go— read-only Go subcommands (build,vet,version, etc.)allow-mcp-atlassian— Atlassian MCP read toolsallow-pnpm-package-script— pnpm scripts declared in the project'spackage.jsonallow-lsof—lsoffor inspecting open files / sockets / portsallow-cdk— read-only CDK subcommands (ls,diff,synth,doctor,context,metadata,notices);deploy,destroy,bootstrap,import,migrate,rollback, andwatchfall through to prompt since they mutate live infrastructureExpanded policies
allow-npx-safe— addstscandtypescript(typechecking is read-only)allow-npm-install— switches tosafeBashCommandOrPipelinesonpm ci 2>&1 | tail -5no longer promptsOther
PURE_COMMANDSinparse-bash-ast.ts(clear,date,env,hostname,id,printenv,uname,uptime,which,whoami)Test plan
bun test— 1381 tests pass