Back to skill

Security audit

'抓取需求、分析、生成用例'

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent Confluence-to-test-cases purpose, but it hardcodes wiki credentials and handles authenticated content too broadly.

Review before installing. Do not use the embedded/default wiki account; rotate any exposed password, require HTTPS, validate the Confluence origin before login or image fetching, disable persistent debug HTML by default, and protect or clean up generated files because they may contain internal wiki content.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T09 · Insecure Skill Coding Practices

Error
Location
bin/wiki2doc.py:308
Finding

Credentials Submitted to an Attacker-Controlled Login Page

Content
View full analysis
{ const form = document.querySelector('form[name="loginform"]'); if (form) { form.submit(); } }''') # Wait for login to complete and redirect to target page page.wait_for_load_state("networkidle", timeout=15000) ``` ### Technical Analysis The target URL is supplied by the user and passed directly to `page.goto`. The code does not verify that the initial URL or its redirect destination belongs to the configured Confluence origin. Authentication is triggered merely when the resulting URL contains the substring `login` or `login.action`. An attacker can host a page at a URL such as `https://attacker.example/login` with input elements named `os_username` and `os_password` and a form named `loginform`. The program will then populate and submit the embedded Confluence credentials to the attacker. Substring matching is not a secure origin-verification mechanism. The scheme, hostname, port, resolved IP address, and redirect chain must all be validated before credentials are entered. ### Attack Path 1. An attacker prepares a page at `https://attacker.example/login`. 2. The page contains inputs named `os_username` and `os_password` an ...[truncated 769 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
bin/wiki2doc.py:24
Finding

Hardcoded Credentials Transmitted over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
bin/wiki2doc.py:163
Finding

Unrestricted URL and Image Fetching Enables Server-Side Request Forgery

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
bin/wiki2doc.py:342
Finding

Authenticated Page Content Persisted in Unconditional Debug Files

Content
View full analysis
.html`. 3. The artifact remains under the persistent output directory after execution. 4. Another local user, process, backup agent, synchronization service, or later task reads the file. 5. Confidential page content and potentially sensitive markup are disclosed. ### Impact Assessment The issue can disclose the complete contents of every converted Wiki page, including data inten ...[truncated 168 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
bin/convert/md2excel.py:181
Finding

Spreadsheet Formula Injection in Excel Exports

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unbounded Dependency Versions Prevent Reproducible and Controlled Installation

Content
View full analysis
=1.43.0 beautifulsoup4>=4.12.3 python-docx>=1.0.0 requests>=2.31.0 Pillow>=10.3.0 lxml>=5.2.1 pandas>=2.0.0 openpyxl>=3.1.0 ``` The installation command in `skill.md:101-106` also installs packages without version constraints: ```bash pip install playwright beautifulsoup4 python-docx requests Pillow lxml ``` ### Technical Analysis Every dependency uses a lower-bound-only constraint. A fresh installation can consequently retrieve any future release, including versions that were never reviewed or tested with this project. No lockfile, package hashes, or integrity constraints are supplied. This makes builds non-reproducible and increases exposure to upstream package compromise, malicious release publication, accidental breaking changes, and dependency-resolution differences across environments. The package names observed during the audit are established packages rather than obvious typosquatting names. The confirmed issue is unsafe dependency control, not evidence that a currently listed package is malicious. ### Attack Path 1. A future upstream release is compromised, maliciously published, or contains a severe vulnerability. 2. A user follows the documented installation process. 3. The package manager selects the latest version satisfying the broad lower-bound constraint. 4. Installation or later import executes the affected dependency in the user environment. 5. The dependency receives the same filesystem and network privileges as the Skill process. ### Impact Assessment A compromised dependency can execute code with the privileges of the user installing or running the Skill. This can affect local files, generated documents, credentials available to the process, browser sessions, and network-accessible internal resources. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (39)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The README explicitly publishes a concrete Confluence username and password in a configuration example, which is effectively credential disclosure even if presented as a default value. In a skill that automates access to an internal wiki, exposed credentials can enable unauthorized access to internal documentation and any connected data the account can reach.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The configuration example instructs users to store a Wiki username and password in plaintext in ~/.wiki2doc/config.json. Plaintext credentials in a predictable local file are at risk of disclosure via filesystem compromise, backups, logs, accidental commits, or multi-user host access, which can lead to unauthorized access to the Wiki and potentially broader internal systems if credentials are reused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The markdown describes automatic login to Confluence with username/password, which involves handling sensitive credentials and accessing potentially private enterprise content. The README explains how to do it but does not warn users about storing credentials securely, limiting access, or the privacy implications of pulling wiki data into local output files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python skill contains natural-language descriptions, help text, and runtime messages exclusively in Chinese, beginning with the module docstring and continuing throughout the CLI UX. Because the file does not offer user opt-in for language selection or document that the tool is intentionally limited to a Chinese-speaking context, it violates the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · bin/analyze/analyze_requirements.py (reported line 382)May include surrounding context.

python
report = {
            "document": str(self.doc_path),
            "analyzed_at": __import__('datetime').datetime.now().isoformat(),
            "summary": {
                "missing_points": len(self.issues["missing_points"]),
                "contradictory_points": len(self.issues["contradictory_points"]),

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · bin/analyze/analyze_requirements.py (reported line 411)May include surrounding context.

python
f.write("="*70 + "\n\n")

            f.write(f"分析文件: {self.doc_path}\n")
            f.write(f"分析时间: {__import__('datetime').datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")

            # 遗漏点
            if self.issues["missing_points"]:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code's user-facing documentation and CLI help text are presented only in Chinese, which constitutes a natural-language locale restriction. The file does not offer an opt-in language choice or indicate that the tool is intentionally limited to a Chinese-language context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring describes the tool entirely in Chinese and presents its functionality as Chinese-only, with no indication that users may choose another language or that the locale restriction is required by a region-specific purpose. Under the policy, forcing a specific language without user opt-in 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
92% confidence
Finding

This Python file contains natural-language strings for the module docstring and CLI description entirely in Chinese, including the tool name and usage guidance. Because the file provides no opt-in, alternative locale, or justification that the skill is region-specific, it can violate a language/locale policy requiring user choice.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
80% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · bin/wiki2doc.py (reported line 321)May include surrounding context.

python
if "login" in current_url or "login.action" in current_url:
            print("Detected login page, logging in...")

            # Fill login form
            page.fill('input[name="os_username"]', USERNAME)
            page.fill('input[name="os_password"]', PASSWORD)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script saves full authenticated page HTML into timestamped debug files under a local skills directory, which can expose sensitive Confluence content, tokens, internal links, and possibly embedded secrets to other local users, backup systems, or later processes. Because this occurs automatically during normal processing and after login, it creates an unintended data-at-rest disclosure risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring describes this script as a 'Confluence Wiki to Word Document Converter' that extracts wiki content and saves .docx files. However, the CLI documentation advertises a separate 'full automation' mode that generates test cases, and the code actually imports and runs a WorkflowOrchestrator from another module when --auto is used, which is a materially different purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Without a manifest, the clearest stated purpose comes from the module docstring and CLI description: converting Confluence pages into Word documents. The optional --auto path invokes an external WorkflowOrchestrator to run a broader automation workflow and generate test cases, which is not an obvious or necessary implementation detail of document conversion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains its top-level docstring and operational user-facing messages entirely in Chinese, and the CLI help text later in the file follows the same pattern. Under the stated policy, forcing a specific language without user opt-in or a documented locale justification is a natural-language policy violation.

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 · bin/wiki2testcases.py (reported line 73)May include surrounding context.

python
cmd = [sys.executable, str(wiki2doc_script), self.wiki_url]
            self.log(f"执行命令: {' '.join(cmd)}")

            result = subprocess.run(cmd, cwd=str(self.base_dir), capture_output=True, text=True)

            if result.returncode != 0:
                self.log(f"Wiki提取失败: {result.stderr}", "ERROR")

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 · bin/wiki2testcases.py (reported line 119)May include surrounding context.

python
cmd = [sys.executable, str(wiki2doc_script), self.wiki_url]
            self.log(f"执行命令: {' '.join(cmd)}")

            result = subprocess.run(cmd, cwd=str(self.base_dir), capture_output=True, text=True)

            if result.returncode != 0:
                self.log(f"Wiki提取失败: {result.stderr}", "ERROR")

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 · bin/wiki2testcases.py (reported line 164)May include surrounding context.

python
cmd = [sys.executable, str(wiki2doc_script), self.wiki_url]
            self.log(f"执行命令: {' '.join(cmd)}")

            result = subprocess.run(cmd, cwd=str(self.base_dir), capture_output=True, text=True)

            if result.returncode != 0:
                self.log(f"Wiki提取失败: {result.stderr}", "ERROR")

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 · bin/wiki2testcases.py (reported line 209)May include surrounding context.

python
cmd = [sys.executable, str(wiki2doc_script), self.wiki_url]
            self.log(f"执行命令: {' '.join(cmd)}")

            result = subprocess.run(cmd, cwd=str(self.base_dir), capture_output=True, text=True)

            if result.returncode != 0:
                self.log(f"Wiki提取失败: {result.stderr}", "ERROR")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file documents behavior that creates multiple output files from internal Wiki pages, including Word, TXT, Markdown, and Excel artifacts. It does not warn users that running the skill writes files locally and may store potentially sensitive requirement data on disk, which is relevant to user data and system integrity for a markdown skill description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The entire skill documentation and described outputs are presented in Chinese, including fixed Chinese filenames such as 需求文档 and 测试用例, with no indication that users may choose another language or locale. This may violate language/locale policy when a skill implicitly enforces one language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill documentation explicitly advertises automatic login using a username/password and later discloses a default account and password while also stating that session cookies persist during execution. Embedding credentials in skill documentation and normalizing credential/session reuse creates a direct risk of unauthorized access, credential leakage, and unsafe handling of authenticated sessions, especially because this targets an internal Confluence instance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
70% confidence
Finding

All user-facing documentation is presented only in Chinese, and examples, headings, and workflow descriptions assume that locale without any opt-in or alternative. This can be a natural-language policy issue when organizational guidance requires language choice rather than a forced locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document states that the command will generate Word, report, Markdown, and Excel files under the output directory, which may contain sensitive internal requirement data. There is no accompanying warning about local data persistence, file locations, or the need to protect or clean up generated artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The script uses Playwright's request context to fetch image URLs from the Confluence instance after login, which sends authenticated requests and may transfer protected page assets. The network activity is part of the tool's purpose, but the user-facing description does not clearly warn that linked page assets will also be retrieved and stored locally.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency uses a lower-bound specifier (>=) rather than an exact pin, so builds are not reproducible and may resolve to different versions over time. This increases supply-chain risk because a future vulnerable or malicious release could be installed without any change to the manifest.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
playwright>=1.43.0
beautifulsoup4>=4.12.3
python-docx>=1.0.0
requests>=2.31.0

Static analysis

No suspicious patterns detected.