Back to skill

Security audit

Document Hub

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed PRD template generator with optional Feishu publishing, with manageable file-output and template-guidance risks.

Install only if a Chinese-language PRD generator fits your workflow. Use trusted JSON inputs, provide explicit safe output filenames/directories, avoid overwriting existing files, and review/redact generated PRDs before using the Feishu upload flow. For API PRDs, replace the default WebSocket query-token guidance with a safer authentication pattern before implementation.

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
scripts/generate_prd.py:124
Finding

Path Traversal Through an Unvalidated Default Output Filename

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
templates/prd/api-prd.md:521
Finding

API Template Recommends Passing Authentication Tokens in URL Query Parameters

Content
View full analysis
``` 4. A reverse proxy, gateway, application, or monitoring service records the full request URL. 5. An operator with excessive log access, a compromised observability account, or an attacker who obtains exported logs reads the tok ...[truncated 797 chars]
Remediation
View remediation
` header where the WebSocket client API supports custom headers. 3. For browser WebSocket clients that cannot set an `Authorization` header, use a short-lived, audience-restricted, single-use connection ticket: - Authenticate through a normal HTTPS request. - Issue a ticket with a very short lifetime. - Restrict it to one user, one endpoint, and one connection attempt. - Invalidate it immediately after successful use. 4. Where appropriate, use a secure session cookie configured with `Secure`, `HttpOnly`, and a suitable `SameSite` policy, together with origin validation and CSRF protections. 5. Configure proxies, gateways, applications, and observability systems to redact authentication parameters and avoid logging full query strings. 6. Ensure tokens have short expiration periods, minimal scopes, audience restrictions, revocation support, and rotation procedures. 7. Replace the template text with secure guidance such as: ```markdown - **Authentication**: Use an Authorization header where supported. Browser clients must exchange their authenticated HTTPS session for a short-lived, single-use WebSocket connection ticket. Long-lived credentials must not appear in URLs. ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| API 设计 PRD | `api-prd.md` | 接口/API 设计 |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 128)May include surrounding context.

md
| POST | 创建资源 | ❌ | {{post_ex|default('POST /users')}} |
| PUT | 全量更新 | ✅ | {{put_ex|default('PUT /users/123')}} |
| PATCH | 部分更新 | ✅ | {{patch_ex|default('PATCH /users/123')}} |
| DELETE | 删除资源 | ✅ | {{delete_ex|default('DELETE /users/123')}} |

### 3.4 状态码规范

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 242)May include surrounding context.

md
| 方式 | 适用场景 | 说明 |
|------|----------|------|
| {{auth_type_1|default('OAuth 2.0')}} | {{auth_scene_1|default('第三方应用接入')}} | {{auth_desc_1|default('标准 OAuth 流程,支持 Authorization Code 模式')}} |
| {{auth_type_2|default('JWT')}} | {{auth_scene_2|default('内部服务/前端应用')}} | {{auth_desc_2|default('Access Token + Refresh Token 机制')}} |
| {{auth_type_3|default('API Key')}} | {{auth_scene_3|default('服务器间调用')}} | {{auth_desc_3|default('Header 中携带 X-API-Key')}} |

#### 3.6.2 JWT Token 规范

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 268)May include surrounding context.

md
| 方式 | 适用场景 | 说明 |
|------|----------|------|
| {{auth_type_1|default('OAuth 2.0')}} | {{auth_scene_1|default('第三方应用接入')}} | {{auth_desc_1|default('标准 OAuth 流程,支持 Authorization Code 模式')}} |
| {{auth_type_2|default('JWT')}} | {{auth_scene_2|default('内部服务/前端应用')}} | {{auth_desc_2|default('Access Token + Refresh Token 机制')}} |
| {{auth_type_3|default('API Key')}} | {{auth_scene_3|default('服务器间调用')}} | {{auth_desc_3|default('Header 中携带 X-API-Key')}} |

#### 3.6.2 JWT Token 规范

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly promotes generating and uploading PRD content to Feishu, but it does not warn users that the generated document content may contain sensitive internal business data, prompts, API details, or other confidential information before external transmission. This creates a real data exfiltration risk because users may invoke the upload flow without understanding that local/project data is being sent to a third-party platform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The class and method documentation describe a Feishu document integration that 'creates Feishu documents' and returns a creation result with a document URL. However, the actual implementation only checks for module availability and returns a placeholder response instructing the caller to use another tool, with no creation call or URL produced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

render_to_file writes rendered content to any caller-supplied path with no path validation or restriction. In an agent or automation context, if an attacker can influence output_path, this can overwrite arbitrary files accessible to the process, leading to data loss, tampering, or placement of attacker-controlled content in sensitive locations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire template, including its default system prompt and user-facing text examples, is written only in Chinese and does not indicate that language selection is optional or region-specific. This creates a natural-language policy concern because it effectively forces a specific language/locale without user opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The template explicitly defines a degraded state as a 'silent switch' to a fallback path, which can hide from users that AI behavior, quality, or guarantees have changed. In an AI product PRD, this is risky because degraded operation may alter accuracy, safety controls, or provenance without user awareness, leading to misplaced trust and unsafe downstream decisions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 108)May include surrounding context.

3.2.1 基础 URL 格式

text
{{base_url|default('https://api.example.com/v{version}/{resource}/{action}')}}

3.2.2 URL 结构规范

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 619)May include surrounding context.

3.2.1 基础 URL 格式

text
{{base_url|default('https://api.example.com/v{version}/{resource}/{action}')}}

3.2.2 URL 结构规范

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 645)May include surrounding context.

3.2.1 基础 URL 格式

text
{{base_url|default('https://api.example.com/v{version}/{resource}/{action}')}}

3.2.2 URL 结构规范

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · templates/prd/api-prd.md (reported line 648)May include surrounding context.

3.2.1 基础 URL 格式

text
{{base_url|default('https://api.example.com/v{version}/{resource}/{action}')}}

3.2.2 URL 结构规范

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template recommends passing a WebSocket token in the query string, which risks credential exposure through browser history, intermediary logs, reverse proxies, analytics tooling, and referrer-like operational traces. Because this is a PRD template, downstream teams may implement this pattern directly, propagating insecure authentication design into production systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document title and the full template content are presented in Chinese, which imposes a specific language on users by default. The file does not indicate that Chinese is optional, user-selected, or required for a region-specific purpose, so it appears to violate the language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document title and the entire template content are written in Chinese, which effectively imposes a specific language on skill output. The file does not indicate that Chinese is optional, user-selectable, or required for a documented region-specific purpose, so it conflicts with the language/locale policy criteria.

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’s natural-language descriptions are entirely Chinese, including the module purpose and user-facing terminology, with no indication that language choice is configurable or limited to a justified region-specific use case. Per the policy, forcing a specific language without user opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The docstring at L115 says the method extracts 'all' placeholder variables from the template, but the regex at L127 only captures simple {{ variable }} patterns. It will miss dotted names, indexed expressions, filters, function calls, control-structure variables, and many valid Jinja2 constructs, so the documented intent overstates actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The entire PRD template is written in Chinese, including headings, field descriptions, and examples, with no indication that language selection is optional. Under the policy rule, a skill or template that enforces a specific language without user opt-in can violate locale/language requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and the entire PRD template are written in Chinese, which imposes a specific language by default. Under the policy for natural-language violations, forcing a locale or language without user opt-in should be flagged unless the regional constraint is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.