Back to skill

Security audit

Scrapfly Screenshot

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward guide for using Scrapfly to take website screenshots, with expected third-party API use and no hidden execution behavior in the artifact.

Install in a virtual environment, consider pinning scrapfly-sdk, and only use the skill with pages you are allowed to send to Scrapfly. Avoid private, authenticated, internal, or regulated content unless your organization has approved that data sharing and retention.

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:18
Finding

Unpinned Third-Party SDK Creates Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 18-20
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Medium

The setup instructions install the latest available version of a third-party SDK without a version constraint or integrity verification:

markdown
## Setup

```bash
pip install scrapfly-sdk
text

### Technical Analysis

The command resolves `scrapfly-sdk` dynamically from the configured Python package index. Because neither an exact version nor a cryptographic hash is specified, the code installed by users can change after this Skill has been reviewed.

If the package publisher, package registry, dependency chain, or local package-index configuration is compromised, an attacker-controlled release could be selected. Python packages may execute code during installation and will execute package code when imported. The Skill subsequently imports `ScrapflyClient` and `ScreenshotConfig`, so a malicious package version could run in the user's Python process.

This is a supply-chain weakness rather than evidence that the current `scrapfly-sdk` package is malicious. The raw GitHub links elsewhere in `SKILL.md` are documentation links to enum definitions; the audited instructions do not download or execute those linked files.

### Attack Path

1. An attacker compromises the package publisher, package registry, an upstream dependency, or a package index configured in the user's environment.
2. The attacker publishes or serves a malicious version that satisfies the unrestricted package request.
3. A user follows the documented `pip install scrapfly-sdk` instruction.
4. `pip` resolves and installs the attacker-controlled release.
5. Malicious code executes during installation or when the SDK is imported by the screenshot workflow.
6. The payload operates with the privileges of the user or automation account running `pip` or Python.

### Impact Assessment

Successful
...[truncated 514 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the SDK to an exact, reviewed version rather than installing the latest release:
    bash
    pip install "scrapfly-sdk==<reviewed-version>"
    
  • Maintain dependencies in a lock file or requirements file containing cryptographic hashes, and install them with hash enforcement:
    bash
    pip install --require-hashes -r requirements.txt
    
  • Generate hashes only from artifacts obtained through a trusted package index and review transitive dependencies before approval.
  • Use an isolated virtual environment or container and avoid installing the package with administrator or root privileges.
  • Configure an explicit trusted package index and disable unexpected supplemental indexes to reduce dependency-confusion exposure.
  • Add automated dependency scanning and controlled update review so version changes are assessed before deployment.
  • Restrict the runtime environment's filesystem, environment-variable, and network access to the minimum needed for screenshot requests.
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 (2)

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The skill is explicitly built around sending user-supplied URLs to the external Scrapfly API, which causes page contents and screenshot artifacts to leave the local environment. In this context the external transmission is expected functionality, but it is still security-relevant because users may provide sensitive targets or pages rendered with credentials, and the skill does not sufficiently emphasize that risk.

Content

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

md
## API Reference

**Endpoint:** `GET https://api.scrapfly.io/screenshot`

### ScrapflyClient

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs users to send target URLs and receive screenshot data via Scrapfly, and the notes explicitly state screenshots are stored by Scrapfly, but the skill omits a clear upfront warning about this third-party transmission and retention. This can cause users to unknowingly send sensitive internal URLs, authenticated pages, or regulated content to an external service, creating confidentiality and compliance risk.

Content

No source excerpt is available for this finding.