Back to skill

Security audit

diy-pc-ingest

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because it reports undeclared record archiving and unsafe page matching, while parts of the scan were incomplete.

Consider the suspicious verdict and incomplete scan coverage before installing. The scanners report that the skill can archive records and that a deprecated script can target pages outside the intended tables; some findings were disputed, and incomplete analysis means the evidence does not establish that all behavior is safe.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tainted flow: 'r' from os.environ.get (line 145, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/_deprecated/notion_apply_records.py (reported line 147)May include surrounding context.

python
headers["Content-Type"] = "application/json"
    r = urllib.request.Request(url, method=method, data=data, headers=headers)
    try:
        with urllib.request.urlopen(r, timeout=60) as resp:
            raw = resp.read().decode("utf-8")
    except urllib.error.HTTPError as e:
        raw = e.read().decode("utf-8")

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Most functionality is consistent with a persistence helper for the declared ingestion workflow; reading configuration and credentials and calling Notion are supporting implementation details. However, the explicit page-ID escape hatch adds undeclared archiving and permits updates outside the configured tables without checking page membership. Matching is also best-effort rather than verified: multiple matches can produce no selected existing record, after which the caller creates a new page. Classification and enrichment could be implemented elsewhere in the skill, so their absence from this helper alone is not treated as the decisive mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The only supplied operation is external skill installation, which is materially different from the declared data-ingestion purpose. Although the package name references Notion automation, the chunk does not establish that it implements the stated DIY_PC workflow. The installed package's behavior cannot be assessed from this command alone.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Most behavior implements the declared workflow, including conservative updates, unknown-serial handling, and verified writes. However, archive requests produce PATCH operations setting archived: true, including requests that only archive an existing record. This is a distinct record-removal capability not disclosed by the description. Classification and enrichment are not implemented in this chunk, but their absence alone does not establish a mismatch because this script may be one component of the larger skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The only supplied operation installs another skill; it does not parse PC information, classify or enrich parts, or create and verify Notion records. Although Notion automation could support the declared workflow, this chunk does not establish that dependency relationship or implement the workflow. No malicious behavior is demonstrated.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
5) **Plan using live reads** with `scripts/notion_apply_records.js --plan` (`--dry-run` is an alias; no mode also defaults to plan). Feed JSONL on stdin and exp

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/notion_apply_records.js --plan --notionctl-path "<RESOLVED_NOTIONCTL_PATH>" --storage-dsid <STORAGE_DS_ID> --storage-dbid <STORAGE_DB_ID> < records

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/notion_apply_records.js --apply --notionctl-path "<RESOLVED_NOTIONCTL_PATH>" --storage-dsid <STORAGE_DS_ID> --storage-dbid <STORAGE_DB_ID> < record

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- JS implementation is the default: `scripts/notion_apply_records.js`

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Primary ingestion path is `scripts/notion_apply_records.js`.

Substring-only matching can update a different device instead of performing a verified upsert.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Legacy matching accepts a single substring hit without verifying exact identity, so a partial serial or title can select a different physical device. Limited, unpaginated queries and weak fallback logic can also miss ambiguity or create duplicates, leading to incorrect updates and potentially overwrites when enabled.

Content

No source excerpt is available for this finding.

The page-ID escape hatch can modify or archive pages outside the DIY_PC tables.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The direct-ID branch retrieves and patches the supplied page without checking that its parent belongs to the selected DIY_PC target. If this deprecated script is invoked, crafted input can modify or archive unrelated pages accessible to the integration; the documented prohibition on using it reduces exposure but does not fix the code.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/notion_apply_records.test.js (reported line 20)May include surrounding context.

js
if (f.and) return f.and.every(x => matches(r, x));
    const p = r.properties[f.property], type = schema[f.property].type, rule = f[type];
    const value = ['title', 'rich_text'].includes(type) ? (p?.[type] || []).map(t => t.plain_text ?? t.text?.content ?? '').join('') : type === 'date' ? p?.date?.start : p?.[type];
    return rule.is_empty ? !value : value === rule.equals;
  }
  async function req(method, endpoint, body) {
    calls.push({ method, endpoint, body });

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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 · scripts/_deprecated/notion_apply_records.py (reported line 29)May include surrounding context.

python
import urllib.request
from dataclasses import dataclass

API = "https://api.notion.com/v1"

DEFAULT_NOTION_VERSION = "2025-09-03"

The ingestion skill can archive existing Notion records, a capability outside its stated classification, enrichment, and upsert purpose.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

L352 accepts either archive or archived from an input record, and L372 sets body.archived to true for a matching existing page. This is executed through the PATCH request at L439 and verified at L447, allowing input records to remove existing entries from active tables rather than merely ingest or enrich them. Archiving is not declared in the manifest and is not required for the stated upsert workflow.

Content

No source excerpt is available for this finding.