Back to skill

Security audit

patent-disclosure

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it advertises, but it can silently install an unpinned Python package at runtime, which changes the local environment and adds supply-chain risk.

Review this skill before installing in a shared or sensitive environment. Prefer installing python-docx through a controlled, pinned dependency process, or disable runtime package installation before using export. Generated patent-disclosure content may be saved under the configured upload directory for download.

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

T08 · Insecure Dependencies

Warning
Location
export_deps.py:20
Finding

Automatic Runtime Installation of an Unpinned Third-Party Dependency

Content
View full analysis
bool: if package in _INSTALL_ATTEMPTED: return False _INSTALL_ATTEMPTED.add(package) commands: list[list[str]] = [] uv = shutil.which("uv") if uv: commands.append([uv, "pip", "install", package, "-q"]) commands.append([sys.executable, "-m", "pip", "install", package, "-q"]) for cmd in commands: try: proc = subprocess.run( cmd, timeout=180, capture_output=True, text=True, ) if proc.returncode == 0: importlib.invalidate_caches() return True except (OSError, subprocess.TimeoutExpired): continue return False ``` `export_deps.py:42-56`: ```python def ensure_docx() -> Tuple[bool, str | None]: try: import docx # noqa: F401 return True, None except ImportError: if _try_install("python-docx"): try: import docx # noqa: F401 return True, None except ImportError: pass return ( False, "Unable to load python-docx after attempting automatic installation." f" Install manually with: {sys.executable} -m pip install python-docx", ) ``` The original source contains equivalent non-English error text; it does not alter the vulnerable behavior. `requirements.txt:1`: ```text python-docx>=1.1.0 ``` `SKILL.md:10-12`: ```yaml install: - kind: uv package: python-docx ``` ### Technical Analysis When DOCX export is requested and the `docx` module is unavailable, the Skill automatically runs `uv ...[truncated 2360 chars]
Remediation
View remediation
=1.1.0`. 4. Use a lock file or hash-locked requirements file, such as `pip install --require-hashes -r requirements.txt`, to verify downloaded artifacts. 5. Restrict package installation to an explicitly configured, trusted package index or internal mirror. 6. Build and scan immutable deployment artifacts in CI, then run the Skill in an environment where runtime package installation is disabled. 7. Run the Agent under a least-privileged account with restricted filesystem and network access to reduce the impact of any dependency compromise. 8. If runtime installation is operationally unavoidable, require explicit administrator approval, record the selected versions and artifact hashes, and perform installation in an isolated environment before loading the dependency into the Agent process. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares installation and runtime behavior that imply code execution and local file generation (python3, python-docx, and loading docx_export.py) but does not restrict tool permissions or allowed capabilities. In practice, this can let the skill run with broader shell, file read/write, or environment access than necessary, increasing the blast radius if the export path or adjacent code is abused.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Although the overview includes bilingual labels, the operational instructions, workflow, commands table explanations, and disclaimer are predominantly written in Chinese with no statement that users may choose their preferred language. This can amount to a language-policy violation because the skill appears to assume Chinese as the default interaction language without opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list includes broad phrases such as general references to invention disclosure and export requests, which can cause the skill to activate in ordinary conversation even when the user did not intend to invoke it. Over-broad activation increases the chance of unplanned file-processing behavior or context switching, though the skill’s domain is relatively narrow and not inherently high risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says this is a local invention-disclosure/export skill with no third-party API token, but the implementation can contact package indexes and install software into the runtime. That mismatch increases supply-chain and trust-boundary risk because users may reasonably assume the skill stays local and non-mutating.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill attempts package installation automatically and silently, without warning or confirmation to the user. Silent environment modification is dangerous because it can trigger unexpected network access, install untrusted code, and violate user expectations about what a local export helper will do.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Spawning uv/pip subprocesses gives the skill an unnecessary execution and software-installation capability beyond straightforward document export. In this context, that extra capability broadens the attack surface and could be abused to introduce unreviewed code or alter the host environment.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
92% confidence
Finding

The code launches external package-manager subprocesses to install dependencies at runtime. Even though the command arguments are not shell-injected, this still creates a security-relevant capability: the skill can modify the environment and fetch code from external package indexes, which is risky for a supposedly local document-export skill.

Content

Scanner excerpt · export_deps.py (reported line 32)May include surrounding context.

python
for cmd in commands:
        try:
            proc = subprocess.run(
                cmd,
                timeout=180,
                capture_output=True,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language docstrings and user-facing strings entirely in Chinese, beginning with the module docstring and command documentation. The policy requires flagging language/locale constraints when the skill forces a specific language without user opt-in, and there is no indication here that users can choose another language or that the Chinese-only behavior is explicitly justified as region-specific.

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 uses Chinese headings and instructions throughout, which effectively forces a specific language for users. Under the policy, language constraints should either be optional for the user or clearly documented as a justified region- or locale-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire checklist is written in Chinese and provides no indication that users may choose another language or that the skill is intentionally limited to a Chinese-language context. Under the policy criteria, 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

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This Python file contains natural-language strings exclusively in Chinese, including the main module docstring and user-facing exception text. Under the policy, forcing a specific language without user choice or an explicit region-specific justification 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
88% confidence
Finding

The module docstring is written in Chinese and frames the skill behavior in that language, with additional Chinese-only user-facing error text later in the file. This creates a locale/language constraint without any opt-in or documented reason that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The returned error message for failed dependency loading is presented only in Chinese, which can force a specific language on users of the skill. The file does not indicate that the skill is limited to a Chinese-language audience or provide an alternative locale.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower-bound only (python-docx>=1.1.0), which makes builds non-reproducible and allows installation of future releases that have not been reviewed for compatibility or security. While this is not an immediately exploitable code flaw by itself, it is a real supply-chain weakness because the resolved package version can vary across environments and time.

Content

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

text
python-docx>=1.1.0

Unverifiable Dependency: python-docx has 2 known advisory(ies) (CVE-2016-5851 (Improper Restriction of XML External Entity Reference in python-docx); CVE-2016-5851 (python-docx before 0.8.6 allows context-dependent attackers to conduct XML Exter)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The manifest does not pin python-docx to a specific version, so it is impossible to verify from this file alone whether the installed release is patched against known advisories such as the XXE issue in older python-docx versions. In this skill's context, document generation/parsing libraries can be security-relevant because malformed Office/XML content may trigger vulnerable code paths if untrusted documents are processed.

Content

No source excerpt is available for this finding.