Back to skill

Security audit

Darkmatter

Security checks for vulnerabilities and agentic risk

Overview

The skill’s context-sharing purpose is disclosed, but it encourages sending full agent inputs, outputs, and memory to an external service and inheriting remote context without enough scoping or trust safeguards.

Install only if you are comfortable sending selected agent context to DarkMatter or a self-hosted DarkMatter instance. Redact secrets, private prompts, credentials, regulated data, and unrelated conversation history before committing context, and treat pulled or replayed payloads as untrusted data unless you have verified the sender and intent.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:45
Finding

Unredacted Agent Context May Be Disclosed to an External Service

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 45–64
Vulnerability Type: External disclosure of sensitive agent context
Risk Level: Medium

Vulnerable Code

bash
curl -s -X POST https://darkmatterhub.ai/api/commit \
  -H "Authorization: Bearer $DARKMATTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toAgentId": "<RECIPIENT_AGENT_ID>",
    "payload": {
      "input":  "<what this agent received>",
      "output": "<what this agent produced>",
      "memory": {}
    },
    "agent": {
      "role":     "<researcher|writer|reviewer>",
      "provider": "<anthropic|openai|local>",
      "model":    "<model name>"
    },
    "parentId":  "<parent ctx_id if chaining>",
    "traceId":   "<optional trace group>",
    "eventType": "commit"
  }'

The skill also explicitly states at SKILL.md, lines 24–26:

text
Data notice: This skill sends agent context to darkmatterhub.ai.
DarkMatter is open source (MIT) and fully self-hostable:
https://github.com/darkmatter-hub/darkmatter

Technical Analysis

The documented commit operation instructs the agent to send its received input, generated output, and potentially its memory to darkmatterhub.ai. These fields can contain private conversations, credentials, proprietary material, system instructions, or unrelated information retained in the agent context.

Although the documentation discloses that context is sent externally, it does not define data-minimization boundaries, mandatory redaction, secret scanning, or explicit per-payload approval. The presence of an API key protects access to the service but does not prevent sensitive information from being included in an authorized request.

This is an insecure skill design practice because broad context is transmitted without safeguards that distinguish task-relevant information from confidential data.

Attack Path

  1. A user or another source supplies sensitive info ...[truncated 1269 chars]
Remediation
View remediation

Remediation Suggestions

  1. Default to transmitting only the specific output explicitly selected by the user, rather than complete input, output, and memory.
  2. Display the exact destination and payload to the user and require explicit confirmation before transmission.
  3. Prohibit automatic inclusion of system prompts, credentials, API keys, environment variables, long-term memory, and unrelated conversation history.
  4. Add secret detection and redaction for API keys, passwords, tokens, private keys, and common sensitive-data formats.
  5. Use a structured allowlist of fields rather than accepting an unrestricted context object.
  6. Provide clear retention, access-control, deletion, and recipient-visibility documentation.
  7. Consider client-side encryption when context must only be readable by the intended recipient.
  8. Recommend self-hosting where users cannot permit third-party processing of confidential context.

other

Warning
Location
SKILL.md:70
Finding

Untrusted Remote Agent Payloads May Be Inherited as Operational Context

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 70–94
Vulnerability Type: Untrusted external context ingestion
Risk Level: Medium

Vulnerable Code

markdown
### 2. Pull verified context (inherit from upstream)

```bash
curl -s https://darkmatterhub.ai/api/pull \
  -H "Authorization: Bearer $DARKMATTER_API_KEY"

Returns all verified contexts addressed to this agent, newest first.


3. Replay full decision chain

bash
curl -s "https://darkmatterhub.ai/api/replay/<CTX_ID>" \
  -H "Authorization: Bearer $DARKMATTER_API_KEY"

# Summary mode (no payloads, faster):
curl -s "https://darkmatterhub.ai/api/replay/<CTX_ID>?mode=summary" \
  -H "Authorization: Bearer $DARKMATTER_API_KEY"

Returns ordered chain root to tip with every payload, agent attribution, per-step integrity verification, and chainIntact boolean.

text

### Technical Analysis

The skill directs an agent to retrieve and “inherit” contexts produced by upstream agents. Those payloads may contain attacker-controlled natural-language instructions. Cryptographic verification can establish that content was not modified after it was committed, but it does not establish that the content is trustworthy, authorized, or safe to execute as instructions.

The documentation does not require the receiving agent to treat retrieved payloads as untrusted quoted data. It also does not establish an instruction-priority boundary, content sanitization process, sender allowlist, or user-approval step before the retrieved content affects subsequent actions.

Consequently, a malicious or compromised upstream agent could commit text designed to redirect the receiving agent, request tool use, solicit secrets, or override the intended task. The risk arises when an agent interprets inherited payload content as authoritative instructions rather than reference material.

### Attack Path

1. An attacker controls or compromises an upstream DarkMatter agent, or otherwise gains the
...[truncated 1511 chars]
Remediation
View remediation

Remediation Suggestions

  1. Explicitly state that all pulled and replayed payloads are untrusted data, even when their integrity is verified.
  2. Separate cryptographic integrity status from sender trust and content authorization in both documentation and user-facing output.
  3. Place retrieved content inside a structured, quoted data boundary and prohibit treating it as higher-priority instructions.
  4. Require explicit user approval before acting on instructions, URLs, commands, or tool requests found in remote payloads.
  5. Support sender allowlists and display the sender identity, destination, chain status, and trust policy before context is inherited.
  6. Detect and flag instruction-like content, requests for secrets, attempts to change safety constraints, and requests to invoke tools.
  7. Apply least privilege to any agent that processes external context, particularly for shell, filesystem, network, and credential access.
  8. Preserve provenance labels when remote content is summarized or passed to downstream agents so its untrusted origin remains visible.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README explicitly instructs users to commit and pull agent context through an external service, but it does not warn that this may transmit sensitive prompts, outputs, credentials, or internal reasoning to a third party. In a multi-agent pipeline, 'context' can contain highly sensitive data, so the lack of privacy and data-sharing disclosure creates a real risk of unintentional exfiltration and unsafe deployment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

The skill is explicitly designed to communicate with an external SaaS over curl, so external transmission is inherent to its function. While not malicious by itself, in this context it increases risk because the skill's stated purpose is to move agent context between systems, which may include sensitive conversation or workflow data if users are not clearly constrained.

Content

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

md
env:
        - DARKMATTER_API_KEY
      bins:
        - curl
    primaryEnv: DARKMATTER_API_KEY
---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill provides a concrete example that sends agent context to an external service and the example payload explicitly includes full agent input and output. Although the file contains a brief high-level data notice, it does not warn that these fields may contain secrets, personal data, internal prompts, or confidential user content, making accidental exfiltration likely in normal use.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The commit example instructs agents to transmit input and output verbatim, which directly encourages disclosure of full user-supplied context and model-generated results to a third-party endpoint. In an agent environment, those fields can easily include API keys, proprietary documents, system prompts, security findings, or regulated data, so this pattern creates a strong risk of unauthorized data exposure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

2. Pull verified context (inherit from upstream)

bash
curl -s https://darkmatterhub.ai/api/pull \
  -H "Authorization: Bearer $DARKMATTER_API_KEY"

Static analysis

No suspicious patterns detected.