Back to skill

Security audit

Claude给中国用户的"标记"扫描器

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed local audit and remediation helper, but users should be careful because its optional fix globally upgrades Claude Code from a mutable npm latest tag.

Install only if you want a local Claude Code binary audit and understand the optional remediation. Run the audit first; do not run upgrade_cc.py --apply unless you approve a global npm package change, and prefer verifying or pinning the exact Claude Code version instead of relying on latest.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/upgrade_cc.py:20
Finding

Unpinned Global npm Package Installation Through a Mutable Registry Tag

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill frames the issue as a scanner for marking 中国用户 and repeatedly emphasizes nationality-based targeting without documenting a clear policy basis, evidence standard, or user-consent safeguards. This can encourage discriminatory handling, reputational harm, or misuse of the skill in ways that target users by nationality rather than by a neutral technical indicator.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs the agent to run local Python scripts and potentially perform a global npm install -g, but it does not declare any permissions or allowed-tools scope. That mismatch increases the chance the skill is invoked with broader shell access than users or reviewers expect, enabling unintended command execution on the host.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger list contains broad phrases like upgrade claude-code, 清理 Claude Code, and claude code unicode, which could match ordinary support or maintenance requests unrelated to this specific audit skill. Overbroad invocation raises the risk that the skill runs shell-based audit or upgrade steps in contexts where the user did not intend to authorize those actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file is written entirely in Chinese and does not indicate any user language choice or opt-in. Under the policy rule for natural-language violations, forcing a specific language without documented choice or justification is a reportable locale/language policy issue.

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 · scripts/audit_cc_date_prompt.py (reported line 41)May include surrounding context.

python
if os.path.exists(path) and os.path.getsize(path) > 1_000_000:
        return path
    try:
        root = subprocess.check_output(["npm","root","-g"], text=True).strip()
        p = os.path.join(root,"@anthropic-ai","claude-code","bin","claude.exe")
        if os.path.exists(p):
            return p

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 · scripts/audit_cc_date_prompt.py (reported line 51)May include surrounding context.

python
def get_version():
    try:
        out = subprocess.check_output(["claude","--version"], text=True, stderr=subprocess.STDOUT)
        m = re.search(r"(\d+)\.(\d+)\.(\d+)", out)
        if m:
            return tuple(int(x) for x in m.groups())

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 · scripts/upgrade_cc.py (reported line 17)May include surrounding context.

python
def run(cmd):
    print("+ " + " ".join(cmd))
    return subprocess.run(cmd)

if __name__ == "__main__":
    apply = "--apply" in sys.argv