Back to skill

Security audit

Prompt Injection Guard(提示注入防护)

Security checks for vulnerabilities and agentic risk

Overview

This scanner needs review because its safety badges can mislead users and its promised file protections and secret masking are missing.

Do not rely on this version's SAFE badge or use it as a release security gate. Before use, require fixes for misleading badges, broken execution and scoring, path containment, overwrite protection, and secret masking. Any evaluation should use isolated, explicitly selected test files. The scanner's partial coverage exceptions were investigated and do not represent missing runtime code.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (6)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The implementation contradicts the advertised safety contract: badge rendering labels failures SAFE, and file operations lack the promised containment checks. The missing os import currently prevents the CLI from reaching those operations, while the maximum score of 50 guarantees FAIL rather than unsafe acceptance; nevertheless, the badge function can independently produce misleading security evidence.

Content

No source excerpt is available for this finding.

YARA rule 'crypto_miner_software': References to known cryptocurrency mining software [cryptominers]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched cryptocurrency mining indicators (stratum protocol, mining pools, miner binaries, or cryptojacking scripts).

Content

Scanner excerpt · scripts/prompt_guard.py (reported line 29)May include surrounding context.

python
?key|BEGIN [A-Z ]*PRIVATE KEY",
    ],
    "destructive_command": [
        r"(?i)rm\s+-rf\s*/|rm\s+-rf\s+~\s*$",
        r"(?i)DROP TABLE|DROP DATABASE",
        r"(?i)mkfs|dd\s+if=.*of=/dev/",
    ],
    "data_exfiltration": [
        r"(?i)curl\s+[^|]*\s+-d\s|curl\s+.*\|.*sh",
        r"(?i)~\/(\.ssh|\.aws|\.gnupg|\.git)",
        r"(?i)rev(erse)?[- ]?shell",
    ],
    "crypto_mining": [r"(?i)xmrig|coinhive|minerd|cpuminer|stratum\+tcp"],
    "privilege_escalation": [
        r"(?i)sudo\s+rm|chmod\s+777|chown\s+root",
        r"(?i)useradd\s+-o|passwd\s+-?\w*\s+root",
    ],
    "persistence": [
        r"(?i)crontab|@reboot|authorized_keys",
        r"(?i)\.bashrc|rc\.local|systemctl\s+enable",
    ],
    "obfuscation": [
        r"(?i)base64\s*-d\s*\||base64\s*--decode\s*\|",
        r"(?i)eval\(\$\(|compile\(.*exec\(|__import__\(['\"]os",
    ],
}

def scan(text):
    hits = []
    for cat, pats in THREATS.items():
        for p in pats:
            for m in re.finditer(p, text)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

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 76)May include surrounding context.

md
3. Output SAFE / MACH / TOTAL scores and verdict (TOTAL ≥ 60 = PASS); `--badge out.svg` emits an LGD SAFE SVG; FAIL → exit 1 (fail-closed).

### Safety boundary
- Static analysis only; never auto-executes external commands.
- On risk detection → FAIL; human decides.
- Does not delete / modify / publish anything.

The trigger “Scan it once before we ship” does not specify a security scan or the skill’s supported threat categories.

Medium
Category
Trigger Abuse
Confidence
94% confidence
Finding

This phrase can refer to release checks such as proofreading, functional testing, or dependency review rather than static threat scanning. The instruction to activate on any listed phrase makes this generic request sufficient to load the skill without confirming the intended scan.

Content

No source excerpt is available for this finding.

File input and badge output paths are not restricted to the declared project directory.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The input path is read and the badge path is opened for truncating writes without project-root validation or symlink rejection, allowing out-of-scope reads or overwrites under the process's filesystem permissions. The missing os import currently blocks this CLI path with NameError, so exploitation through the supplied entry point is latent until that defect is fixed or os is otherwise supplied.

Content

No source excerpt is available for this finding.