Back to skill

Security audit

漏洞扫描器(免费版)

Security checks for vulnerabilities and agentic risk

Overview

This security-scanner skill is mostly purpose-aligned, but it can copy detected secrets into generated reports, which may expose credentials in logs or agent transcripts.

Review before installing. Use this only on repositories you are authorized to scan, avoid scanning real .env or credential files unless necessary, and do not publish or persist full reports until the skill redacts secret values from findings.

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:209
Finding

Raw credentials are exposed in generated scan reports

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 209-225; related scanning and output logic at lines 315-383
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: High

Vulnerable Code

python
def scan_file(self, filepath):
    """Scan a file for secrets."""
    findings = []
    with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
        content = f.read()
        lines = content.split('\n')

        for line_num, line in enumerate(lines, 1):
            for pattern, name, severity in self.SECRET_PATTERNS:
                matches = re.finditer(pattern, line, re.IGNORECASE)
                for match in matches:
                    {
                        "file": filepath,
                        "line": line_num,
                        "type": name,
                        "severity": severity,
                        "evidence": match.group()[:50]
                    })
    return findings

The scanner explicitly includes sensitive configuration files and subsequently prints its report:

python
SCAN_EXTENSIONS = {
    ".js", ".ts", ".jsx", ".tsx", ".py", ".java", ".go",
    ".php", ".rb", ".json", ".yaml", ".yml", ".env"
}
python
if args.output == "json":
    print(json.dumps(report, indent=2, ensure_ascii=False))
else:
    print(json.dumps(report, indent=2, ensure_ascii=False, default=str))

Technical Analysis

The secret detector copies up to the first 50 characters of every matched credential into the evidence field. Many supported credential formats, including AWS access-key IDs, GitHub tokens, API keys, passwords, and JWTs, fit entirely or substantially within this limit.

Because .env files are included in the recursive scan set, files commonly used to store operational credentials are processed automatically. The resulting findings are incorporated into the report and printed as JSON. Conseque ...[truncated 1636 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove raw matches from findings. Reports should contain only the secret type, file path, line number, severity, and remediation guidance.
  2. If limited identification is necessary, apply irreversible or strongly redacted representations, such as a keyed fingerprint or a value showing no more than the final four characters.
  3. Do not use fixed-length prefix disclosure such as match.group()[:50], because many credentials are shorter than 50 characters.
  4. Exclude .env and similar sensitive files by default. Require explicit authorization before scanning them.
  5. Add a safe-output function that sanitizes every finding before serialization or console output.
  6. Prevent reports from being written to world-readable files and document appropriate filesystem permissions and retention policies.
  7. Configure CI and agent environments to suppress or redact scanner output from persistent logs.
  8. Add automated tests using synthetic credentials to verify that complete or reconstructable secret values never appear in JSON, summary, console, or error output.
  9. Advise users to rotate any real credentials that have already appeared in scanner reports or execution logs.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (6)

Vague Triggers

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises activation across a very broad set of generic security-related keywords without meaningful constraints. In an agent environment, overbroad triggering can cause the skill to activate on unrelated user content and then request file reads or command execution, increasing the chance of unintended access, privacy issues, or unsafe autonomous behavior.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 315)May include surrounding context.

md
"""安全扫描器主类"""
# ...
    SKIP_DIRS = {"node_modules", ".git", "dist", "build", "__pycache__", ".venv", "venv"}
    SCAN_EXTENSIONS = {".js", ".ts", ".jsx", ".tsx", ".py", ".java", ".go", ".php", ".rb", ".json", ".yaml", ".yml", ".env"}
# ...
    def __init__(self):
        self.findings = []

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The display name, summary, and the entire skill description are presented in Chinese, and no user-selectable language option or opt-in is documented anywhere in the file. That creates a natural-language locale constraint that is imposed by default rather than offered as a choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The comparison table says the free version is limited to static analysis and does not support SCA or CVE association, yet the documented SupplyChainChecker code performs dependency-oriented supply-chain checks such as lockfile presence, unpinned versions, and typosquatting detection. This is a direct contradiction between the skill's documentation about edition scope and what the code claims to do.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The capability documentation says the response includes a status code, result, and log, but the actual _generate_report implementation returns fields such as scan_time, target, files_scanned, risk_level, summary, total_findings, and findings. No status code or execution log is produced by the implemented scanner path.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented output format shows a wrapper with success, data, execution_log, and error, while the implemented code prints the raw report dictionary containing scan_time, target, files_scanned, risk_level, summary, total_findings, and findings. This is an active documentation-to-code mismatch rather than a minor omission.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.