Back to skill

Security audit

Reviewer Agent

Security checks for vulnerabilities and agentic risk

Overview

This review skill mostly matches its purpose, but it can write reports and send review conclusions through Feishu with broad activation and weak scoping.

Install only if you are comfortable with review results being written locally and potentially sent through Feishu. Before use, narrow the triggers, require explicit approval before any Feishu notification, define exactly what content and recipient are used, and validate project names in the helper script.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/reviewer/review-check.sh:14
Finding

Unvalidated Project Name Allows Directory Traversal During Skill Inspection

Content
View full analysis
/dev/null; then version=$(grep "^version:" "$skill_dir/SKILL.md" | head -1 | cut -d':' -f2 | tr -d ' ') fi echo "- 版本:$version" # 更新时间 if [ -f "$skill_dir/SKILL.md" ]; then local mtime=$(stat -c %y "$skill_dir/SKILL.md" 2>/dev/null | cut -d' ' -f1) echo "- SKILL.md更新:$mtime" fi # check.sh存在 local check_sh=$(find "$skill_dir/scripts" -name "*check.sh" 2>/dev/null | wc -l) if [ $check_sh -gt 0 ]; then echo "- ✅ check.sh存在" else echo "- ❌ 缺少check.sh" fi # 语法检查 for sh in $(find "$skill_dir/scripts" -name "*.sh" 2>/dev/null); do bash -n "$sh" 2>&1 && echo " ✅ $sh 语法OK" || echo " ❌ $sh 语法错误" done echo "" } main() { local project=${1:-all} # ... if [ "$project" = "all" ]; then for skill in "$SKILL_DIR"/apollo-*; do local name=$(basename "$skill") check_skill "$name" done else check_skill "$project" fi } ``` ### Technical Analysis The script accepts its first command-line argument as `project` and passes it directly to `check_skill`. That function constructs a filesystem path by concatenating the trusted base directory with the unvalidated value: ```bash local skill_dir="$SKILL_DIR/$skill_name" ``` The script does not restrict `skill_name` to a single directory component, canonicalize the resulting path, or verify that the resolved path remain ...[truncated 2585 chars]
Remediation
View remediation
&2 return 1 fi ``` 2. Canonicalize both the base directory and candidate path, then enforce containment: ```bash local base_dir candidate base_dir=$(realpath -- "$SKILL_DIR") || return 1 candidate=$(realpath -- "$base_dir/$skill_name") || { printf 'Error: skill directory does not exist\n' >&2 return 1 } case "$candidate" in "$base_dir"/*) skill_dir=$candidate ;; *) printf 'Error: skill path escapes the skills directory\n' >&2 return 1 ;; esac ``` 3. If symbolic links must not escape the skill root, retain the canonical containment check rather than relying only on a regular expression. 4. Use arrays or null-delimited `find` output when iterating through shell scripts so spaces and special characters in filenames are handled safely: ```bash while IFS= read -r -d '' sh; do if bash -n "$sh" 2>&1; then printf ' ✅ %s syntax OK\n' "$sh" else printf ' ❌ %s syntax error\n' "$sh" fi done < <(find "$skill_dir/scripts" -type f -name '*.sh' -print0 2>/dev/null) ``` 5. Add regression tests covering `../`, absolute paths, symbolic-link escapes, nonexistent targets, whitespace, and valid skill names. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include generic terms like '评审', 'review', and '质量检查', which are broad enough to activate on ordinary user requests that may not intend to invoke this specific skill. Over-broad activation can cause unintended execution of the skill's side effects, including report file creation and external notification steps.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs writing a report file and sending a Feishu notification without warning the user about persistence or external disclosure of potentially sensitive project information. Because review outputs may contain internal defects, timelines, and security issues, silent storage and transmission materially increase confidentiality risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs the agent to send a Feishu notification as part of a review workflow, which introduces external communication not strictly required to produce an independent assessment. This creates a data disclosure path for review contents, project metadata, or sensitive findings without any visible consent, scoping, or approval controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This shell script includes natural-language comments and user-facing output entirely in Chinese, such as the script description and status messages. That can violate a language/locale policy when the skill does not offer opt-in, fallback, or any justification that it is intended only for a Chinese-speaking environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language description and operational instructions are entirely in Chinese, and the skill provides no option for another language or user opt-in for locale preference. This can constitute a language/locale policy issue when a skill implicitly enforces one language without documenting the restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

该技能声明目的是对项目进行独立评审,通常可围绕代码、文档、进度与产出进行审查。L068要求验证clawhub发布状态,暗示访问外部平台或发布系统,这超出了通用“第三方评审”所必需的最小能力范围。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.