Verify destructive command blocking and sandboxing in Bash-enabled agent skills
Check whether CLI-driven skills block force-pushes, recursive deletes, prod profile mutations, and subshell bypasses cleanly.
Copy the prompt and paste it into the AI assistant you already use.
String-based command blocklists are bypassable; combine PreToolUse guardrails with OS/container sandboxing for untrusted inputs.
Why regex command filters fail—and what strong shell skills do instead
- 01
Pair OS sandboxing with tool-level hooks
Blocklists watching for 'rm -rf' miss 'find . -delete' or 'python -c os.unlink'; Seatbelt or container mounts enforce real boundaries.
- 02
Check dry-run flags before state-mutating CLIs
Well-authored DevOps skills run terraform plan, rsync --dry-run, or git diff --stat and pause before applying changes.
- 03
Verify git branch and remote protections
Ensure coding skills forbid git reset --hard, git clean -fd, and pushing directly to main/master without explicit confirmation.
- 04
Audit interactive TTY hang prevention
Skills running CLI tools without --non-interactive or CI=true flags stall agent harnesses waiting for invisible prompts.
Questions and answers
Can a PreToolUse hook alone guarantee shell safety?
Hooks are great safety rails against accidental mistakes like force-pushing main, but adversarial containment requires OS sandboxes (Seatbelt/Bubblewrap/Docker).
Why do shell skills hang indefinitely on certain commands?
Commands like git rebase -i, npx create-*, or watch open interactive pagers or prompts; ranked CLI skills pass PAGER=cat and non-interactive flags.
Do skill ratings penalize skills asking for --dangerously-skip-permissions?
Yes. Any skill recommending blanket permission bypasses outside ephemeral throwaway containers receives an automatic security warning.
Related tasks in this category
See all in Skill Security, Injection & Permission Audits-
Scan third-party SKILL.md packages and reference files for covert prompt injection
Community skill bundles can hide Unicode tag characters, poisoned reference docs, or stealth instructions inside helper scripts.
-
Audit MCP server OAuth scopes, API token handling, and credential storage hygiene
Many community MCP connectors ask for full repo admin or Gmail read/write/delete scopes when your workflow only needs read access.
-
Test agent skills for covert data exfiltration via Markdown images, DNS, or webhooks
Even without write tools, a compromised skill or untrusted webpage can exfiltrate workspace secrets via rendered Markdown URLs or query strings.
-
Check commit pinning, lockfile hashes, and maintainer provenance in community skill packs
Installing skills from floating GitHub branches or unpinned uvx/npx commands exposes developer laptops to upstream repo takeovers.
-
Benchmark PII and secret redaction skills that scrub sensitive payloads before LLM or API calls
Compare local presidio, regex+NER, and reversible tokenization skills on catching API keys, SSNs, and patient IDs without mangling code.
-
Verify stateful agent skills and memory MCPs never leak context across customer workspaces
Local memory files, shared tmp directories, and unscoped vector collections can bleed Customer A's context into Customer B's session.