Back to skill

Security audit

Skrape

Security checks for vulnerabilities and agentic risk

Overview

Skrape is a coherent web-scraping guidance skill, but its included robots.txt enforcement code can allow scraping when permission was not actually verified.

Install only if you treat this as general scraping guidance, not a ready-to-use compliance-safe scraper. Before using the sample code, replace the robots.txt checker with a maintained RFC-compliant parser, fail closed or require explicit user approval when verification is unknown, and review each site's terms and data-handling obligations yourself.

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

robots.txt Verification Fails Open on Retrieval and Parsing Errors

Content
View full analysis
{ let data = ''; res.on('data', chunk => data += chunk); res.on('end', () => { try { const allowed = evaluateRobotsRules(data, agentLabel, parsed.pathname); resolve(allowed); } catch (e) { resolve(true); // Missing robots.txt = permitted } }); }).on('error', () => resolve(true)); }; fetchRobots(parsed.protocol === 'https:' ? https : http) .then(resolve) .catch(() => resolve(true)); ``` ### Technical Analysis The robots.txt verification routine treats every network, protocol, and parsing failure as authorization to continue. Both the request error handler and the outer rejection handler resolve to `true`. An exception raised while evaluating the response also resolves to `true`. The response status code and content type are not validated. Therefore, an HTTP error page, malformed response, interrupted request, or other non-policy response may be evaluated as though it were a valid robots.txt file. This behavior conflicts with the Skill's stated requirement to retrieve and review robots.txt before extraction and to halt when restrictions exist. The vulnerability is a fail-open policy-control defect: failure to determine whether access is permitted is incorrectly treated as affirmative permission. ### Attack Path 1. The scraper is configured to extract content from a target URL. 2. The target server, an intermediary, or a transient network condition causes the robots.txt request to fail, return malformed content, or return an HTTP error response. 3. The request error, parser exception, or rejected promise reaches a `resolve(true)` branch. 4. `runScraper` receives `permitted = true`. 5. The scraper requests the target resource without having successfully established the site's rob ...[truncated 780 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
code.md:38
Finding

Incomplete robots.txt Rule Evaluation Can Produce Incorrect Access Decisions

Content
View full analysis
s.trim()); if (key?.toLowerCase() === 'user-agent') { if (activeAgent !== null && agentMatches(activeAgent, agentLabel)) { for (const p of blockedPaths) { if (path.startsWith(p)) return false; } } activeAgent = value; blockedPaths = []; allowedPaths = []; } else if (key?.toLowerCase() === 'disallow') { if (value) blockedPaths.push(value); } else if (key?.toLowerCase() === 'allow') { if (value) allowedPaths.push(value); } } // Evaluate final user-agent block if (activeAgent !== null && agentMatches(activeAgent, agentLabel)) { for (const p of blockedPaths) { if (path.startsWith(p)) return false; } } return true; } ``` ### Technical Analysis The parser collects `Allow` directives in `allowedPaths`, but it never uses them when determining access. Its decision is based only on whether the requested path begins with a collected `Disallow` value. The implementation also processes user-agent blocks independently instead of correctly selecting and combining applicable groups and resolving competing rules by specificity. It does not implement wildcard matching or end-of-path anchors. These omissions can produce decisions inconsistent with standard robots.txt semantics, particularly for policies containing overlapping `Allow` and `Disallow` directives, multiple applicable groups, wildcard rules, or anchored rules. Although ...[truncated 1623 chars]
Remediation
View remediation
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

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 · code.md (reported line 78)May include surrounding context.

function agentMatches(ruleAgent, requestAgent) { if (ruleAgent === '*') return true; return ruleAgent.toLowerCase() === requestAgent.toLowerCase(); }

text

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The robots.txt gate fails open on parse errors, fetch errors, and network failures by resolving to permitted access. In a scraping skill whose stated safety boundary is robots exclusion adherence, this can cause unauthorized scraping whenever robots.txt is unavailable or malformed, undermining the core policy control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The connection manager sets acceptLanguage to en-US,en;q=0.9, which forces an English locale for all requests without any user choice or opt-in. This is a natural-language/locale policy concern because the skill imposes a language preference globally rather than making it configurable or documenting a justified region-specific need.

Content

No source excerpt is available for this finding.