Back to skill

Security audit

Spraay Shopify Self-Host

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for deploying a Shopify payout app, but it asks users to run mutable remote code with sensitive credentials and crypto-payout authority without pinning or verification.

Review and pin the exact app source before installing. Use a reviewed commit or immutable image, inspect the Dockerfile, railway.json, package scripts, migrations, wallet transaction construction, and contract address, then start with test or least-privileged Shopify and database credentials and small-value payouts.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:30
Finding
Unpinned Remote Application Is Automatically Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 30–36 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```markdown ## Step 1 — Fork and deploy to Railway 1. Fork `plagtech/spraay-shopify` (Node 20+ required if running outside Docker: `>=20.19 <22 || >=22.12`). 2. Easiest path: the **Deploy on Railway** button in the README — the template pre-prompts for every required env var, with PORT defaulted to 3000. Manual path: Railway → New Project → Deploy from GitHub repo → select the fork; the repo ships a `railway.json` and Dockerfile, so the build is automatic. 3. Generate a public domain for the service (Settings → Networking). Note the URL, e.g. `your-app.up.railway.app`. The app will crash-loop until env vars are set — that's expected. Continue. ``` The subsequent deployment instructions also state that remote application commands run automatically: ```markdown Migrations run automatically on boot (`prisma generate && prisma migrate deploy`, then `remix-serve`). ``` ### Technical Analysis The skill directs users to fork, build, and execute code from the mutable external repository `plagtech/spraay-shopify`. It does not pin the repository to an audited commit SHA, signed release, or immutable container digest. The audited project contains no copy of the referenced source code, Dockerfile, Railway configuration, package lockfile, or smart-contract implementation. As a result, the effective executable payload may change after this skill has been reviewed. Railway automatically builds the remote Dockerfile and runs its startup commands. After environment variables are configured, that application receives access to sensitive deployment data, including the Shopify client secret and PostgreSQL connection strings. This is best classified as remote payload retrieval and execution rather than a confirmed malicious dependency: no malicious package was identified, but the instructions ...[truncated 2079 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the deployment source to a fully reviewed Git commit SHA rather than a mutable branch: ```text https://github.com/plagtech/spraay-shopify/tree/<audited-commit-sha> ``` 2. Prefer an immutable container image identified by a verified digest, such as `image@sha256:...`, instead of building the latest remote Dockerfile. 3. Vendor the reviewed application source, deployment configuration, and package lockfile into the audited package when licensing and distribution constraints permit. 4. Require verification of signed commits or releases and publish expected checksums for all deployable artifacts. 5. Audit the referenced `Dockerfile`, `railway.json`, package scripts, lockfile, Prisma migration scripts, OAuth implementation, wallet transaction construction, and network request destinations before production deployment. 6. Pin third-party dependencies through a committed lockfile and use reproducible installation commands such as `npm ci`. 7. Review and verify the deployed smart contract's source code, runtime bytecode, fee recipient, authorization behavior, and chain address independently before processing real funds. 8. Initially deploy with test or minimally privileged credentials. Use a dedicated database role limited to the required `shopify` schema instead of a broadly privileged database account. 9. Test the complete transaction flow on a test network or with negligible-value transactions before approving production payouts. 10. Apply outbound network restrictions and secret-access controls where supported, and rotate Shopify and database credentials immediately if an unverified revision has already been deployed. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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

Static analysis

No suspicious patterns detected.