Back to skill

Security audit

metacli

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Meta ads and Instagram work, but merits Review because it installs an unpinned third-party CLI that handles Meta secrets and account-changing actions.

Install only if you trust the metacli upstream and are comfortable with an unpinned executable handling Meta app secrets, OAuth tokens, ad account changes, and Instagram publishing. Prefer a pinned, reviewed commit or version, use least-privilege Meta scopes, keep campaigns paused until reviewed, and confirm any public posts or spend-affecting changes before running them.

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:5
Finding
Unpinned Third-Party CLI Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 5 and 14 **Vulnerability Type**: Supply-chain risk caused by a mutable dependency reference **Risk Level**: Medium ### Vulnerable Code ```text metadata: {"clawdbot":{"emoji":"📣","requires":{"bins":["meta"]},"install":[{"id":"go","kind":"go","module":"github.com/bilalbayram/metacli/cmd/meta@latest","bins":["meta"],"label":"Install meta (go)"}]}} ``` ```bash go install github.com/bilalbayram/metacli/cmd/meta@latest ``` ### Technical Analysis The Skill directs users or agents to download, compile, and install an executable from a third-party GitHub repository using the mutable `@latest` version. The project does not pin the dependency to a reviewed version or immutable commit, vendor its source, specify an expected binary checksum, or otherwise establish the provenance of the executable installed in the future. This does not prove that the current upstream package is malicious. However, it creates an unsafe supply-chain boundary because the effective executable can change after this Skill has been reviewed. A malicious release, compromised maintainer account, or compromised upstream repository could therefore introduce arbitrary behavior without requiring any modification to the audited `SKILL.md`. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or its release process. 2. The attacker publishes a modified version that resolves through `@latest`. 3. A user or agent follows the Skill and runs the documented `go install` command. 4. Go retrieves and compiles the attacker-controlled source and installs it as the local `meta` executable. 5. The user invokes the executable for authentication or Meta account operations. 6. The compromised executable can run with the user's local privileges and access credentials or API data supplied to it. ### Impact Assessment Successful exploitation permits arbitrary code executio ...[truncated 653 chars]
Remediation
## Remediation Suggestions 1. Replace `@latest` with a reviewed, explicitly pinned semantic version or, preferably, an immutable commit identifier. 2. Record and verify expected source or binary checksums before installation. 3. Verify upstream release provenance, including signed tags or artifacts where available. 4. Vendor the reviewed source or distribute a reproducibly built binary from a trusted internal artifact repository. 5. Establish a controlled dependency-update process in which new versions are reviewed and tested before changing the pin. 6. Run the CLI with least privilege and isolate its configuration and credentials from unrelated user files. 7. Grant only the minimum Meta OAuth scopes required for the intended operation and rotate credentials if an installed version is later found to be compromised.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Credential Access

High
Category
Privilege Escalation
Content
- Never invent IDs, profile names, paths, redirect URIs, or payload fields.
- Require explicit confirmation before budget-changing mutations.
- Prefer machine-readable output (`--output json` or `--format jsonl`) for automation.
- Redact secrets (`APP_SECRET`, access tokens) when echoing commands/results.
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Session Persistence

Medium
Category
Rogue Agent
Content
- Schema sync (recommended before writes): `meta schema sync --schema-dir ~/.meta/schema-packs`
- Accounts list: `meta --profile <PROFILE> insights accounts list --active-only --output table`
- Graph read: `meta --profile <PROFILE> api get act_<AD_ACCOUNT_ID>/campaigns --fields id,name,status --limit 100 --follow-next`
- Campaign dry-run: `meta --profile <PROFILE> campaign create --account-id <AD_ACCOUNT_ID> --params "name=<NAME>,objective=OUTCOME_SALES,status=PAUSED" --schema-dir ~/.meta/schema-packs --dry-run`
- Campaign create: `meta --profile <PROFILE> campaign create --account-id <AD_ACCOUNT_ID> --params "name=<NAME>,objective=OUTCOME_SALES,status=PAUSED" --schema-dir ~/.meta/schema-packs`
- Campaign budget update: `meta --profile <PROFILE> campaign update --campaign-id <CAMPAIGN_ID> --params "daily_budget=<AMOUNT_IN_MINOR_UNITS>" --confirm-budget-change`
- Insights run: `meta --profile <PROFILE> insights run --account-id <AD_ACCOUNT_ID> --date-preset last_7d --level campaign --metric-pack quality --format jsonl`
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Static analysis

No suspicious patterns detected.