Back to skill

Security audit

Little Steve Agent Guard

Security checks for vulnerabilities and agentic risk

Overview

This guard skill is not clearly malicious, but it asks to control all skill script execution and has approval and logging weaknesses that users should review before installing.

Install only if you intentionally want a high-impact cross-skill wrapper and are comfortable reviewing its approvals and logs. Treat it as advisory security tooling, not a hard sandbox; avoid passing secrets in command arguments, protect or rotate audit logs, and do not let agents run the emergency reset or bypass procedures automatically.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:31
Finding

Global Agent Execution Workflow Hijacking

Content
View full analysis
[args...] ``` Example: ```bash bash {baseDir}/scripts/guard-exec.sh exec {workspaceDir}/skills//scripts/
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/guard-exec.sh:275
Finding

Unauthenticated Confirmation Path Executes Arbitrary Scripts

Content
View full analysis
[args...]" >&2 exit 1 fi script="$1"; shift pass_args=("$@") if [[ ! -f "$script" ]]; then echo "error: script not found: $script" >&2; exit 1 fi local skill_name args_str skill_name=$(extract_skill_name "$script") args_str="${pass_args[*]:-}" local output exit_code=0 output=$(bash "$script" "${pass_args[@]}" 2>&1) || exit_code=$? local outcome="success" [[ $exit_code -ne 0 ]] && outcome="failure" bash "$AUDIT_SH" log \ --intent "exec_confirmed" \ --input "$args_str" \ --risk "high" \ --decision "allow" \ --evidence "human_approved,exit_code=$exit_code" \ --outcome "$outcome" \ --skill "$skill_name" \ --command "$(basename "$script") $args_str" \ > /dev/null echo "$output" exit $exit_code } ``` ### Technical Analysis The `confirm` command is treated as proof that a human approved an action, but it does not verify any approval state. It does not require a pending request generated by `exec`, an approval token, a session identifier, a timestamp, or a binding to the exact script and arguments. The function also skips `classify_risk` and `decide_action`. A script that would be classified as critical and blocked by the normal `exec` path can therefore be executed directly through `confirm`. The audit entry compounds the issue by recording `human_approved` even though no human approval was authenticated or verified. ### Attack Path 1. An attacker creates or identifies a script containing a critical operation, such as an outbound network request or destructive system command. 2. Normal invocation through `guard-exec.sh exec` would c ...[truncated 780 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/guard-exec.sh:26
Finding

Static Pattern Matching Does Not Enforce the Declared Security Policy

Content
View full analysis
/dev/null; then risk="critical" reasons="${reasons}script contains network binary '$bin'; " fi done # Check: critical system binaries for bin in $SYSTEM_BINS_CRITICAL; do if grep -qw "$bin" "$script" 2>/dev/null; then risk="critical" reasons="${reasons}script contains critical system binary '$bin'; " fi done # Check: contextual system binaries (only flag if used with broad targets) for bin in $SYSTEM_BINS_CONTEXTUAL; do if grep -qE "$bin\s+(-rf|/)" "$script" 2>/dev/null; then if [[ "$risk" != "critical" ]]; then risk="high"; fi reasons="${reasons}script uses '$bin' with broad target; " fi done # Check: dynamic code execution interpreters (can bypass static network checks) for bin in $DYNAMIC_EXEC_BINS; do if grep -qE "\b${bin}\b\s+(-[ce]|--eval)" "$script" 2>/dev/null; then risk="critical" reasons="${reasons}script uses '$bin' with inline code execution; " fi done # Check: evasion techniques (/dev/tcp, base64 decode, eval, sh -c, etc.) if grep -qE "$DYNAMIC_EXEC_PATTERNS" "$script" 2>/dev/null; then risk="critical" reasons="${reasons}script contains dynamic execution or network evasion pattern; " fi fi # Check: command is a delete/remove operation if echo "$args" | grep -qiE '(delete|remove|rm |drop)'; then if [[ "$risk" == "low" ]]; then risk="medium"; fi reasons="${reasons}destructive operation detected; " fi # C ...[truncated 2742 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/audit.sh:65
Finding

Audit and Weekly Report Files Persist Secrets in Plaintext

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/promote-rule.sh:68
Finding

Rule Promotion and Demotion Lack Verifiable Human Authorization

Content
View full analysis
&2; exit 1; }; rule_name="$2"; shift 2 ;; --confirmed) confirmed=true; shift ;; *) echo "error: unknown arg: $1" >&2; exit 1 ;; esac done ``` The flag is the only authorization check before changing the active rule set: ```bash if [[ "$confirmed" != true ]]; then local pattern level pattern=$(head -1 "$candidate") level=$(sed -n '2p' "$candidate") bash "$AUDIT_SH" log \ --intent "promote_rule" \ --input "$rule_name" \ --risk "high" \ --decision "prompt" \ --evidence "awaiting_approval" \ --outcome "pending" \ --reason "rule promotion changes detection behavior" \ > /dev/null echo "⚠️ RULE PROMOTION REQUIRES APPROVAL" echo " Rule: $rule_name" echo " Pattern: $pattern" echo " Level: $level" echo "" echo "Reply '确认' or 'confirm' to promote, anything else to cancel." echo "Then re-run: promote-rule.sh promote --rule $rule_name --confirmed" exit 10 fi cp "$candidate" "$ACTIVE_DIR/${rule_name}.rule" rm "$candidate" ``` Demotion has no approval check: ```bash cmd_demote(){ require_jq local rule_name="" while [[ $# -gt 0 ]]; do case "$1" in --rule) [[ $# -ge 2 ]] || { echo "error: missing --rule" >&2; exit 1; }; rule_name="$2"; shift 2 ;; *) echo "error: unknown arg: $1" >&2; exit 1 ;; esac done [[ -n "$rule_name" ]] || { echo "error: --rule required" >&2; exit 1; } validate_rule_name "$rule_name" local active="$ACTIVE_DIR/${rule_name}.rule" assert_path_w ...[truncated 1859 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (22)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

md
- `guard-exec.sh`: read target scripts for static risk analysis before execution

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 142)May include surrounding context.

md
- `guard-exec.sh`: read target scripts for static risk analysis before execution

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

This runbook explicitly documents deletion of the audit log as part of a full reset. Even though framed as a manual emergency procedure, removing audit records destroys forensic evidence and weakens accountability if an operator or compromised agent follows the instructions.

Content

Scanner excerpt · docs/runbook.md (reported line 66)May include surrounding context.

md
cp -r skills/little-steve-agent-guard/rules /tmp/guard-rules-backup

# Reset
rm -f skills/little-steve-agent-guard/reports/audit-events.jsonl
rm -f skills/little-steve-agent-guard/reports/failure-dataset.json
rm -f skills/little-steve-agent-guard/rules/active/*.rule
rm -f skills/little-steve-agent-guard/rules/candidates/*.rule

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting the failure dataset removes historical security/training data that may be needed for post-incident analysis, regression testing, or detection tuning. In a guard skill, this makes future detection weaker and can conceal prior unsafe behavior.

Content

Scanner excerpt · docs/runbook.md (reported line 67)May include surrounding context.

Reset

rm -f skills/little-steve-agent-guard/reports/audit-events.jsonl rm -f skills/little-steve-agent-guard/reports/failure-dataset.json rm -f skills/little-steve-agent-guard/rules/active/.rule rm -f skills/little-steve-agent-guard/rules/candidates/.rule

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The documented command removes all active rules, effectively disabling most guard protections. In context, this is more dangerous because the same runbook also describes bypassing the guard manually, so an attacker or negligent operator could neutralize defenses before executing risky actions.

Content

Scanner excerpt · docs/runbook.md (reported line 68)May include surrounding context.

Reset

rm -f skills/little-steve-agent-guard/reports/audit-events.jsonl rm -f skills/little-steve-agent-guard/reports/failure-dataset.json rm -f skills/little-steve-agent-guard/rules/active/.rule rm -f skills/little-steve-agent-guard/rules/candidates/.rule

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Removing all candidate rules is destructive and can erase pending security improvements or review artifacts. While less severe than deleting active rules, it still impairs governance and can hide evidence of proposed controls or prior tuning efforts.

Content

Scanner excerpt · docs/runbook.md (reported line 69)May include surrounding context.

rm -f skills/little-steve-agent-guard/reports/audit-events.jsonl rm -f skills/little-steve-agent-guard/reports/failure-dataset.json rm -f skills/little-steve-agent-guard/rules/active/.rule rm -f skills/little-steve-agent-guard/rules/candidates/.rule

text

## Routine Operations

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

This duplicated Chinese reset command again instructs deletion of the audit log and failure dataset. The duplication increases exposure by making the destructive procedure accessible to a broader operator audience without additional safeguards or warnings.

Content

Scanner excerpt · docs/runbook.md (reported line 137)May include surrounding context.

5. 完全重置

bash
rm -f reports/audit-events.jsonl reports/failure-dataset.json
rm -f rules/active/*.rule rules/candidates/*.rule

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

This duplicated command removes active and candidate rules from relative paths, which can disable protections and erase control artifacts. The relative-path form is especially risky because it depends on the current working directory and may affect unintended files if executed from the wrong location.

Content

Scanner excerpt · docs/runbook.md (reported line 138)May include surrounding context.

bash
rm -f reports/audit-events.jsonl reports/failure-dataset.json
rm -f rules/active/*.rule rules/candidates/*.rule

日常操作

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README explicitly states that low/medium-risk commands are auto-executed, which means the guard can authorize file- or system-affecting actions without a fresh user confirmation. In an agent/skill ecosystem where risk classification may be imperfect or bypassable, this creates a real safety gap: harmful commands mislabeled as medium could run automatically.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The documented behavior includes autonomous decision-making to auto-execute commands classified as low/medium risk. For a security control sitting between an agent and arbitrary skill scripts, delegating execution decisions to a heuristic classifier is dangerous because incorrect classification can directly permit unintended or destructive actions without human review.

Content

Scanner excerpt · README.md (reported line 18)May include surrounding context.

text

Every execution is classified (low → medium → high → critical), logged, and gated:
- **Low/Medium**: auto-execute, logged
- **High**: block and ask you first
- **Critical**: reject outright

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
## Approval Levels

- **L1 (low/medium risk)**: Auto-execute, audit logged
- **L2 (dry-run)**: Preview without executing
- **L3 (high risk)**: Block and prompt user — output warning, wait for user to reply "确认" or "confirm"
- **BLOCK (critical)**: Reject entirely, no execution possible

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill hard-codes specific approval phrases ("确认" or "confirm") as the only way to proceed after a high-risk prompt. This can create brittle approval handling, increase the chance of accidental approvals, and reduce user agency or localization flexibility, especially if upstream tooling treats those tokens as privileged control words.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Chinese section repeats the same fixed-token approval requirement, requiring the user to reply with a specific phrase to authorize high-risk actions. This duplicates the same control weakness across locales and may encourage unsafe automation patterns that key off one exact string rather than a robust approval state.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · docs/clawhub-bugs.md (reported line 32)May include surrounding context.

md
**Severity**: Low
**Status**: Design feedback

Skills like agent-guard are inherently cross-skill (read other skills' files for analysis).
The scanner flags this as "broad filesystem scope" even though it's declared and documented.

A "guard" or "meta-skill" category could let the scanner apply different evaluation criteria

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/audit.sh (reported line 19)May include surrounding context.

sh
audit_write(){
  if [[ ! -f "$AUDIT_LOG" ]]; then
    touch "$AUDIT_LOG"
    chmod 600 "$AUDIT_LOG"
  fi
  echo "$1" >> "$AUDIT_LOG"
}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/audit.sh (reported line 116)May include surrounding context.

sh
audit_write(){
  if [[ ! -f "$AUDIT_LOG" ]]; then
    touch "$AUDIT_LOG"
    chmod 600 "$AUDIT_LOG"
  fi
  echo "$1" >> "$AUDIT_LOG"
}

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · scripts/guard-exec.sh (reported line 17)May include surrounding context.

sh
# Dangerous binaries that indicate network or system-level access
NETWORK_BINS="curl wget nc ncat socat telnet ssh scp rsync ftp"
# Interpreters that can make runtime network calls or execute arbitrary code
DYNAMIC_EXEC_BINS="python python3 perl ruby node deno bun"
# chmod on own data files is safe; only flag chmod with dangerous targets
SYSTEM_BINS_CRITICAL="mkfs dd mount umount"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt instructs the user to reply with either 确认 or confirm to proceed, hard-coding accepted language tokens rather than offering a locale choice or neutral confirmation mechanism. This is a natural-language policy issue because it imposes specific language forms without explicit user opt-in or documented locale constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The confirm path executes any supplied script directly with bash "$script" "${pass_args[@]}" after only a prior out-of-band approval step, and it performs no re-validation of the script contents, path, or risk at the moment of execution. This creates a time-of-check/time-of-use gap: a script judged high-risk earlier can be modified or swapped before confirm, resulting in arbitrary code execution under a misleadingly approved context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
0% confidence
Finding

The file includes both English and Chinese versions of the same content rather than imposing a single required language. This does not constitute a natural-language policy violation under the stated rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents a second full runbook section in Chinese, which imposes a specific language variant for part of the documentation without any stated user opt-in or explanation of locale requirements. The policy allows locale-specific content when clearly justified, but no such justification appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The user-facing prompt explicitly requires replying with either '确认' or 'confirm' to proceed. This imposes a language-specific interaction constraint without offering broader language choice or documenting a justified locale limitation, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.