T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Mutable npm Package Is Downloaded and Executed Without Version or Integrity Pinning
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Mayar payment skill is coherent, but it needs Review because it runs an unpinned npm package while handling payment credentials and suggests an API-key command pattern that can expose secrets.
Install only if you are comfortable giving this CLI access to your Mayar merchant account. Prefer a pinned, reviewed CLI version instead of `mayar@latest`, use least-privilege or revocable API keys, avoid passing keys on the command line, and require explicit user confirmation before creating, closing, reopening, or registering payment-related resources.
SKILL.md:21Mutable npm Package Is Downloaded and Executed Without Version or Integrity Pinning
SKILL.md:81Mayar API Key Can Be Exposed Through Command-Line Arguments
The skill installs and invokes the package via npx -y mayar@latest, which always resolves to the newest published version instead of a reviewed, immutable release. This creates a supply-chain execution risk: if the npm package is compromised or a malicious version is published, agents will automatically fetch and run attacker-controlled code.
The invoke_prefix uses npx -y mayar@latest, causing every invocation to execute an unpinned remote package version. In an agent context, this is especially risky because routine tool use repeatedly reintroduces the chance of running a newly compromised release.
The documentation describes operations over invoices, customers, payments, transactions, webhooks, balance, and identity but does not clearly warn that these commands transmit sensitive financial, account, and customer data to an external API service. In agent settings, users may not realize that prompts or local files passed into commands can leave the local environment and be processed by a third party.
The quick-start example instructs agents to run npx -y mayar@latest whoami, which executes whatever version is current on npm at runtime. This exposes users and agents to silent remote code changes and supply-chain compromise without any local review barrier.
The authentication flow tells agents to run npx -y mayar@latest whoami --json, again fetching and executing an unpinned package. Because this command is the first step before handling secrets, a compromised package could harvest API keys or manipulate trust decisions.
The documentation explicitly recommends passing the API key via --api-key <their_key> without warning that command-line arguments may be exposed through shell history, process listings, terminal logs, or agent telemetry. Because this is a live bearer credential for a payment platform, disclosure could allow unauthorized access to merchant financial and customer data and potentially state-changing API actions.
The environment-variable example still relies on npx -y mayar@latest, leaving execution dependent on an unreviewed current npm release. Since this flow is used after a user sets a valid API key, compromise could directly expose payment-platform credentials.
The one-time flag example invokes npx -y mayar@latest, which creates the same supply-chain exposure at the moment credentials are passed. An attacker controlling a new package version could intercept the API key and exfiltrate merchant data or alter transactions.
The interactive setup example uses npx -y mayar@latest init, which executes mutable remote code in a workflow likely to collect and store credentials. That makes initial account onboarding a particularly sensitive point for supply-chain compromise.
The generic usage pattern specifies npx -y mayar@latest <command>, normalizing unpinned remote execution throughout the skill. This broadens the attack surface because every documented operation inherits the same supply-chain risk.
The whoami account example uses @latest, which still allows execution of arbitrary newly published code. While the command is read-oriented, it validates credentials and exposes identity/account metadata, making compromise meaningful.
The balance command example uses npx -y mayar@latest, exposing financial account information through an unpinned package. A malicious upstream release could capture balances or manipulate displayed data to mislead operators.
The invoice list example relies on @latest, inheriting the same mutable code execution risk. Because invoices can contain customer and payment metadata, compromise could expose sensitive business information.
The invoice get example executes an unpinned npm package version, allowing future package changes to affect a data-retrieval workflow. This could result in exfiltration or falsification of invoice details consumed by downstream agents.
The invoice close example invokes mutable remote code for a state-changing financial action. If the package is compromised, attackers could abuse authenticated access to alter invoice state or perform unauthorized API operations.
The invoice reopen example uses @latest, making a state-changing financial operation dependent on an unreviewed current package release. This increases the risk of unauthorized invoice manipulation under the merchant's credentials.
The invoice creation example executes @latest in a path that can create new payment artifacts using authenticated access. A malicious package update could alter invoice payloads, exfiltrate customer data, or create fraudulent invoices.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.