Back to skill

Security audit

HIIC-skill-vetter

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent security-vetting helper, but its bundled scanner can overread local files and leak matched lines when reviewing untrusted skill directories.

Install only if you understand this as a manual triage aid, not a final security authority. If you use the bundled scanner, run it in a sandbox or on a copy of the target with symlinks removed, avoid publishing raw JSON/text findings that may contain secrets, and manually inspect SKILL.md prose plus any files the scanner excludes.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
vet_scan.py:150
Finding

Symlink Traversal Allows Reading and Reporting Files Outside the Scan Target

Content
View full analysis
Iterable[Path]: for path in sorted(root.rglob("*")): if not path.is_file(): continue rel = path.relative_to(root) if should_skip(rel): continue if path.name in DEFAULT_IGNORED_FILES: continue yield path ``` ```python def scan_file(path: Path, patterns: dict[str, list[re.Pattern[str]]]) -> dict[str, list[Match]]: try: content = path.read_text(encoding="utf-8", errors="replace").splitlines() except OSError: return {k: [] for k in patterns} ``` ```python "red_flags": { key: [m.__dict__ for m in matches[:20]] for key, matches in findings.items() }, ``` ### Technical Analysis The scanner recursively enumerates files beneath the supplied target with `Path.rglob()`. It verifies that each candidate is a file with `Path.is_file()`, but this operation follows symbolic links. The subsequent `Path.read_text()` operation also follows symbolic links. The lexical `path.relative_to(root)` check only confirms that the symlink entry is located under the target directory. It does not verify that the symlink's resolved destination remains under that directory. If an untrusted Skill package contains a symlink whose destination is a readable file elsewhere on the host, the scanner can read that external file. Any matching line is retained in the `Match.text` field. Up to 20 complete matches per category are then serialized into JSON output. Text and chat reports can also include a complete matched source line through `evidence_text()`. The scanner therefore exceeds the minimum privilege boundary implied by its command-line target: it can access readable files outside the directory t ...[truncated 1506 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
vet_scan.py:83
Finding

Reserved Basenames Allow Complete File-Level Scanner Bypass

Content
View full analysis
Iterable[Path]: for path in sorted(root.rglob("*")): if not path.is_file(): continue rel = path.relative_to(root) if should_skip(rel): continue if path.name in DEFAULT_IGNORED_FILES: continue yield path ``` ### Technical Analysis The scanner excludes files solely by basename. This exclusion applies at every depth of the untrusted target directory and does not verify that the omitted files are trusted copies of the scanner itself. Consequently, any code placed in a file named `vet_scan.py` or `vet-scan.sh` is silently excluded from the file inventory used for security findings. The scanner does not analyze the file's content, location, hash, or execution role before omitting it. Because these are ordinary executable script names, a Skill can legitimately reference or invoke such a file while the scanner reports no findings from it. This creates a deterministic and trivial evasion technique. ### Attack Path 1. An attacker places sensitive access, network transmission, dynamic execution, persistence, or another harmful behavior in a file named `vet_scan.py` or `vet-scan.sh`. 2. The Skill invokes that file directly or from another component. 3. A reviewer runs the Python scanner against the Skill directory. 4. `iter_files()` compares only `path.name` with `DEFAULT_IGNORED_FILES`. 5. The malicious file is omitted regardless of its directory or contents. 6. Its behavior does not contribute findings or risk-score weight. 7. The reviewer may receive an understated verdict and install the Skill. ### Impact Assessment This issue does not directly execute attacke ...[truncated 473 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
vet_scan.py:171
Finding

Broad Substring Suppression Enables Line-Level Detection Evasion

Content
View full analysis
bool: return any(token in stripped for token in ["run_search ", "PATTERN_GROUPS =", "RISK_WEIGHTS =", 'r"', "re.compile("]) ``` ```python def scan_lines(path_label: str, lines: list[tuple[int, str]], patterns: dict[str, list[re.Pattern[str]]], source_kind: str) -> dict[str, list[Match]]: results: dict[str, list[Match]] = {k: [] for k in patterns} for idx, line in lines: stripped = line.strip() if not stripped: continue if should_ignore_line(stripped): continue for group, regexes in patterns.items(): for regex in regexes: if regex.search(line): results[group].append(Match(path_label, idx, stripped, regex.pattern, source_kind=source_kind)) break return results ``` ### Technical Analysis The scanner skips an entire source line before applying any security pattern if that line contains one of several ordinary substrings. The check is not limited to the scanner's own pattern declarations and is not syntax-aware. Strings such as `r"` and `re.compile(` can occur naturally or can be added deliberately in a comment, string literal, or secondary expression. Once present, all other content on that line is exempt from analysis. An attacker can therefore place a detectable dangerous operation on a line and append a suppression token to prevent every pattern group from evaluating that line. This can hide network calls, dynamic execution, package installation, persistence, elevated commands, sensitive access, or direct IP usage. ### Attack Path 1. An attacker writes a dangerous operation that would normally match a configured pattern. 2. On the same physical ...[truncated 937 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
vet_scan.py:486
Finding

Default Scan Omits Security-Relevant Skill Instruction Prose

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. Read `SKILL.md`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · vet-scan.sh (reported line 54)May include surrounding context.

sh
run_search "SENSITIVE FILE ACCESS" '\.env|~/.ssh|~/.aws|~/.config|MEMORY\.md|USER\.md|SOUL\.md|IDENTITY\.md|cookie|session|token|credential'
run_search "INSTALL / PACKAGE OPS" 'npm install|pnpm add|yarn add|pip install|uv pip|brew install|apt install|yum install|go install|cargo install'
run_search "PERSISTENCE / BACKGROUND" 'cron|systemd|launchd|daemon|service|nohup|tmux|screen|pm2'
run_search "ELEVATED PRIVILEGES" 'sudo|setcap|chmod 777|chown root'
run_search "DIRECT IPS" 'https?://([0-9]{1,3}\.){3}[0-9]{1,3}'

print_section "DONE"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · vet_scan.py (reported line 63)May include surrounding context.

python
run_search "SENSITIVE FILE ACCESS" '\.env|~/.ssh|~/.aws|~/.config|MEMORY\.md|USER\.md|SOUL\.md|IDENTITY\.md|cookie|session|token|credential'
run_search "INSTALL / PACKAGE OPS" 'npm install|pnpm add|yarn add|pip install|uv pip|brew install|apt install|yum install|go install|cargo install'
run_search "PERSISTENCE / BACKGROUND" 'cron|systemd|launchd|daemon|service|nohup|tmux|screen|pm2'
run_search "ELEVATED PRIVILEGES" 'sudo|setcap|chmod 777|chown root'
run_search "DIRECT IPS" 'https?://([0-9]{1,3}\.){3}[0-9]{1,3}'

print_section "DONE"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · vet_scan.py (reported line 30)May include surrounding context.

python
TEXT_EXTENSIONS = {
    ".md", ".txt", ".json", ".yaml", ".yml", ".toml", ".ini", ".cfg", ".conf",
    ".py", ".sh", ".bash", ".zsh", ".js", ".ts", ".tsx", ".jsx", ".mjs", ".cjs",
    ".html", ".css", ".xml", ".sql", ".env", ".example", ".sample", ".lock",
}

EXECUTABLE_EXTENSIONS = {

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · vet_scan.py (reported line 52)May include surrounding context.

python
TEXT_EXTENSIONS = {
    ".md", ".txt", ".json", ".yaml", ".yml", ".toml", ".ini", ".cfg", ".conf",
    ".py", ".sh", ".bash", ".zsh", ".js", ".ts", ".tsx", ".jsx", ".mjs", ".cjs",
    ".html", ".css", ".xml", ".sql", ".env", ".example", ".sample", ".lock",
}

EXECUTABLE_EXTENSIONS = {

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises a vetting workflow and explicitly references running a scanner script, but it does not declare any explicit tool scope such as permissions or allowed-tools. Undeclared access to file reads, network, and shell increases the chance that an agent may invoke broader capabilities than a reviewer expects, which is risky for a security-review skill because its recommendations could influence trust decisions.

Content

No source excerpt is available for this finding.

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 · vet-scan.sh (reported line 54)May include surrounding context.

sh
run_search "SENSITIVE FILE ACCESS" '\.env|~/.ssh|~/.aws|~/.config|MEMORY\.md|USER\.md|SOUL\.md|IDENTITY\.md|cookie|session|token|credential'
run_search "INSTALL / PACKAGE OPS" 'npm install|pnpm add|yarn add|pip install|uv pip|brew install|apt install|yum install|go install|cargo install'
run_search "PERSISTENCE / BACKGROUND" 'cron|systemd|launchd|daemon|service|nohup|tmux|screen|pm2'
run_search "ELEVATED PRIVILEGES" 'sudo|setcap|chmod 777|chown root'
run_search "DIRECT IPS" 'https?://([0-9]{1,3}\.){3}[0-9]{1,3}'

print_section "DONE"

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 · vet_scan.py (reported line 63)May include surrounding context.

python
run_search "SENSITIVE FILE ACCESS" '\.env|~/.ssh|~/.aws|~/.config|MEMORY\.md|USER\.md|SOUL\.md|IDENTITY\.md|cookie|session|token|credential'
run_search "INSTALL / PACKAGE OPS" 'npm install|pnpm add|yarn add|pip install|uv pip|brew install|apt install|yum install|go install|cargo install'
run_search "PERSISTENCE / BACKGROUND" 'cron|systemd|launchd|daemon|service|nohup|tmux|screen|pm2'
run_search "ELEVATED PRIVILEGES" 'sudo|setcap|chmod 777|chown root'
run_search "DIRECT IPS" 'https?://([0-9]{1,3}\.){3}[0-9]{1,3}'

print_section "DONE"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code hardcodes multiple user-facing status and recommendation strings in Chinese, including capability hints, recommendations, and risk labels. That creates a language/locale policy issue because the skill does not offer any user-selectable language option or document a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The compact chat summary prints labels such as 'Skill', '结论', and other report fields in Chinese-oriented output without any opt-in or locale configuration. For a general-purpose auditing tool, forcing one language violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest description emphasizes a practical skill-vetting workflow that prioritizes clear installation judgments and business-aware risk tolerance. In code, the implementation mainly scans files for predefined text patterns, scores them, and emits reports; it explicitly states in the output that business justification and runtime behavior cannot be fully inferred, which is narrower and different from the claimed vetting workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The text-report branch includes several Chinese user-facing messages and guidance strings mixed into the generated report, again without any language selection or user consent. This is a natural-language policy violation because the locale is imposed on all users by default.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

A user would expect a skill-vetting workflow to assess the skill's implemented behavior, but this scanner also treats documentation snippets and optional prose as scan targets. That can affect risk scoring based on examples or descriptive text rather than actual executable behavior, creating a mismatch with the implied behavior-focused vetting purpose.

Content

No source excerpt is available for this finding.