Back to skill

Security audit

Skill Index

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but its optional hook installer persistently replaces Git hooks and can run future repository scripts automatically.

Install only if you are comfortable with this skill changing repository Git hooks. Before running install-hooks.sh, check whether .git/hooks/pre-commit or .git/hooks/post-merge already exist and back them up; prefer manual register.sh use if you do not need automatic commit/pull updates.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
install-hooks.sh:14
Finding

Persistent Git Hook Installation and Replacement

Content
View full analysis
"$HOOKS_DIR/pre-commit" << 'HOOKEOF' #!/bin/bash # Skill Registry pre-commit hook # 自动更新 INDEX.md 并加入当前 commit SKILLS_DIR="$(git rev-parse --show-toplevel)/skills" REGISTER_SCRIPT="$SKILLS_DIR/skill-index/register.sh" INDEX_FILE="$SKILLS_DIR/INDEX.md" if [ -f "$REGISTER_SCRIPT" ] && git diff --cached --name-only | grep -q "^skills/"; then echo "🔄 Skill 目录有变更,更新索引..." bash "$REGISTER_SCRIPT" --quiet git add "$INDEX_FILE" echo "✅ INDEX.md 已更新并加入 commit" fi HOOKEOF chmod +x "$HOOKS_DIR/pre-commit" echo " ✅ pre-commit hook 已安装" # post-merge hook cat > "$HOOKS_DIR/post-merge" << 'HOOKEOF' #!/bin/bash # Skill Registry post-merge hook # pull 后自动更新索引 SKILLS_DIR="$(git rev-parse --show-toplevel)/skills" REGISTER_SCRIPT="$SKILLS_DIR/skill-index/register.sh" if [ -f "$REGISTER_SCRIPT" ]; then echo "🔄 Pull 完成,更新 skill 索引..." bash "$REGISTER_SCRIPT" --quiet fi HOOKEOF chmod +x "$HOOKS_DIR/post-merge" ``` ### Technical Analysis The installer directly writes executable files to `.git/hooks/pre-commit` and `.git/hooks/post-merge` using shell redirection. Because `>` replaces the destination, any existing hooks are overwritten without backup, confirmation, or safe chaining. The installed hooks establish execution triggers that remain active after the installation process ends: - The `pre-commit` hook runs during future commits when staged paths begin with `skills/`. - The `post-merge` hook runs after future merges. - Both hooks invoke the mutable repository file `skills/skill-index/register.sh`. - The pre-commit hook additionally runs `git add "$INDEX_FILE"`, modifying the set of content included in the pending commit. Although the documented purpose is automatic index maintenance, the hooks trust whate ...[truncated 2355 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The core declared function of scanning skills and generating a categorized INDEX.md is accurately represented by the script. However, the description also claims it will 'keep it in sync via git hooks,' which is not implemented in this code chunk: the script only generates INDEX.md when manually run and merely mentions git hooks in the generated file text. There is no hook installation, git integration, or automatic sync behavior shown. Therefore this is a partial description-behavior mismatch.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. **Scan** — Recursively find all `SKILL.md` files under `skills/`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. **Scan** — Recursively find all `SKILL.md` files under `skills/`

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly instructs the agent to run shell scripts (register.sh and install-hooks.sh) but does not declare any tool restrictions or allowed-tool scope. That makes the effective execution capability broader and less reviewable than the metadata suggests, increasing the chance that an agent or operator will invoke filesystem- and git-modifying commands without clear consent boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrases such as scan skills, update index, skill catalog, and manage skill list are broad enough to match ordinary user requests and could cause this skill to activate unexpectedly. In context, unexpected activation is more dangerous because the skill encourages shell execution and repository changes, including potential git hook installation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's human-facing comments and console output are written in Chinese, and generated content also uses Chinese labels, without offering a language choice. This can violate language/locale policy when a skill imposes a specific language on users without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script includes natural-language comments and user-facing echo output exclusively in Chinese, such as the installation and status messages. For a general-purpose skill, forcing a specific language without opt-in can violate language/locale policy because users are not given a choice or informed that the skill is Chinese-only.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This shell script overwrites the generated index file via redirection to "$INDEX_FILE", which is a file write operation. Although the header comments mention the output path, there is no runtime confirmation prompt or explicit user-facing warning immediately before performing the overwrite.

Content

No source excerpt is available for this finding.