Back to skill

Security audit

日志

Security checks for vulnerabilities and agentic risk

Overview

This log-sanitizing skill requests broad file and command access and advertises unrelated automation features, so users should review it before installing.

Install only if you are comfortable granting a log-sanitization skill file access and potential command execution. Prefer running it in a sandbox, limit it to explicit user-selected log files, require confirmation before writing output, and do not allow arbitrary shell commands unless the publisher documents a narrow allowlist.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:17
Finding

Excessive Tool Permissions for a Log-Sanitization Skill

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 17–20
Vulnerability Type: Excessive filesystem and command-execution permissions
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec
- write

Technical Analysis

The skill declares general read, write, and exec capabilities even though its documented purpose is to sanitize supplied log content. Command execution is not inherently required for text sanitization, while unrestricted filesystem access is broader than necessary when content can be passed directly to the skill.

The project contains only documentation and does not define command allowlists, permitted filesystem paths, write confirmations, or sandbox controls. Consequently, security depends entirely on controls implemented by the host agent. If the agent grants these tools without strict mediation, untrusted log content or embedded instructions could influence the agent into invoking commands or accessing files unrelated to sanitization.

No explicit malicious command, credential-exfiltration routine, persistence mechanism, or remote payload was found. Exploitation is therefore conditional on the host agent granting the declared permissions and inadequately separating untrusted data from executable instructions.

Attack Path

  1. A host agent loads the skill and grants its declared read, write, and exec tools.
  2. An attacker submits crafted log content containing instructions or data intended to influence tool use.
  3. If the host agent treats that content as actionable instructions rather than untrusted data, it may invoke exec or access arbitrary filesystem paths.
  4. The resulting tool calls could read sensitive local files, modify files available to the agent, or execute commands with the agent process's operating-system privileges.

Impact Assessment

Successful exploitation could provide access to files readable or writable by the agent proce ...[truncated 499 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove exec because command execution is not necessary for log-text sanitization.
  2. Process content supplied directly by the user without filesystem access whenever possible.
  3. If file processing is required, restrict read and write to explicit user-selected paths within a dedicated sandbox directory.
  4. Require user confirmation before overwriting or creating files.
  5. Treat all log content as untrusted data and prevent it from being interpreted as agent instructions.
  6. Enforce file-size, input-format, path-traversal, and symbolic-link checks before processing files.
  7. Document the exact tool operations required by the skill and apply a deny-by-default command and path policy.
  8. Run the skill under a minimally privileged operating-system identity with no access to credentials, sensitive configuration, or unrelated project files.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Command execution is a powerful capability that is not justified by the stated purpose of sanitizing log text. If an agent enables this skill based on its benign description, the unnecessary exec permission could be abused to run shell commands, access local data, or pivot into broader system actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a log-sanitization utility, but its documentation also advertises broad automation uses, deployment management, API integration, file writing, and command execution. This mismatch expands the implied trust boundary and can cause an agent or user to authorize capabilities far beyond the stated purpose, increasing the chance of unsafe invocation or misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation wording is overly broad and references generic operations and workflow scenarios, which can cause an agent to match and invoke the skill for unrelated requests. Overbroad triggering is dangerous here because the skill also declares privileged tools like exec and write, creating opportunities for unintended high-impact use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file describes the skill as focused on log sanitization, yet also claims unrelated features such as token encoding/decoding and monitoring-style workflows. These inconsistent claims can mislead routing and user consent, causing the skill to be selected for tasks outside its safe, expected domain.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The description states '支持中文交互,无需复杂配置即开即用', which sets a language expectation but does not indicate that users may choose another language. Under the language/locale policy, skills should not impose a language preference unless it is optional or clearly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The '即刻上手' section tells users to call the skill in an AI Agent conversation with necessary inputs, but it does not define when this skill should be selected versus other skills. For a manifest/markdown skill description, the absence of specific triggers or negative examples makes activation scope ambiguous.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The FAQ explicitly states that the skill supports real-time log monitoring via scheduled or event-driven triggering, which is a distinct operational capability from sanitizing provided content. In this file, that claim contradicts the otherwise narrower description centered on sanitizing input content.

Content

No source excerpt is available for this finding.