Back to skill

Security audit

Style Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The documented analyzer is mostly local and purpose-aligned, but the package also includes an under-disclosed LLM analyzer that can upload user text to DashScope.

Install only if you are comfortable with the package containing an optional remote LLM analyzer. Use the documented local analyze_style.py path for sensitive text, and avoid running analyze_style_llm.py on confidential manuscripts or personal data unless you intend to send up to 8,000 characters to DashScope under that provider's terms. Install dependencies in an isolated environment because the requirements are not pinned.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

other

Warning
Location
scripts/analyze_style_llm.py:67
Finding

Undisclosed Transmission of User Text to an External LLM Service

Content
View full analysis
str: """Build the API prompt.""" return f"""Please analyze the writing style of the following text and return the result in JSON format. Text: {text[:8000]} Please analyze the following dimensions: 1. Style labels 2. Pace 3. Tone 4. Sentiment Required response format: {{"voice_profile": {{"labels": ["label1", "label2"], "pace": "apidity", "tone": "tone", "sentiment": 0.0}}}} """ ``` ```python def _call_dashscope_api(self, prompt: str) -> dict[str, Any]: """Call the DashScope API.""" url = "https://coding.dashscope.aliyuncs.com/v1/chat/completions" headers = { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", } payload = { "model": self.model, "messages": [{"role": "user", "content": prompt}], "temperature": 0.3, "response_format": {"type": "json_object"}, } with Progress( SpinnerColumn(), TextColumn("[bold cyan]Calling LLM to analyze style...[/bold cyan]"), console=console, transient=True, ) as progress: progress.add_task("analyzing", total=None) response = requests.post(url, headers=headers, json=payload, timeout=60) response.raise_for_status() return response.json() ``` The English comments and prompt text above translate the original Chinese literals without changing the code behavior. The executable source embeds up to 8,000 characters of the supplied document in the API request. ### Technic ...[truncated 2102 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding

Unpinned Third-Party Runtime Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documentation describes CLI usage that reads input files, writes output files, installs dependencies, and references integration with other scripts, yet the skill declares no explicit tool scope or permissions. This creates an undeclared capability boundary: an agent may use filesystem, environment, or even network-related actions implicitly without user-visible restriction, increasing the risk of overbroad access or unsafe execution in environments that rely on manifest-declared permissions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings that force a specific language/locale for usage instructions and interaction. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script transmits user-provided text to DashScope for analysis, but the CLI output and help text do not clearly warn that the full or partial input content will be sent to an external third-party service. This is a real data-handling risk because users may supply sensitive manuscripts, proprietary content, or personal data without understanding that it leaves the local environment.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The analyzed text is interpolated directly into a single user prompt sent to the model, so malicious or specially crafted input can instruct the model to ignore the requested task, alter output structure, or inject misleading analysis content. While this is not code execution, it can undermine result integrity and may cause the YAML/report to contain attacker-controlled content or malformed analysis.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This line performs the actual network transmission of potentially sensitive input-derived content to an external API endpoint. In the context of a style-analysis tool, such transmission is expected functionality, but it remains a genuine security/privacy concern because it exports user content off-host and depends on a third-party processor.

Content

Scanner excerpt · scripts/analyze_style_llm.py (reported line 112)May include surrounding context.

python
transient=True,
        ) as progress:
            progress.add_task("analyzing", total=None)
            response = requests.post(url, headers=headers, json=payload, timeout=60)

        response.raise_for_status()
        return response.json()

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The prompt explicitly instructs the model to provide the analysis explanation in Chinese, and the script's user-facing descriptions are also Chinese-only. This imposes a specific language/locale behavior without user opt-in or a documented reason that the tool is region-specific.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency rich is unpinned, so installs may resolve to different versions over time, reducing build reproducibility and increasing supply-chain risk if a future release introduces a vulnerability or malicious code. In a skill package, this can make deployments inconsistent and harder to audit, even though rich is typically a low-risk presentation library.

Content

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

text
rich
PyYAML
requests

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

The dependency PyYAML is unpinned, which creates supply-chain uncertainty and makes it impossible to determine whether installs will pull a version affected by known PyYAML vulnerabilities. Because YAML parsers can become dangerous when used on untrusted input, leaving this package unpinned is more concerning in a text-analysis skill that may process external content or configuration.

Content

Scanner excerpt · scripts/requirements.txt (reported line 2)May include surrounding context.

text
rich
PyYAML
requests

Unverifiable Dependency: PyYAML has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

PyYAML has multiple known advisories, and because no version is pinned, it is not possible to verify that installed environments are using a safe release. This is dangerous because YAML libraries have a history of unsafe parsing issues, and a text-processing skill may eventually accept attacker-controlled content or configuration that could trigger vulnerable behavior.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency requests is unpinned, so future or environment-specific installs may select versions with known advisories or behavioral differences, creating avoidable supply-chain and reproducibility risk. In an agent skill context, HTTP clients often handle remote data and credentials, so version drift can materially affect security posture.

Content

Scanner excerpt · scripts/requirements.txt (reported line 3)May include surrounding context.

text
rich
PyYAML
requests

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

requests has multiple published advisories, and without version pinning there is no assurance that deployment will use a fixed release. In a skill environment that may make outbound network calls, this uncertainty can expose sensitive data, authentication material, or request integrity depending on how the library is used.

Content

No source excerpt is available for this finding.