Back to skill

Security audit

Daily Report Joig

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple Chinese daily-report generator, but it allows writing the report to an unrestricted user-supplied file path.

Install only if you are comfortable with the skill writing files. Use the default reports/{date}-daily-report.md location or a clearly safe workspace path, and avoid supplying absolute paths, ../ traversal, or paths to existing project/configuration files unless you intentionally want them overwritten.

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

Warning
Location
SKILL.md:15
Finding

Unrestricted Output Path Allows Arbitrary File Overwrite

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15 and 41
Vulnerability Type: Unrestricted user-controlled file path
Risk Level: Medium

Vulnerable Code Snippet

The following is an English translation of the relevant instructions:

text
- outputPath (optional): defaults to reports/{date}-daily-report.md
...
3) Write to outputPath (ensure the parent directory exists)

Technical Analysis

The skill accepts outputPath as an input and instructs the agent to create its parent directory and write the generated report to that path. It does not require the resolved path to remain under the intended reports/ directory, reject absolute paths, remove traversal components, or prevent overwriting an existing file.

Consequently, a caller can provide a path containing ../ components or an absolute path. If the underlying agent follows these instructions literally, the report may be written to any location permitted by the agent process. Creating missing parent directories further expands the set of reachable destinations.

This is an arbitrary file-write and overwrite weakness rather than a privilege-escalation mechanism. The write remains limited by the filesystem permissions of the process executing the skill.

Attack Path

  1. An attacker invokes the skill with otherwise valid report data.
  2. The attacker supplies an outputPath such as ../../target-file or an absolute filesystem path.
  3. The skill normalizes the date and generates the Markdown report.
  4. Following the documented behavior, the agent creates the supplied path's parent directories if necessary.
  5. The agent writes the report to the attacker-selected destination.
  6. If the destination already contains a writable configuration, source, state, or data file, its contents may be replaced by the generated report.

Successful exploitation requires the selected destination to be writable by the agent process.

Impact

...[truncated 475 chars]

Remediation
View remediation

Remediation Suggestions

  1. Use a fixed, dedicated output root such as reports/.
  2. Reject absolute paths and input containing parent-directory traversal components.
  3. Resolve the requested path to its canonical absolute form and verify that it remains beneath the canonical output root.
  4. Treat the user input as a filename or safe relative path rather than an unrestricted filesystem path.
  5. Reject symbolic-link destinations that resolve outside the approved output directory.
  6. Do not overwrite existing files by default; require explicit authorization or use exclusive file creation.
  7. Permit directory creation only beneath the approved output root.
  8. Run the skill with least-privilege filesystem permissions and test validation against absolute paths, traversal sequences, symbolic links, and encoded traversal variants.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description explicitly says the skill generates a concise Chinese daily report, which imposes a language choice by default. The policy allows language constraints only when the user is given an opt-in choice or when the locale restriction is clearly documented and justified; neither appears here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly writes a Markdown file to a user-provided path, but the description and boundaries do not clearly warn that it modifies the filesystem or constrain where writes may occur. This can lead to unexpected local file creation or overwrite, especially if the caller assumes the skill is purely generative rather than state-changing.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.