Back to skill

Security audit

Project Analyzer Generate Doc

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real documentation skill, but it should be reviewed because it can scan source/config files and write persistent docs that may expose sensitive values.

Install only for repositories you are allowed to scan. Add or keep .ai-doc in .gitignore, review and redact generated documentation before sharing or committing it, and do not confirm migration, merge, delete, or restore actions until you have reviewed the plan. Avoid running it on untrusted repositories unless the agent environment can confine subagents to the intended project files and output directory.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:394
Finding

Sensitive Configuration Values May Be Propagated into Generated Documentation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/subagent-task-template.md:8
Finding

Untrusted Repository Content Is Delegated to Subagents Without Prompt-Injection Isolation

Content
View full analysis
## Output Path ## Files in This Chunk ## Requirements 1. Generate an L3 document for each file. 2. Generate simplified documentation for simple files. 3. Generate complete documentation for complex files. 4. Compress context after processing every two or three files. 5. Complete as many files as possible before timeout. 6. Return a JSON summary when complete. Begin execution. ``` The main Skill similarly instructs subagents to read and analyze project source files, but it does not state that repository content is untrusted data or prohibit following instructions embedded in source code, XML, comments, configuration files, or existing generated documents. ### Technical Analysis The Skill crosses a trust boundary when it passes attacker-controlled repository files to autonomous subagents. Source files and documentation can contain natural-language text that resembles Agent instructions, for example in: - Java comments and string literals - XML comments or element values - Markdown documentation - Configuration values - Existing `.ai-doc` documents - Class or file names inserted into delegated prompts The task template provides behavioral instructions to the subagent but does not establish instruction precedence or data isolation. In particular, it does not require the subagent to: - Treat file contents exclusively as untrusted data - Ignore commands or tool requests found inside analyzed files ...[truncated 2034 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (30)

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · SECURITY_FIXES.md (reported line 53)May include surrounding context.

  • 禁止尝试提权或绕过安全限制
text

**Rationale**: Bash references suggested alternative file-reading strategies that could bypass security controls.

---

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The changelog explicitly documents a past feature described as a 'Security workaround' using bash-based reading of protected files. Even though this is historical documentation and later versions claim to remove or rename it, recording that capability in a skill focused on file analysis strongly suggests the skill may have included or normalized access-control bypass behavior, which is dangerous in this context because the skill operates over source trees and documentation files where unauthorized reads could expose secrets or restricted project content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly describes writing generated documentation, logs, and state files into the target project's .ai-doc directory, but it does not clearly warn users that the skill will modify the analyzed repository. In a documentation-generation skill, silent filesystem modification can lead to unintended workspace changes, accidental commits of generated artifacts, or pollution of production repositories, especially when users expect read-only analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file consistently presents its operational instructions, prompts, and user interaction text in Chinese, including confirmation prompts and usage examples. This can amount to forcing a specific language/locale without explicitly offering the user a choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation trigger includes a broad phrase like '理解这个工程', which can match routine conversation and cause the skill to activate unexpectedly. In this skill's context, activation can lead to large-scale project scanning, file enumeration, and potential follow-on write operations under .ai-doc, so accidental invocation increases the risk of unintended analysis and workspace modification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown file presents all headings, descriptions, and usage guidance in Chinese only, with no indication that users may select another language or that the document is intentionally limited to a Chinese-only regional context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language description is entirely in Chinese and presents the skill as a general-purpose Java Maven documentation generator, but it does not indicate that the Chinese locale is optional or region-specific. For a generally applicable skill, this can violate language/locale policy by implicitly forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown guide presents all instructions, prompts, and examples exclusively in Chinese, which can amount to a language/locale policy violation when no user opt-in or alternative language path is provided. The document does not state that the skill is region-specific or otherwise justified to require Chinese only.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file presents all operational instructions in Chinese and does not indicate that users may choose another language or that the skill is intended only for a Chinese-speaking or region-specific context. That creates a natural-language policy concern because it effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language content consistently forces a specific language/locale for the skill guidance, and there is no indication that users can opt into another language. Under the stated policy, fixed-language behavior should either offer user choice or clearly justify a region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file is entirely presented in Chinese from the title onward, with no indication that the user can choose another language or that the locale restriction is required for a region-specific purpose. The policy explicitly calls for flagging language or locale constraints that are imposed without user opt-in.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · references/retry-mechanism.md (reported line 404)May include surrounding context.

或者对于紧急任务,禁用重试

$retryPolicy = @{ MaxRetries = 0 }

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill template is written as a mandatory Chinese-language task format, including headings, instructions, and example outputs, with no indication that users may choose another language or locale. This creates a natural-language policy concern because it implicitly forces a specific language across all generated documentation without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file includes a recovery step that copies a backup over .ai-doc/.generate-state.json, which is a file write operation that can discard newer task-state information. While it describes the action, it does not provide a user warning about potential loss of current progress metadata or advise verifying the backup before replacement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

These lines tell the user to manually update the state file and mark subagents as failed, which can alter execution state and affect resume/retry behavior. The document does not warn that manual state edits may corrupt task tracking or cause incorrect recovery decisions if done improperly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is written entirely in Chinese and defines all section headings and labels in Chinese, which effectively constrains generated documentation to a specific language. The policy allows locale constraints only when the skill offers user choice or clearly documents a justified region-specific requirement, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is entirely written in Chinese, including all headings, labels, and instructional placeholders, which implies the generated documentation will be produced in a fixed language. Under the policy criteria, forcing a specific language without offering user choice or documenting a justified locale restriction is a natural-language policy violation.

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 template uses Chinese as the required document language in its title and throughout all section headings and instructions. The file does not offer a language choice or explain why Chinese is mandatory, which creates a locale policy issue under the natural-language policy rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file is in scope for natural-language policy checks. The entry states that the SKILL.md description field was changed to English to avoid garbled text, which suggests a forced language choice rather than offering users a language/locale option or documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The README presents the skill's natural-language usage and behavior in Chinese, but does not indicate that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file includes operational guidance and examples in Chinese, and the document does not indicate that the language is optional or user-selected. Under the stated policy, forcing a specific language or locale without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file presents safety instructions and prohibitions in Chinese, but does not say the skill or document is intended specifically for Chinese-speaking users. Because the policy applies to all file types, untranslated or single-locale guidance can be flagged when no user choice or justification is given.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

At L0123-L0124 and L0175-L0196, the skill explicitly documents a safety constraint that migration or merge operations must only occur after asking the user and receiving confirmation. The summary bullet at L0965 says '文档迁移:自动合并已存在文档', which contradicts that safer behavior by describing the operation as automatic.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow at L0123-L0124 and L0168-L0196 repeatedly states that any migration, merge, or deletion-related action requires explicit user confirmation first. However, the example at L0984 presents migration/merge as an immediate execution step, which conflicts with the documented safety requirement and may mislead implementers about intended behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file is written exclusively in Chinese, including headings, descriptions, and operational notes. Under the policy rule for natural-language violations, forcing a specific language without user opt-in or clear justification can be a locale policy issue.

Content

No source excerpt is available for this finding.