Back to skill

Security audit

Agent安全工具箱(免费版)

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a local security scanning skill, but its scanner is broken and its safety claims are overstated enough that users should review it before relying on it.

Review this skill before installing or invoking it. Treat it as unverified documentation rather than a working scanner unless the publisher supplies a valid executable scanner, reconciles the rule count and Markdown behavior, and adds clear user-controlled execution boundaries. Do not rely on a clean result from this artifact as proof that another skill or project 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

Error
Location
SKILL.md:253
Finding

Malformed Fail-Open Security Scanner Produces Unreliable Audit Results

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 253–266
Vulnerability Type: Malformed scanner implementation and silent error handling
Risk Level: High

python
def _scan_file(self, filepath):
    """扫描单个文件"""
    self.files_scanned += 1
    try:
        with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
            lines = f.readlines()
        for line_num, line in enumerate(lines, 1):
            for rule_id, rule in self.RULES.items():
                if re.search(rule["pattern"], line, re.IGNORECASE):
                        "rule": rule_id,
                        "severity": rule["severity"],
                        "file": str(filepath),
                        "line": line_num,
                        "evidence": line.strip()[:100],
                        "description": rule["description"]
                    })
    except Exception:

Technical Analysis

The embedded Python scanner is syntactically invalid. After the if re.search(...) condition, the code contains dictionary entries and a closing }) without a corresponding opening dictionary or method call. The except Exception: clause also has no body.

Consequently, the supplied scanner cannot execute as valid Python. Even if the syntax were partially corrected, the displayed implementation does not contain a valid self.findings.append({...}) operation, so detected matches would not reliably be added to the report.

The broad exception-handling design is also fail-open. If an exception body were added without reporting or propagating the failure, inaccessible, malformed, or unexpectedly encoded files could be omitted while the scanner still appeared to complete. This is particularly unsafe for a tool presented as a pre-installation security control.

The statically flagged eval(atob...) and network/webhook strings do not themselves constitute malicious behavior. They occur only inside regular ...[truncated 1771 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the malformed block with a valid finding insertion:

    python
    if re.search(rule["pattern"], line, re.IGNORECASE):
        self.findings.append({
            "rule": rule_id,
            "severity": rule["severity"],
            "file": str(filepath),
            "line": line_num,
            "evidence": line.strip()[:100],
            "description": rule["description"],
        })
    
  2. Implement explicit exception handling that records the affected file and error. Mark the overall scan as incomplete and return a nonzero process status when any file cannot be scanned.

  3. Do not silently suppress decoding, permission, parsing, or regular-expression errors. Distinguish expected file-access failures from internal scanner defects.

  4. Move the implementation from an untested Markdown example into an actual executable Python script and provide a documented, valid invocation command.

  5. Add automated syntax checks and unit tests covering positive and negative fixtures for every advertised rule. Tests must verify that findings are appended, severity aggregation is correct, and file-reading failures cannot produce a clean result.

  6. Reconcile the documentation with the implementation. Either implement all 24 advertised rules and configuration options or explicitly disclose the smaller supported rule set.

  7. Remove or correct references to absent Node scripts, callback functionality, Base64 decoding, and unsupported command-line options.

  8. Keep scanning local and least-privileged. Network access is unnecessary for the declared static-analysis functionality and should not be requested unless a separately documented feature requires it.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description is generic and broad, making the skill eligible for many loosely related 'security toolkit' requests. In agent ecosystems, vague routing metadata can cause unintended invocation of a tool with exec capability, increasing the risk of unnecessary command execution or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill declares exec as an available tool and provides command-line execution examples, but does not clearly warn about shell-side effects, path trust, or confirmation requirements. In an agent context, exec capability materially raises risk because a misrouted or manipulated invocation could cause commands to run on the user's system.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill advertises 24 detection rules, but the embedded scanner defines only 10 rules. In a security tool, overstating coverage is dangerous because users may rely on protections that do not exist, leading to missed detection of malicious capabilities and incorrect trust decisions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to activate on general security-related requests without tight task boundaries. In an agent setting, ambiguous activation increases the chance the skill will run exec-backed workflows in contexts the user did not specifically intend, which raises operational and safety risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation promises that Markdown scanning is limited to code blocks, but the provided implementation reads .md files line by line and applies regexes to all content. This mismatch can produce misleading results, unexpected false positives, and unsafe operator decisions because users may trust behavior that the tool does not actually enforce.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill name, summary, description, instructions, and examples are written entirely in Chinese, while the documentation does not state that language selection is optional or region-specific. For a generally applicable skill, this can amount to a language/locale constraint without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The capability section says input parameters support '创建/查询/导出' operations, implying broader operational functionality. The shown implementation only traverses files, scans content, and returns a Python dictionary; it does not implement create, query, or export behaviors.

Content

No source excerpt is available for this finding.