Back to skill

Security audit

cargo-project

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated purpose, but it should be reviewed because it uses mutable unpinned package installs while guiding workspace-changing deployments with credentials.

Install only if you trust the getcargo npm package and skill sources at the time you run them. Prefer pinning reviewed CLI and skills versions, review project plans before deploy/destroy/prune, avoid unpinned npx in CI, and expose Cargo and connector secrets only to the minimum deployment step with scoped tokens.

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:13
Finding
Mutable External Dependencies and Skill Content Are Retrieved Without Version Pinning## Vulnerability Details **File Locations**: - `SKILL.md:13-16` - `SKILL.md:46-48` - `SKILL.md:196-199` - `recipes/deploy-from-ci.md:19-27` - `recipes/deploy-from-ci.md:52-60` - `references/cookbooks.md:15-19` **Vulnerability Type**: Unpinned executable dependencies and remotely retrieved Skill content **Risk Level**: Medium ### Vulnerable Code `SKILL.md:13-16`: ```yaml install: - kind: node package: "@cargo-ai/cli@latest" bins: - cargo-ai ``` `SKILL.md:46-48`: ```bash npm install -g @cargo-ai/cli # no global install? prefix every command with `npx @cargo-ai/cli` cargo-ai login --email you@company.com # emailed code, no browser; creates the account on first use # alternatives: --oauth (browser) · --token <api-token> (CI) ``` `SKILL.md:196-199`: ```text npx skills add getcargohq/gtm-skills/<slug> ``` ```text npx skills use getcargohq/gtm-skills@<slug> ``` `recipes/deploy-from-ci.md:19-27`: ```bash # 1. Install the CLI (project already depends on @cargo-ai/cdk via package.json) npm install -g @cargo-ai/cli@latest npm ci # 2. Authenticate non-interactively with the token (selects the token's workspace) cargo-ai login --token "$CARGO_API_TOKEN" # 3. Deploy — --yes is REQUIRED (no TTY to confirm at); --json for machine-readable output cargo-ai project deploy --yes --json ``` `recipes/deploy-from-ci.md:52-60`: ```yaml # .github/workflows/deploy.yml - run: npm install -g @cargo-ai/cli@latest && npm ci - run: cargo-ai login --token "$CARGO_API_TOKEN" env: CARGO_API_TOKEN: ${{ secrets.CARGO_API_TOKEN }} - run: cargo-ai project deploy --yes --json env: HUBSPOT_API_KEY: ${{ secrets.HUBSPOT_API_KEY }} ``` `references/cookbooks.md:15-19`: ```sh cargo-ai project add cookbook/<slug> # inside a CDK project: this is the copy step c ...[truncated 3423 chars]
Remediation
## Remediation Suggestions 1. Replace `@cargo-ai/cli@latest` with an explicitly reviewed version, for example: ```yaml package: "@cargo-ai/cli@1.0.96" ``` Apply the same exact version in local and CI installation instructions. 2. Avoid unversioned `npx` execution. Pin the package that provides the `skills` command to an exact version and invoke it without allowing automatic substitution by a newer release. 3. Pin externally retrieved Skill content to an immutable Git commit or signed release tag. Record the expected revision in project configuration so future changes require explicit review. 4. Verify package integrity using a committed lockfile and registry integrity metadata. Prefer project-local dependencies installed with `npm ci` over global mutable installations. 5. Install and validate dependencies in an isolated step before exposing deployment credentials. Only make `CARGO_API_TOKEN`, connector keys, and other secrets available to the minimum command that requires each credential. 6. Use short-lived, workspace-scoped CI tokens with narrowly limited permissions. Separate planning and deployment jobs, and prevent pull-request workflows from receiving production secrets. 7. Review downloaded Skill procedures before copying them into `.claude/skills/` or `.agents/skills/`. Do not automatically load newly downloaded instructions in a privileged Agent session. 8. Use trusted registry configuration, package provenance/signature verification where available, protected release tags, and dependency monitoring to detect unexpected publisher or artifact changes.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

Ae1

High
Category
analysis-evasion
Content
- **Level 1** — `SKILL.md` (this file): the decision model, lifecycle, critical
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- **Level 1** — `SKILL.md` (this file): the decision model, lifecycle, critical
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Self-Modification

High
Category
Rogue Agent
Content
| Command | What it does |
|---|---|
| `cargo-ai project init <directory>` | Scaffold a GTM repo from `getcargohq/cargo-manifest`, with the CDK project in `infra/`. `--name <name>`, `--cookbook <slug>` (install a cookbook into the new project), `--force` (write into a non-empty directory). There is no template flag: the scaffold never varies, and what varies is the cookbook layered on top. |
| `cargo-ai project add cookbook/<slug>` | Copy a worked example into this project — resources under `infra/<slug>/`, any helper scripts under `scripts/<slug>/`, and its procedure (`SKILL.md`, `references/`, `evals/`) under **both** `.claude/skills/<slug>/` and `.agents/skills/<slug>/`. Runs `check` afterwards so a duplicate slug surfaces immediately; never deploys, and never touches your `package.json`/`tsconfig.json`. `--overwrite` (replace existing files; default skips them), `--yes`. Omit the address to choose interactively. |
| `cargo-ai project add connector/<integration>` | Authorize a connector in the browser and write its `defineConnector`. `--connector-uuid <uuid>` adopts one already created there. |
| `cargo-ai project cookbook list\|search\|view` | Browse the cookbooks `add` installs — `view <slug>` shows what one deploys, what it will ask you for, and its declared adaptations. |
| `cargo-ai project types` | Generate per-workspace types into `.cargo-ai/` for typed config. |
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill instructs users to run `npx @cargo-ai/cli` without pinning a version, which causes execution of whatever package version is current at invocation time. This creates a supply-chain risk: a compromised latest release, typosquatted dependency resolution path, or breaking upstream change could execute unreviewed code on the operator's machine or in CI.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The instruction `npx skills add ...` executes an unpinned package from the registry at runtime, which is a classic supply-chain exposure. Because this command is used to fetch additional skill content mid-task, it expands trust to external code and content that may change over time, making review and provenance harder.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The command `npx skills use ...` likewise runs an unpinned package version, allowing arbitrary upstream package changes to affect execution. In this skill's context, the command is presented as a lightweight way to read remote skill content, which may encourage operators to execute it without the scrutiny they'd apply to installation steps.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This markdown file documents `cargo-ai project destroy` commands, including `--all`, but the surrounding text only says 'Tear down' and does not explicitly warn that these commands delete live infrastructure/resources. Because markdown files should disclose behaviors that could affect user data or system integrity, the omission is a meaningful missing warning.

Missing User Warnings

Medium
Confidence
82% confidence
Finding
The section explains that `deploy --prune` will delete resources removed from code, but it presents this as normal behavior without an explicit caution callout about destructive effects on live resources. For markdown skill documentation, deleting infrastructure or data-affecting resources should be accompanied by a clear warning so users understand the risk before use.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The markdown instructs users to run `cargo-ai project destroy --all`, which is a destructive operation affecting deployed resources. Unlike the deploy step, this section does not include a user-facing warning or confirmation note about the impact of deletion.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The documentation instructs users to run `npx skills add getcargohq/gtm-skills/<slug>` without pinning an exact package version. Unpinned `npx` execution can fetch and run whatever version is current at install time, creating a supply-chain risk if the package changes unexpectedly or is compromised.

Skill Enumeration

Medium
Category
Agent Snooping
Content
After either `project` command the files are in `infra/<slug>/`, helper scripts (if the
cookbook ships any) in `scripts/<slug>/`, and the procedure in both `.claude/skills/<slug>/`
and `.agents/skills/<slug>/` — written twice because Claude Code discovers project skills
only under `.claude/skills/`, while Cursor, Codex and Gemini read `.agents/skills/`. They are
copies, not symlinks, so **if you edit a cookbook's procedure, edit both.** The `infra/` and
`scripts/` halves are written once: resources are loaded by path, and a second copy would
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The example includes a destructive `cargo-ai project destroy --all` command without an adjacent warning that it deletes deployed workspace resources. In a skill focused on managing whole workspaces from code, readers may copy commands directly, so omission of a caution increases the chance of accidental destructive action in staging or production environments.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The documentation states that `defineDomain(..., { dnsRecords? })` "replaces the whole zone" but does not provide an immediate, explicit warning about the operational risk. In an infrastructure-as-code skill, users may copy examples or apply changes from CI/PR review workflows, so an incomplete record set could unintentionally delete MX, SPF, DKIM, verification, or service records and cause email outage, domain misrouting, or service disruption.

Missing User Warnings

Low
Confidence
80% confidence
Finding
This markdown file instructs users to set `HUBSPOT_API_KEY` in their environment, which involves handling credentials. While it explains the technical requirement, it does not include a warning about protecting secrets from shell history, logs, or accidental commits.

Missing User Warnings

Low
Confidence
83% confidence
Finding
At L11 the document says the agent 'adapts it in place, plans, deploys on a yes,' which implies code modification and deployment activity. While deployment requires approval, this section does not clearly warn that adding a cookbook writes files into the project and may alter existing project state, which is safety-relevant behavior for a skill description.

Static analysis

Detected: suspicious.prompt_injection_instructions

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
guides/authoring-resources.md:123

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
recipes/build-an-agent.md:65

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
references/examples/full-workspace.md:70