Back to skill

Security audit

Code Analyzer

Security checks for vulnerabilities and agentic risk

Overview

This is a local code-analysis skill that reads a user-selected project and writes a report, with no evidence of hidden network use, persistence, credential theft, or destructive behavior.

Install only if you are comfortable letting the skill read the project directory you point it at and write a Markdown report to the output path you choose. Treat its analysis as heuristic, especially for DDD and non-Python/JS/TS/Rust projects, and avoid using sensitive existing filenames as the output target.

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
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

该技能的总体方向与代码行为一致:它确实是一个代码库分析工具,会扫描源代码、提取结构信息,并输出分析报告,因此不是完全无关或恶意的描述欺骗。但描述存在明显夸大,达到“能力不符”的程度。最关键的是语言支持范围:代码只针对 Python、JS/TS、Rust 编写了解析逻辑,虽然会发现 .java/.go/.sql 文件并计数,却不会进行对应的深度分析。其次,DDD 支持并未真正实现声明中的聚合根、领域服务、仓储、领域事件、限界上下文等识别,只是通过类名关键词做非常粗略的 entity/dto/value object 判断。再者,执行流程、数据流、业务规则等分析虽有实现,但多为简单正则或 AST 启发式,和“深度代码分析”描述相比存在显著落差。因此应判定为描述与实际行为部分不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/analyze.py --path /path/to/project --output report.md

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/best-practices.md (reported line 85)May include surrounding context.

md
- [ ] Documentation is adequate
- [ ] No deprecated dependencies

## Output Guidelines

When generating analysis reports:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises and demonstrates behavior that would require reading project files, writing reports, and potentially accessing external references, yet it declares no explicit tool scope or permission boundaries. In an agent ecosystem, this can lead to over-broad runtime authority, unclear trust assumptions, and accidental access to sensitive files or network resources during analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file consistently presents the skill description, headings, examples, and operating guidance in Chinese, including the manifest description and all instructional sections. Under the policy, forcing a specific language without opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script writes analysis output directly to a user-supplied path via open(output_path, 'w', ...) without any confirmation, path restriction, or safe-write guard. In an agent skill context, this can overwrite arbitrary files accessible to the process if an upstream caller or prompt causes a sensitive path to be supplied, making it an unintended file modification primitive.

Content

No source excerpt is available for this finding.