Back to skill

Security audit

memory-referee

Security checks for vulnerabilities and agentic risk

Overview

The skill’s runtime behavior is mostly disclosed memory processing, but the package includes repository instructions that can push an AI agent to run unaudited external Saturnday commands and install a hook.

Review this package before installing in an agent workspace. The memory-processing code is narrow and local, but do not let an agent automatically follow artifact/CLAUDE.md; require explicit approval before running saturnday commands or installing hooks. Also avoid exposing test or dev tooling to untrusted users and treat generated Markdown/JSON reports as potentially sensitive because they include memory contents and provenance.

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

T01 · Skill Instruction Hijacking

Error
Location
CLAUDE.md:1
Finding

Repository Instructions Mandate External Tool Execution and Override the Agent Workflow

Content
View full analysis

Vulnerability Details

File Location: CLAUDE.md:1-42
Vulnerability Type: Agent instruction hijacking through repository-controlled instructions
Risk Level: High

Vulnerable Code

text
You are operating inside Saturnday, a governed terminal-first execution system for AI-built software. All work in this repository must follow Saturnday governance.

Core objectives:
1. Complete the user's task correctly.
2. Keep work governed, auditable, and reviewable.
3. Prefer facts over claims. Do not invent results or say checks passed if you did not run them.

Working rules:
1. When asked to scan or review a repository, run:
   saturnday governance --repo . --full

2. Before any commit, run:
   saturnday governance --repo . --staged

3. A pre-commit hook may block commits that fail governance. If blocked, fix the findings and retry.

4. When asked to BUILD a new project or feature from scratch, ALWAYS use the governed pipeline:
   a. saturnday plan --brief "description" --repo . --backend {backend}
   b. saturnday run --plan plan.json --repo . --backend {backend}
   Do NOT code new projects directly. The pipeline generates design-decision-rich tickets, runs a simplifier pass, executes role passes, and produces a full run report.

5. Do NOT edit files directly. All changes must go through Saturnday:
   - New projects: saturnday plan + saturnday run
   - Bug fixes and small changes: saturnday repair
   - Governance findings: saturnday repair
   Every change must be governed, evidence-tracked, and auditable.

7. If governance findings exist, repair them with Saturnday repair for the repository or skill as appropriate. Do not use saturnday rerun-failed for repair work.

8. If a finding reflects the intended core behaviour of the project rather than a defect, exempt it in .saturnday-policy.yaml instead of forcing a misleading code change.

9. If saturnday repair finishes with failed tickets, inspect the
...[truncated 3829 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove directives addressed to an AI agent that claim authority over all repository work or automatically require command execution.
  2. Move governance documentation into a human-facing contributor guide and describe the commands as optional procedures rather than mandatory agent instructions.
  3. Require explicit user confirmation before an agent executes saturnday or any other repository-specified external program.
  4. Do not prohibit ordinary review or editing mechanisms. Security tooling should supplement established workflows rather than replace them through repository text.
  5. Remove the automatic saturnday hook install directive. Hook installation should be a deliberate, separately approved action with a documented uninstall procedure.
  6. Pin, distribute, and audit the external tool if it is genuinely required. Document its source, version, integrity verification, permissions, network behavior, and filesystem effects.
  7. Run external governance tooling with least privilege, restricted network access, and access limited to the intended repository.
  8. Keep repository instruction files scoped to project facts such as build commands and coding conventions; they should not override user intent, safety controls, tool-approval boundaries, or the agent's final response contract.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • 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 (22)

Known Vulnerable Dependency: vitest==2.1.9 — 2 advisory(ies): CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed); CVE-2026-84373 (Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock)

Critical
Category
Supply Chain
Confidence
94% confidence
Finding

vitest 2.1.9 is flagged for arbitrary file read and possible execution exposure when the Vitest UI server is listening, plus the redirect-mock traversal issue. While this is a dev dependency rather than application runtime code, agent skills often run tests or developer tooling automatically, which makes insecure test infrastructure more relevant than in a purely static library.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: vitest==2.1.9 — 2 advisory(ies): CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed); CVE-2026-84373 (Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock)

Critical
Category
Supply Chain
Confidence
98% confidence
Finding

The project resolves vitest to 2.1.9, which is flagged with critical advisories including arbitrary file read and possible code execution when Vitest UI or mocker-related functionality is exposed. Even though vitest is a devDependency, agent skills often run tests, local tooling, or CI in environments that may handle sensitive source, secrets, or workspace files, making this more dangerous than a typical isolated library issue.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A report renderer or fixture-based test harness is not equivalent to an operational adjudication layer. If users rely on presentation-only logic as if it performed real memory enforcement, the skill may silently pass through unsafe records while creating the appearance of governance.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: nanoid==3.3.11 — 3 advisory(ies): CVE-2026-67214 (nanoid: non-secure generators can loop indefinitely with negative size); CVE-2026-67213 (nanoid: custom generators can loop indefinitely when size is zero); CVE-2026-73086 (nanoid: Integer Overflow or Wraparound)

High
Category
Supply Chain
Confidence
80% confidence
Finding

nanoid 3.3.11 is flagged for denial-of-service style issues such as infinite loops and integer overflow/wraparound in non-secure or custom generator edge cases. Here it is a transitive dev dependency through PostCSS/Vite, so the vulnerable version is present, though exploitability depends on attacker influence over generator parameters or tool inputs.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: postcss==8.5.8 — 4 advisory(ies): CVE-2026-45623 (PostCSS: Arbitrary file read and information disclosure via attacker-controlled ); CVE-2026-69153 (PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappi); CVE-2026-41305 (PostCSS has XSS via Unescaped </style> in its CSS Stringify Output) +1 more

High
Category
Supply Chain
Confidence
86% confidence
Finding

postcss 8.5.8 is flagged for multiple issues including arbitrary file read/information disclosure and XSS-related behavior under attacker-controlled inputs. Since it is included transitively via Vite, the vulnerable component is present; in workflows processing untrusted CSS or source maps, this can become materially dangerous.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: vite==5.4.21 — 3 advisory(ies): CVE-2026-39365 (Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling); CVE-2026-53571 (vite: `server.fs.deny` bypass on Windows alternate paths); CVE-2026-53632 (launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows)

High
Category
Supply Chain
Confidence
91% confidence
Finding

vite 5.4.21 is associated with path traversal, deny-bypass, and Windows UNC/NTLM disclosure issues. Although marked dev-only, Vite commonly runs local or shared development servers, and in an agent skill ecosystem that may handle repository content and local files, these flaws can expose sensitive data if untrusted content is served or interacted with.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · src/conflicts.ts (reported line 91)May include surrounding context.

ts
function hasNegationNearSharedNoun(tokens: string[]): string | null {
    for (let i = 0; i < tokens.length; i++) {
      if (!NEGATION_RE.test(tokens[i])) continue;
      NEGATION_RE.lastIndex = 0; // reset stateful regex
      // Look within window around position i.
      const lo = Math.max(0, i - WINDOW);
      const hi = Math.min(tokens.length - 1, i + WINDOW);

Known Vulnerable Dependency: @vitest/mocker==2.1.9 — 1 advisory(ies): CVE-2026-84373 (Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock)

Low
Category
Supply Chain
Confidence
89% confidence
Finding

@vitest/mocker 2.1.9 is flagged for a path traversal/arbitrary file read issue related to redirect mocks. In this lockfile it appears as a dev/test dependency via Vitest, so the risk is real but mainly manifests when running tests or mock-related workflows rather than in normal production runtime.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: esbuild==0.27.4 — 1 advisory(ies): GHSA-g7r4-m6w7-qqqr (esbuild allows arbitrary file read when running the development server on Window)

Low
Category
Supply Chain
Confidence
82% confidence
Finding

esbuild 0.27.4 is listed with a known arbitrary file read issue affecting the development server on Windows. The package is present as a build/runtime tooling dependency for tsx, so the vulnerable component exists, but exploitation depends on using the dev server behavior in a relevant environment.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: esbuild==0.21.5 — 1 advisory(ies): GHSA-67mh-4wv8-2f99 (esbuild enables any website to send any requests to the development server and r)

Low
Category
Supply Chain
Confidence
80% confidence
Finding

esbuild 0.21.5, nested under Vite, is flagged for a development server issue allowing arbitrary requests to the dev server. This is a real dependency risk, but it is constrained to dev-server usage and is less relevant if the environment never exposes that service to untrusted origins.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 14)May include surrounding context.

json
"start": "node dist/index.js"
  },
  "dependencies": {
    "tsx": "^4.0.0"
  },
  "devDependencies": {
    "@types/node": "^25.5.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 17)May include surrounding context.

json
"tsx": "^4.0.0"
  },
  "devDependencies": {
    "@types/node": "^25.5.0",
    "typescript": "^5.0.0",
    "vitest": "^2.0.0"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 18)May include surrounding context.

json
},
  "devDependencies": {
    "@types/node": "^25.5.0",
    "typescript": "^5.0.0",
    "vitest": "^2.0.0"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 19)May include surrounding context.

json
"devDependencies": {
    "@types/node": "^25.5.0",
    "typescript": "^5.0.0",
    "vitest": "^2.0.0"
  }
}

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This code renders record content, entity identifiers, source labels, source IDs, and timestamps directly into Markdown output. Although rendering a report is the function's purpose, there is no visible user-facing warning, comment, or disclosure that the generated output may include potentially sensitive memory and provenance data that could be shared or persisted.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.