Skip to content
Back to skills

Agent Execution Safety Auditor

BSecurity

Use when auditing execution sinks, shell command construction, path arguments, path traversal attempts, and dry-run scope fidelity.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 9, 2026
ai-agentsshellbashnodesecurity

Works with

  • cli

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro shows the line behind each finding and how to fix it

Scanned November 21, 2026

npx -y skills add Harmitx7/tribunal-kit --skill agent-execution-safety-auditor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Execution Safety Auditor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Execution Safety Auditor
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-agent-execution-safety-auditor/badge)](https://www.skillsdirectory.com/skills/harmitx7-agent-execution-safety-auditor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-execution-safety-auditor
description: 'Use when auditing execution sinks, shell command construction, path arguments, path traversal attempts, and dry-run scope fidelity.'
version: 1.0.0
last-updated: 2026-10-30
skills:
  - clean-code
  - data-validation-schemas
tools: Read, Grep, Bash
scripts-binding:
  - src/security/execution_safety_engine.js
  - src/security/boundary.js
  - src/security/index.js
inputs:
  command_string: 'string'
  target_path: 'string'
outputs:
  execution_safe: 'boolean'
  violations: 'array'
  sanitized_command: 'string'
trigger:
  - 'execution safety audit'
  - 'command sink inspection'
  - 'shell injection check'
  - 'agent execution sandbox'
  - 'path traversal audit'
  - 'agent-execution-safety-auditor'
---

# Agent Execution Safety Auditor

## Mandatory Pre-Flight Context Inspection

Before approving or executing agent-generated commands or file operations, inspect these 5 critical parameters:

1. **Shell Chaining & Operator Ban**: Disallow unescaped chaining operators (`;`, `&&`, `||`, `|`, `&`, `eval`, `exec`, backticks, `$()`).
2. **Destructive Command Blocking**: Prohibit recursive root deletions (`rm -rf /`), disk formatting (`mkfs`, `format`), wildcard permission escalations (`chmod 777`), and curl-to-shell piping.
3. **Environment Hijack Prevention**: Block modifications to runtime loader variables (`LD_PRELOAD`, `LD_LIBRARY_PATH`, `NODE_OPTIONS`).
4. **Filesystem Containment Invariant**: Enforce `assertWithinRoot(authorizedRoot, targetPath)` to stop relative path traversal (`../`) and symlink escapes.
5. **Dry-Run Scope Fidelity**: Ensure high-risk operations support and enforce non-destructive `--dry-run` or inspection passes prior to file mutation.

## Activation Boundaries

- **Activate when:** Evaluating agent tool proposals to run shell commands, create or edit files, or execute CLI tasks.
- **DO NOT activate when:** Auditing tool authorization scopes without command arguments (use `agent-tool-permission-auditor`).

## 🔁 Multi-Pass Execution Protocol

| Pass       | Phase                         | Core Action                                                                             | Adaptive Depth         |
| :--------- | :---------------------------- | :-------------------------------------------------------------------------------------- | :--------------------- |
| **Pass 1** | **Shell Operator Scan**       | Scan command strings for dangerous chaining and substitution operators.                 | Fast / Standard / Deep |
| **Pass 2** | **Destructive Pattern Check** | Match commands against `DESTRUCTIVE_COMMAND_PATTERNS`.                                  | All Modes              |
| **Pass 3** | **Path Containment Audit**    | Execute `auditPathContainment` on all filesystem target paths using `assertWithinRoot`. | Standard / Deep        |
| **Pass 4** | **Dry-Run Fidelity Check**    | Verify whether mutation commands include non-destructive inspection flags.              | All Modes              |
| **Pass 5** | **Execution Triage**          | Emit an execution safety report; reject commands violating safety invariants.           | Standard / Deep        |

## Verification Command

```bash
npx jest test/unit/ai_security_execution_safety.test.js
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.