T08 · Insecure Dependencies
- Location
SKILL.md:63- Finding
Unpinned Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 63
Vulnerability Type: Supply-chain exposure through unpinned package execution
Risk Level: MediumVulnerable Code
markdown - Regenerate types: `npx supabase gen types typescript --local > src/lib/supabase/types.ts`.Technical Analysis
The skill instructs the agent to execute the Supabase CLI through
npxwithout requiring a locally installed, lockfile-resolved package or pinning an exact reviewed version. When no suitable local executable exists,npxmay retrieve and execute a package from the configured package registry.This makes the executed code dependent on mutable external registry content rather than only on dependencies already reviewed and locked by the target project. A compromised package release, registry account, registry endpoint, or package-resolution configuration could therefore introduce arbitrary code into the skill workflow.
The command is especially sensitive because the skill has filesystem permission and declares access to inherited environment variables. Package installation and CLI startup code execute with the same operating-system privileges as the agent process.
Attack Path
- A user requests a feature that requires a database schema or generated Supabase types.
- The skill follows its database workflow and invokes the documented
npx supabasecommand. - The target project does not contain a trusted local Supabase CLI executable, or package resolution is influenced by a malicious registry configuration.
npxretrieves a mutable or compromised package from the configured registry.- Package lifecycle logic or CLI startup code executes under the agent's identity.
- The malicious code can access files writable or readable by that identity, inspect inherited environment data, alter generated project files, or execute additional processes.
Impact Assessment
Successful exploitation could provide arbitrary code execution with ...[truncated 684 chars]
- Remediation
View remediation
Remediation Suggestions
-
Require the Supabase CLI to be declared in the project's development dependencies with an exact or appropriately constrained version and committed lockfile.
-
Invoke only the lockfile-resolved local binary. For example, use an offline package-manager mode such as:
bash npm exec --offline -- supabase gen types typescript --local -
Before execution, verify that the resolved executable belongs to the expected package and comes from the project's local dependency tree.
-
Do not permit automatic registry downloads during feature generation. If installation is necessary, obtain explicit user approval and install an exact reviewed version.
-
Use trusted registry configuration and package integrity verification.
-
Run code-generation tools in a restricted environment with minimal filesystem, environment-variable, process, and network access.
-
Apply the same lockfile-backed and offline-execution requirement to other
npxcommands documented by the skill, including TypeScript compiler invocations.
-
