Back to skill

Security audit

Skill Proposal Gen

Security checks for vulnerabilities and agentic risk

Overview

This proposal-generation skill appears non-malicious, but it has unsafe file handling that could read or overwrite JSON and Markdown files outside its intended proposal folder.

Review before installing. Use this only in a constrained environment or after fixing project-name validation so proposal names cannot contain path separators, parent-directory traversal, or absolute paths. Expect it to create local proposal JSON and Markdown files.

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

T09 · Insecure Skill Coding Practices

Error
Location
proposal_gen.py:21
Finding

Path Traversal Enables File Access Outside the Proposal Directory

Content
View full analysis
Remediation
View remediation
str: if not PROJECT_NAME_RE.fullmatch(name): raise ValueError("Invalid project name") return name ``` 2. **Resolve and verify every target path.** Use `pathlib.Path.resolve()` and confirm that the final path remains under the proposal directory: ```python from pathlib import Path BASE_DIR = (Path(__file__).resolve().parent / "proposals").resolve() BASE_DIR.mkdir(parents=True, exist_ok=True) def proposal_path(name: str, suffix: str) -> Path: validate_project_name(name) target = (BASE_DIR / f"{name}{suffix}").resolve() if target.parent != BASE_DIR: raise ValueError("Path escapes the proposal directory") return target ``` 3. **Use the centralized safe-path function for every operation:** ```python def load(name): path = proposal_path(name, ".json") if path.exists(): with path.open("r", encoding="utf-8") as handle: return json.load(handle) return None def save(name, data): path = proposal_path(name, ".json") with path.open("w", encoding="utf-8") as handle: json.dump(data, handle, ensure_ascii=False, indent=2) ``` 4. **Protect Markdown generation with the same validation:** ```python output = proposal_path(args.project, ".md") ``` 5. **Avoid unintended overwrites.** For creation operations, use exclusive creation mode (`"x"`) or require explicit overwrite confirmation. For updates, write to a temporary file within `BASE_DIR` and atomically replace the intended target. 6. **Enforce JSON schema validation.** Validate loaded proposal documents before using keys such as `name`, `type`, `section ...[truncated 555 chars]
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill metadata does not declare any tool scope or permission boundaries, yet the static analyzer detected file read/write capabilities. This creates an authorization ambiguity: a caller or host may not understand that the skill can access or modify files, increasing the risk of unintended data exposure or filesystem changes if the implementation is broader than expected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description 'skill proposal gen' is too vague to communicate when the skill should or should not be invoked. Ambiguous activation criteria can cause the agent to select this skill for unrelated requests, which becomes more dangerous when the skill may have file read/write capabilities because it broadens the chance of unnecessary privileged execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The listed application scenarios—daily business processes, automation tasks, and data processing—are extremely broad and overlap with many ordinary user requests. Overbroad scenarios increase the likelihood that the skill is auto-selected in contexts the author did not anticipate, potentially exposing file access functionality or producing unsafe side effects outside its intended domain.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest text is primarily in Chinese on L03 and L05, while also defining an English trigger on L08, but it does not state any user language preference, opt-in, or locale limitation. This can create a language-policy issue because the skill appears to impose or assume language behavior without explicitly offering a language/locale choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description is only 'skill proposal gen', which suggests proposal generation but does not communicate that the code creates a local proposals directory, writes JSON proposal state, and exports Markdown files. File creation and persistent local storage are substantive behaviors beyond a minimal 'generator' description and are visible in the save and generate paths.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The class docstring labels this as the 'skill_proposal_gen' skill and the execute() docstring says it 'executes the main function', but execute() only returns a success dictionary without creating, generating, exporting, or listing proposals. This actively diverges from the actual operational code in the CLI functions above, creating a misleading interface contract about what the skill does.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes the skill only as 'skill proposal gen', which implies proposal-generation functionality. However, the implementation does not generate proposals or perform any content-generation logic; it only supports a trivial connect action and otherwise returns a generic success message for arbitrary actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file mixes English identifiers and descriptions with Chinese user-facing headings and content, but does not state whether the skill should respond in Chinese, English, or according to user preference. This can create a language-policy issue if the skill implicitly forces a language or locale without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language descriptions that force a specific language/locale, such as the module docstring in Chinese. The policy requires flagging language constraints when the skill does not offer user opt-in or an explicit justified locale limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Multiple command descriptions, help strings, and printed messages are presented only in Chinese, which imposes a fixed language on users. There is no indication that users can select another language or that the locale restriction is intentional and documented.

Content

No source excerpt is available for this finding.