Back to skill

Security audit

News Sum Lite

Security checks for vulnerabilities and agentic risk

Overview

This news-brief skill performs useful summarization, but it also writes a file and sends an email attachment automatically with weak scoping and an unsafe runtime command.

Review this skill before installing. It should be changed to save locally by default, pin or avoid the markdown renderer dependency, validate the recipient and attachment path, and require an explicit confirmation showing the destination email and file before sending anything.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:42
Finding

Unpinned Package Retrieval and Execution Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 42
Vulnerability Type: Unpinned third-party package execution
Risk Level: High

Vulnerable Code

bash
HTML=$(npx marked {todays-brief.md} --breaks)

Technical Analysis

The skill requires npx marked to convert the generated Markdown file into HTML, but it does not specify a package version, local lockfile, integrity hash, or trusted package source. If marked is unavailable locally, npx may retrieve a package from the configured registry and execute it immediately.

Consequently, the code executed during a skill run can differ from the code that was reviewed. A compromised package release, transitive dependency, registry, or package-resolution configuration could introduce arbitrary executable code. Package installation behavior and lifecycle scripts may execute with the same operating-system privileges as the agent.

Attack Path

  1. An attacker compromises the selected marked package release, one of its resolved dependencies, or the package registry used by npx.
  2. The user invokes the news-digest skill.
  3. The skill executes npx marked without an installed, pinned, and integrity-verified local version.
  4. npx resolves and potentially downloads the externally controlled package.
  5. Malicious package or lifecycle code executes under the agent's account.
  6. The payload can access resources available to that account and may modify files or invoke additional processes.

Impact Assessment

Successful exploitation can provide arbitrary code execution with the privileges of the user or service running the agent. The accessible scope may include project files, the generated news archive, environment variables, locally available credentials, and network resources permitted to the process. The instruction itself does not request privilege escalation, so the maximum direct privilege is limited to the agent process's existing permis ...[truncated 6 chars]

Remediation
View remediation

Remediation Suggestions

  • Add a reviewed version of marked to the project dependencies and pin its exact version through a lockfile.
  • Install dependencies during a controlled deployment step rather than dynamically during skill execution.
  • Invoke only the verified local executable, with network-based installation disabled, such as npx --offline --no-install marked.
  • Enforce lockfile integrity in CI and monitor dependencies for compromised or vulnerable releases.
  • Run document conversion in a restricted environment with minimal filesystem, credential, and network access.
  • Where practical, use a reviewed in-process Markdown conversion library instead of launching a package through a shell.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:42
Finding

Shell Argument Injection Through Unquoted Template Values

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 42-44
Vulnerability Type: Command and argument injection
Risk Level: High

Vulnerable Code

bash
HTML=$(npx marked {todays-brief.md} --breaks)
HTML="<div style='font-family:Arial, sans-serif; line-height:1.6;'>$HTML</div>"
gog gmail send --to={aim-email} --subject="今日简报 yyyy-mm-dd" --attach={todays-brief.md} --body-html "$HTML"

Technical Analysis

The {todays-brief.md} and {aim-email} placeholders are interpolated into shell commands without shell-safe quoting. If either substituted value is influenced by a user, generated content, or external data, shell metacharacters may be interpreted as command syntax. Whitespace can also split one intended value into multiple arguments, while values beginning with hyphens may be interpreted as additional command-line options.

Quoting only $HTML does not protect the unquoted recipient and attachment substitutions. A crafted value containing command separators, command substitutions, redirections, or extra options could change the intended shell command. The precise exploitability depends on how the placeholders are populated, but the documented command provides no validation, canonicalization, or safe argument construction.

Attack Path

  1. An attacker supplies or influences the destination email address or briefing-file value.
  2. The agent substitutes that value directly into the documented shell command.
  3. The shell parses embedded metacharacters, whitespace, substitutions, or injected command options.
  4. The attacker causes an unintended command to execute, alters the email recipients, or selects a different attachment.
  5. The injected operation runs with the same privileges and filesystem access as the agent.

For example, if a shell metacharacter-bearing recipient were accepted without validation, the resulting gog gmail send line could terminate the intended command and ...[truncated 669 chars]

Remediation
View remediation

Remediation Suggestions

  • Avoid constructing commands as shell strings. Invoke the converter and mail client through a process API that accepts an explicit argument array.
  • Validate the recipient with a strict email-address parser and reject shell syntax, control characters, whitespace-separated recipients, and unexpected command options.
  • Derive the briefing path internally rather than accepting an arbitrary path. Resolve and canonicalize it, then verify that it remains inside archive/news/brief/.
  • Quote every shell-expanded value if shell execution cannot be eliminated.
  • Use -- before path operands where the selected utility supports it, preventing option-like filenames from being parsed as flags.
  • Reject filenames containing control characters and avoid permitting user-controlled path components.
  • Run the email operation with least privilege and require explicit confirmation of the recipient and attachment before transmission.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs writing a markdown file and sending an email with an attachment, yet the description does not warn the user about these high-impact actions. Hidden side effects are dangerous because they bypass user expectations and can lead to unauthorized persistence or exfiltration of generated content to an external recipient.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad and lack exclusion conditions, so the skill may activate in situations where the user did not intend file creation or email delivery. Because this skill performs external side effects, overbroad activation materially raises the risk of unintended execution and data handling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest presents the skill as a lightweight news summarizer, but the workflow includes writing files and sending email with attachments. This mismatch can mislead users or orchestrators about the skill's true capabilities, increasing the chance that impactful actions occur without informed consent or proper policy gating.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Email sending is not necessary to fulfill the stated purpose of generating a lightweight daily brief, so it expands the skill's authority beyond its apparent scope. Unnecessary communication capabilities increase the blast radius for accidental disclosure, spam, or abuse if the skill is triggered unexpectedly or manipulated by input content.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The skill invokes npx marked without pinning a specific version, which can fetch and execute whatever package version is current at runtime. In an agent context that performs automated actions, this introduces supply-chain risk and can lead to execution of malicious or unexpected code if the dependency is compromised or changes behavior.

Content

No source excerpt is available for this finding.