Back to skill

Security audit

Clean Code 审计法 · 第一性原理

Security checks for vulnerabilities and agentic risk

Overview

This is a local clean-code audit skill with no executable payload or credential/network behavior, though its read-only wording should be clearer because it creates report/checklist files.

Before installing, expect the skill to read the code you ask it to audit and to create local report/checklist files in the workspace root. If you want strictly inline output, ask the agent not to write files. Non-Chinese users may also need to request the report in their preferred language because some bundled guidance is Chinese-first.

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
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The summary presents the skill's core behavior and deliverable framing primarily in Chinese, while the document elsewhere is bilingual. For a natural-language skill, this can imply a default language policy without explicitly offering the user a choice of output language or locale.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The boundary statement says the skill only reads user-explicitly-specified local code files, but the instructions later require reading bundled assets and writing generated files. This broadens the effective file access and side-effect surface beyond what the user is told, undermining informed consent and creating policy/compliance ambiguity.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill repeatedly claims it is "read-only" and "never edits," yet later instructs the agent to write audit reports and copy a checklist into the workspace root. This mismatch can mislead users and platform policy checks about the skill's actual side effects, increasing the chance of unauthorized or unexpected file creation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The embedded code sample hard-codes TZ = "Asia/Shanghai", and the surrounding markdown is written as a general audit sample rather than a clearly region-specific tool. This can violate language/locale policy because it imposes a locale setting without offering user opt-in or explaining why that locale is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The entire skill document is written in Chinese and provides no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document declares lang="zh-CN", and all visible instructional content is written in Simplified Chinese. For a general clean-code checklist, this imposes a specific language/locale without any opt-in or explanation that the skill is region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.