Back to skill

Security audit

herdr-faq

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Herdr troubleshooting guide, but it tells agents to bypass or pre-seed trust and approval controls for child coding agents.

Review before installing. This skill is useful only if you intentionally want an agent to orchestrate other coding agents through Herdr. Do not run its launch recipes on untrusted repositories, and avoid the pre-trust, auto-approval, accept-edits, or child-config permissiveness steps unless you understand that they can reduce approval prompts and persist trust decisions on your machine.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:68
Finding
Workspace Trust and Agent Approval Controls Can Be Bypassed## Vulnerability Details **File Location**: `SKILL.md:68`, `SKILL.md:82-87`, `SKILL.md:118-147`, and `SKILL.md:310-313` **Vulnerability Type**: Safety-control bypass and excessive agent authorization **Risk Level**: High ### Vulnerable Code `SKILL.md:68`: ```bash herdr agent start cx1 --kind codex --pane "$P" --timeout 90000 -- --approve-for-me --no-alt-screen ``` `SKILL.md:82-87`: ```bash # Pre-trust first - the folder-trust dialog IS detected, so an untrusted dir fails the # start. Trust is INHERITED: a new dir under an already-trusted parent needs nothing. CFG=/tmp/agentcfg; mkdir -p "$CFG" # isolated from your real config printf '{"projects":{"%s":{"hasTrustDialogAccepted":true}}}' "$D" > "$CFG/.claude.json" ``` `SKILL.md:118-147`: ```bash python3 - "$D" <<'PY' # pre-trust; the dialog is unanswerable (below) import json, pathlib, sys p = pathlib.Path.home() / ".gemini/antigravity-cli/settings.json" d = json.loads(p.read_text()) if p.exists() else {} tw = d.setdefault("trustedWorkspaces", []) # a list of exact paths, not a map if sys.argv[1] not in tw: tw.append(sys.argv[1]) p.write_text(json.dumps(d, indent=2) + "\n") PY P=$(herdr tab create --workspace "$WS" --cwd "$D" --label ag1 --no-focus \ | jq -r .result.root_pane.pane_id) # one TAB per agent, never N panes in one tab herdr agent start ag1 --kind agy --pane "$P" --timeout 120000 \ -- --model gemini-3.7-flash-medium --effort medium --mode accept-edits herdr agent read ag1 --source detection --lines 15 # read the banner, not the status herdr agent prompt ag1 "Carry out $D/brief.md. Write your report to $D/report.md." \ --wait --timeout 1800000 & # then poll for the file, not the state ``` ```text - **The trust dialog is unanswerable from this side.** `agent start` returns `idle`, the screen holds `Do you trust the contents of this project?`, and `s ...[truncated 4084 chars]
Remediation
## Remediation Suggestions 1. Remove `--approve-for-me` and `--mode accept-edits` from default launch recipes. Use read-only or approval-required modes by default. 2. Remove the instruction to place permissive settings in child-agent configuration after a classifier denial. A classifier denial must be treated as an enforced security decision, not a condition to route around. 3. Do not modify `trustedWorkspaces` or write `hasTrustDialogAccepted` automatically. Require the user to review the exact canonical workspace path and confirm trust interactively. 4. If configuration isolation is operationally necessary, create it with restrictive permissions, use a uniquely generated temporary directory, and delete it after the session. Do not change persistent configuration under the user's home directory. 5. Canonicalize and validate `$D` before use. Reject unexpected paths, symbolic-link escapes, sensitive parent directories, and paths not explicitly selected by the user. 6. Keep child agents sandboxed to the selected workspace with minimal filesystem and command permissions. Require separate, scoped confirmation for writes, shell execution, network access, and access outside the workspace. 7. Document blocked dialogs as conditions requiring user intervention or termination. Do not characterize trust-control bypasses as routine preflight steps. 8. Add a security warning that repository instructions are untrusted input and must not be allowed to alter agent safety policies or approval settings.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

External Model or Provider Selection

High
Category
Excessive Agency
Content
P=$(herdr pane split --current --cwd "$D" --no-focus --env CLAUDE_CONFIG_DIR="$CFG" \
    | jq -r .result.pane.pane_id)
herdr agent start cl1 --kind claude --pane "$P" --timeout 90000 -- --model claude-opus-5
herdr agent read cl1 --source detection --lines 40        # ALWAYS, before the first prompt
herdr agent prompt cl1 "Carry out $D/brief.md." --wait --timeout 1800000 &
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
P=$(herdr tab create --workspace "$WS" --cwd "$D" --label ag1 --no-focus \
    | jq -r .result.root_pane.pane_id)      # one TAB per agent, never N panes in one tab
herdr agent start ag1 --kind agy --pane "$P" --timeout 120000 \
  -- --model gemini-3.7-flash-medium --effort medium --mode accept-edits
herdr agent read ag1 --source detection --lines 15   # read the banner, not the status
herdr agent prompt ag1 "Carry out $D/brief.md. Write your report to $D/report.md." \
  --wait --timeout 1800000 &                # then poll for the file, not the state
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Agent Config Directory Access

High
Category
Agent Snooping
Content
wait on the report file, never a settled state. A first prompt
  can be swallowed entirely with `agent_prompt_stalled` and no trace in the composer;
  re-prompt, never `send-keys`. No session ref until the first prompt. Integration
  install target is `antigravity-cli`; `~/.gemini/config` must exist (or
  `ANTIGRAVITY_CLI_CONFIG_DIR`).

Integrations for all three are session-restore only - they never improve state
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Session Persistence

Medium
Category
Rogue Agent
Content
herdr agent start ag1 --kind agy --pane "$P" --timeout 120000 \
  -- --model gemini-3.7-flash-medium --effort medium --mode accept-edits
herdr agent read ag1 --source detection --lines 15   # read the banner, not the status
herdr agent prompt ag1 "Carry out $D/brief.md. Write your report to $D/report.md." \
  --wait --timeout 1800000 &                # then poll for the file, not the state
```
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Session Persistence

Medium
Category
Rogue Agent
Content
## Drive

- **Wait on the artifact, not the state.** End every non-trivial brief with "write
  your full report to `<path>` and reply with only the path", and poll for the file.
  `idle` arrives on interrupted turns, on fleet parents that dispatched children, and
  for the whole life of a claude background MCP task (invariant 4) - a watcher on
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Scope Creep

Low
Category
Excessive Agency
Content
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Scope Creep

Low
Category
Excessive Agency
Content
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Scope Creep

Low
Category
Excessive Agency
Content
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Scope Creep

Low
Category
Excessive Agency
Content
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Static analysis

No suspicious patterns detected.