Back to skill

Security audit

lgd-skill-review

Security checks for vulnerabilities and agentic risk

Overview

The skill is rated suspicious with medium confidence because scanners report unsafe handling of an appeal log, risky execution of reviewed tests, and incomplete inspection of some code; these findings indicate security weaknesses, not clear malicious intent.

Consider the suspicious verdict and the incomplete inspection before installing. In particular, avoid the optional test-running mode on your regular machine: the scanner reports that reviewed-package tests may run with your permissions and access. The results do not establish malicious intent, but they also do not establish that the incompletely inspected code is safe.

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/review.py
Finding

An attacker-supplied appeal-log symlink can overwrite files outside the reviewed package

Content
View full analysis

Impact

An attacker can corrupt or overwrite a known, reviewer-writable file outside the package. Non-list or invalid JSON destinations are replaced with a new log; existing JSON lists are modified. This establishes an unauthorized integrity impact, not arbitrary executable-content control.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (14)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/review.py <技能目录>

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/review.py <技能目录> --json

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/review.py <技能目录> --run

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python scripts/review.py <技能目录> --run --type meeting

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/review.py` | 评测引擎(零依赖) | 直接跑 |

Code capability 'file_write' detected in demo/run_demo.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/review.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

Scanner excerpt · scripts/review.py (reported line 642)May include surrounding context.

python
def _safe_path(root, rel):
    """把申诉者给的路径钉死在包根目录内。

    申诉件是外部输入。`../../.ssh/id_rsa` 或一个绝对路径,足以让申诉者探测
    包外文件是否存在;再配合 contains:/regex: 就能一位一位试探内容,等于
    一个布尔预言机。所以这里既拒绝绝对路径,也拒绝任何解析后越出 root 的路径。
    """

Recommends executing the reviewed package's tests without warning about untrusted-code risks.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The skill recommends running tests supplied by the package under review without warning that these are untrusted programs. In an auditing workflow, a malicious package can use this recommendation to gain execution with the reviewer's permissions; the stated read-only and offline boundaries do not constrain that code.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

With --run enabled, the reviewer executes a Python test selected from the untrusted target package with inherited host permissions and environment. Argument-list invocation avoids shell injection, but does not prevent the test itself from stealing credentials, modifying files, or accessing the network; the timeout is not a sandbox.

Content

Scanner excerpt · scripts/review.py (reported line 308)May include surrounding context.

python
key=lambda p: 0 if os.path.basename(p).startswith("run_") else 1,
        )[0]
        try:
            r = subprocess.run([sys.executable, runner], cwd=root, capture_output=True,
                               text=True, encoding="utf-8", timeout=120)
            tail = (r.stdout or r.stderr or "").strip().splitlines()
            last = tail[-1] if tail else ""

Appeal rulings do not establish whether evidence contradicts the original finding.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

An appellant can obtain an OVERTURNED ruling by naming any existing in-package file or supplying a trivially satisfied content check, without showing that the evidence contradicts the referenced finding. This lets an untrusted appellant contaminate the audit record with misleading reversals, although the unchanged score limits the immediate effect.

Content

No source excerpt is available for this finding.

compile() call detected

Medium
Category
Dangerous Code Execution
Confidence
65% confidence
Finding

compile() creates code objects from strings. When combined with exec()/eval(), it enables obfuscated code execution.

Content

Scanner excerpt · scripts/review.py (reported line 909)May include surrounding context.

python
bad = 0
    for f in py:
        try:
            compile(read(os.path.join(root, f)), f, "exec")
        except Exception as e:
            bad += 1
            notes.append("%s 无法解析(%s)" % (os.path.basename(f), type(e).__name__))

JSON mode bypasses the promised dual-score report and silently ignores appeals.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

At L1122–L1124, --json prints the structure-only review result and exits before computing the semantics score or disagreement flag at L1182–L1191. It also exits before processing --appeal at L1222–L1239, so combining --json with --appeal produces neither a ruling nor an appeal log despite the manifest's advertised behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/probe_redteam.py (reported line 85)May include surrounding context.

python
root = tempfile.mkdtemp(prefix="redteam-")
    try:
        build(root)
        p = subprocess.run([sys.executable, REVIEW, root, "--run"],
                           capture_output=True, text=True, encoding="utf-8", timeout=180)
        out = p.stdout
        total = None