Back to skill

Security audit

Scrapfly SDK TypeScript

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Scrapfly SDK usage guide, with expected cloud scraping and extraction behavior but some privacy and dependency hygiene cautions.

Install this only if you are comfortable using Scrapfly as an external scraping and extraction service. Do not send private, authenticated, personal, or proprietary page content to extraction unless you are authorized, and prefer pinning the SDK version and using a lockfile for reproducible installs.

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

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 27
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code:

bash
npm install scrapfly-sdk

Technical Analysis

The installation instruction does not specify an exact, reviewed version of scrapfly-sdk. Consequently, users following this instruction will install whichever release and transitive dependency graph the package registry resolves at installation time.

This creates a supply-chain risk because the installed code can differ from the code that existed when the Skill was audited. If the package publisher account, package, registry resolution, or a transitive dependency is compromised, an attacker-controlled release could execute through package lifecycle scripts or when the SDK is imported and used.

The project contains no lockfile or integrity metadata that would constrain dependency resolution to an audited artifact. The package name does not itself appear to be a typosquat, and no current compromise was demonstrated; exploitation depends on a malicious or compromised future dependency release.

Attack Path

  1. An attacker compromises the scrapfly-sdk package, its publisher account, or one of its transitive dependencies.
  2. The attacker publishes a malicious release under a version accepted by the unversioned installation command.
  3. A user follows the Skill instruction and runs npm install scrapfly-sdk.
  4. npm resolves and downloads the attacker-controlled package or dependency.
  5. Malicious code executes through an installation lifecycle script or when the installed SDK is loaded.
  6. The code operates with the permissions of the user or CI process performing the installation and may access environment variables, local files, and network resources available to that process.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the dev ...[truncated 476 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace the unversioned installation command with an exact, reviewed version, for example: npm install --save-exact scrapfly-sdk@<reviewed-version>.
  • Generate and commit package-lock.json, then use npm ci in CI and other reproducible environments so dependency resolution follows the reviewed lockfile.
  • Verify lockfile integrity data and install packages only from an explicitly trusted registry.
  • Review the SDK's transitive dependencies and package lifecycle scripts before approving upgrades.
  • Automate dependency vulnerability and provenance checks while requiring human review for version changes.
  • Run dependency installation and scraping workloads in a least-privileged, isolated environment with restricted filesystem, secret, and network access.
  • Expose SCRAPFLY_API_KEY only to the process that requires it and avoid making unrelated credentials available during package installation.
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 (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill demonstrates sending scraped HTML to client.extract(...), which transmits page content to an external service for AI-based extraction, but it does not warn users that third-party page data may leave their environment. This can expose sensitive, proprietary, authenticated, or personal data if users scrape internal pages or logged-in content and assume extraction happens locally.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.