Back to skill

Security audit

codex-supergraph

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a Codex GraphQL analytics helper, but it also documents higher-impact API-token and webhook mutations that deserve review before installation.

Install only if you intend to use Codex's GraphQL API and trust this publisher with workflows that may use your CODEX_API_KEY. Before allowing an agent to create or delete API tokens or webhooks, confirm the exact action, callback URL, data sent, and how to revoke it. Treat wallet, trader, webhook secret, and API-token outputs as sensitive, and pin/review the optional SDK before installing it.

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
references/tooling-and-mcp.md:61
Finding
Unpinned Third-Party SDK Installation## Vulnerability Details **File Location**: `references/tooling-and-mcp.md:61` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash pnpm add @codex-data/sdk ``` ### Technical Analysis The installation command does not specify an exact reviewed version or integrity constraint. Consequently, package resolution depends on the package registry's current state at installation time rather than the version available when this Skill was audited. A later malicious or compromised release of `@codex-data/sdk`, or one of its transitive dependencies, could introduce arbitrary code. Package-manager lifecycle scripts may execute during installation, while malicious runtime code could execute when the documented SDK is imported and used. The package name is scoped, which reduces dependency-confusion exposure, but it does not eliminate risks from compromised publisher credentials, registry compromise, malicious updates, or compromised transitive dependencies. ### Attack Path 1. An attacker compromises the package publisher, registry entry, or a transitive dependency. 2. The attacker publishes a malicious version that satisfies the unconstrained installation command. 3. A user follows the Skill's SDK setup instructions. 4. `pnpm` resolves and downloads the attacker-controlled release. 5. Malicious code executes through an installation lifecycle script or later when the SDK is imported. 6. The code operates with the privileges and environment access of the user or service performing the installation. ### Impact Assessment Successful exploitation could allow arbitrary code execution with the installing user's privileges. Depending on the execution environment, this may expose source code, environment variables such as `CODEX_API_KEY`, local credentials, accessible files, and network resources. It could also modify project files or application behavior. The Skill does not itself install the package automatically, and ...[truncated 148 chars]
Remediation
## Remediation Suggestions - Pin the SDK to an exact version that has been reviewed: ```bash pnpm add --save-exact @codex-data/sdk@<reviewed-version> ``` - Commit and enforce a lockfile so installations resolve to reviewed dependency versions. - Use `--ignore-scripts` where package lifecycle scripts are unnecessary: ```bash pnpm add --save-exact --ignore-scripts @codex-data/sdk@<reviewed-version> ``` - Configure a trusted registry and apply package-manager integrity verification. - Review the SDK's published provenance, lifecycle scripts, and transitive dependencies before recommending a version. - Use automated dependency monitoring, but require review and testing before accepting upgrades. - Run dependency installation and application workloads with minimal filesystem, credential, and network privileges. - Do not expose `CODEX_API_KEY` or unrelated credentials to package installation processes unless strictly necessary.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (14)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger list is very broad and includes generic analytics phrases such as token price, holders, charts, and trending tokens, which can match many unrelated user requests. In an agent-routing context, this can cause over-selection of the skill, sending prompts or follow-on requests to an external data workflow when the user did not explicitly ask for Codex, increasing the chance of unnecessary external access or incorrect tool use.

External Transmission

Medium
Category
Data Exfiltration
Content
Run once and cache:

```bash
curl -sS https://graph.codex.io/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: $CODEX_API_KEY" \
  --data-binary '{"query":"query GetNetworks { getNetworks { id name } }"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The playbook broadens the skill from read-oriented analytics into authenticated mutations for API token creation/revocation and webhook administration. That scope expansion increases the chance an agent will perform state-changing or credential-management actions a user did not expect, which can lead to unauthorized resource creation, secret misuse, or persistent outbound integrations.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
Including API token creation, listing, and revocation in an analytics skill introduces credential-management behavior unrelated to the stated user purpose. If an agent is allowed to handle these operations, it may expose, mint, or delete credentials inappropriately, turning a read/query workflow into a privileged account-management path.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
Documenting webhook creation/deletion/listing gives the skill the ability to configure persistent outbound data flows, which exceeds a query-only analytics role. An agent could create callbacks to attacker-controlled endpoints or modify existing hooks, causing data exfiltration, unexpected external requests, or durable side effects after the session ends.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The webhook section describes HTTP POST delivery to arbitrary callback URLs without emphasizing that data will be transmitted to an external destination or explaining the privacy and security implications. In an agent setting, this omission can cause users to unknowingly authorize outbound transfer of trading, market, or account-related data to third-party infrastructure.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This documentation provides direct query patterns for trader profiling, open positions, performance history, and trade history tied to persistent identifiers such as wallet addresses, aliases, linked addresses, and profile URLs, but does not warn about privacy, deanonymization, or safe handling of personal/sensitive financial data. In an analytics skill, this materially lowers friction for surveillance, targeting, and large-scale behavioral profiling of identifiable traders, especially when combined with other on-chain or off-chain data sources.

External Transmission

Medium
Category
Data Exfiltration
Content
## 1) Simple query

```bash
curl -sS https://graph.codex.io/graphql \
  -H 'Content-Type: application/json' \
  -H "Authorization: $CODEX_API_KEY" \
  --data-binary @- <<'JSON'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is presented as an analytics/query helper, but the documentation also exposes credential-management mutations that create and delete API tokens. Expanding from read/query operations into token lifecycle management increases privilege and can enable unauthorized credential issuance or revocation if an agent follows these templates inappropriately.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill documentation includes webhook creation and deletion mutations that are outside the stated analytics/query scope. This broadens the capability from passive data retrieval to persistent outbound integrations, which can be abused to set up unauthorized callbacks, create long-lived side effects, or alter account configuration.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The documentation teaches creation of external callback webhooks, which lets the skill direct service-originated POST requests to arbitrary URLs. In the context of a query/analytics skill, this is an unjustified outbound capability that could be abused for data exfiltration, SSRF-like pivoting to internal endpoints, or persistence through server-side callbacks.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest describes a skill for answering token prices, charts, holders, prediction markets, and building GraphQL queries against graph.codex.io. This file instead provides setup instructions for a documentation MCP server at docs.codex.io and general SDK installation guidance, which is a materially different function from performing or helping with on-chain analytics queries.

Session Persistence

Medium
Category
Rogue Agent
Content
## VS Code

Create `.vscode/mcp.json`:

```json
{
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.

Missing User Warnings

Low
Confidence
81% confidence
Finding
This markdown file shows use of `Authorization: $CODEX_API_KEY` and later introduces webhook `securityToken` values, but it does not explicitly warn readers that these are sensitive credentials that must be protected and not committed or exposed. Because the file is instructional markdown covering authenticated network calls and secret-bearing webhook configuration, a brief warning about credential handling would improve user safety.

Static analysis

No suspicious patterns detected.