Back to skill

Security audit

Node Cron

Security checks for vulnerabilities and agentic risk

Overview

This is a small documentation-only skill for using the Node.js cron package, with ordinary dependency and scheduling cautions but no hidden or malicious behavior found.

Before installing or following the examples, use an exact reviewed package version and a lockfile, confirm the target IANA timezone, and review any scheduled callback code because it will run with the permissions of the Node.js process.

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
SKILL.md:7
Finding

Unpinned npm Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 7
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium
Category: T08: Insecure Dependencies

Vulnerable code snippet:

markdown
Use the `cron` npm package (`npm install cron`) for second-precision scheduled tasks in Node.js.

Technical Analysis

The documented installation command does not specify a reviewed version of the cron package. As a result, npm install cron resolves to the registry's current compatible release at installation time, making installations non-reproducible and allowing package behavior to change after this Skill has been audited.

This is a supply-chain weakness rather than evidence that the current cron package is malicious. Exploitation depends on an upstream package release, maintainer account, or package-distribution channel being compromised. If that occurs, users following the instruction could install attacker-controlled package content. Any dependency lifecycle scripts permitted by the user's npm configuration could execute during installation.

Attack Path

  1. An attacker compromises the upstream package, a maintainer account, or the package publication process.
  2. The attacker publishes a malicious version under the legitimate cron package name.
  3. A user follows the Skill's unpinned npm install cron instruction.
  4. npm resolves and downloads the malicious current release because no exact reviewed version or integrity-controlled lockfile is required.
  5. Malicious lifecycle code may execute during installation, or malicious library behavior may run when the application imports and uses the package.

Impact Assessment

Successful exploitation could execute code with the privileges of the account running npm or the resulting Node.js application. Depending on that environment, the attacker could access project files, application secrets and environment variables, modify depe ...[truncated 433 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace the floating installation instruction with an exact, reviewed package version, for example npm install --save-exact cron@X.Y.Z.
  • Commit the generated lockfile and use npm ci in automated or production environments to enforce reproducible dependency resolution.
  • Review package provenance, maintainers, release history, and registry integrity before approving upgrades.
  • Enable automated dependency scanning and require review for lockfile changes.
  • Consider disabling dependency lifecycle scripts during installation with npm ci --ignore-scripts when they are not required, followed by explicit execution of any trusted build steps.
  • Periodically update the pinned version after security review rather than relying on an unrestricted current release.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: node-cron
description: Node.js cron job scheduling with the `cron` npm package. Use when the user needs to schedule recurring tasks, create cron jobs, validate cron expressions, set up timed callbacks, or work with cron syntax in a Node.js/TypeScript project. 
---

# Node Cron

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger section includes generic phrases such as "schedule task" and "cron job," which are broad enough to match ordinary user requests without clearly limiting activation to the Node.js cron package context. The file does not provide negative examples or explicit scope constraints for when this skill should or should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The examples hard-code 'Asia/Shanghai' without user opt-in or explanation, which can lead users to deploy scheduled jobs with unintended execution times. In scheduling code, silent timezone assumptions can cause missed jobs, premature execution, or business-logic errors that affect production operations.

Content

No source excerpt is available for this finding.