Back to skill

Security audit

ai-payment-token

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its AICADE Galaxy purpose, but it handles API keys and generated artifacts in ways that can expose secrets if debug logs or untrusted artifacts are used.

Install only if you trust the AICADE Galaxy endpoint and will use artifacts generated by this package. Do not invoke artifacts from untrusted sources, keep .env private with restrictive permissions, avoid AICADE_GALAXY_DEBUG in shared terminals or CI, and assume tool arguments may be sent to the configured remote service.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/invoke_artifact.py:52
Finding

Artifact-Controlled Environment Variable Exfiltration and SSRF

Content
View full analysis
None: auth = tool.get("metadata", {}).get("authentication", {}) env_name = auth.get("envName") header_name = auth.get("headerName") required = auth.get("required", False) value = os.environ.get(env_name, "") if isinstance(env_name, str) else "" if required and not value: raise RuntimeError( f'Missing required environment variable: {env_name} for tool "{tool["name"]}".' ) if value and isinstance(header_name, str): headers[header_name] = value ``` ```python def join_base_url(base_url: str, path: str) -> str: normalized_base = base_url.rstrip("/") normalized_path = path if path.startswith("/") else f"/{path}" return f"{normalized_base}{normalized_path}" ``` Node.js implementation: ```javascript const url = new URL(joinBaseUrl(artifact.baseUrl, tool.metadata.path)); const headers = { Accept: "application/json", }; applyAuthHeader(tool, headers); let body; if (tool.metadata.method === "GET") { applyQueryPar ...[truncated 3359 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/export_artifact.py:101
Finding

API Key Disclosed in Exporter Debug Logs

Content
View full analysis
None: if not config.get("debug"): return print( f"[AICADE_GALAXY_DEBUG] {json.dumps(payload, ensure_ascii=False, indent=2)}" ) ``` Node.js implementation: ```javascript const headers = { Accept: "application/json", "X-API-Key": config.apiKey, }; logDebug(config, { event: "request", method: "GET", url, headers, }); ``` ```javascript function logDebug(config, payload) { if (!config.debug) { return; } console.log(`[AICADE_GALAXY_DEBUG] ${JSON.stringify(payload, null, 2)}`); } ``` ### Technical Analysis The complete request header object is passed to the debug logger. Because this object contains `X-API-Key`, setting `AICADE_GALAXY_DEBUG=true` prints the API key in plaintext. Debug output is frequently captured by terminal transcripts, CI/CD logs, agent execution records, monitoring platforms, and support bundles. Debug mode does not provide any warning that credentials will be disclosed, and neither implementation performs redaction. Authentication is necessary for service discovery, but logging the credential is not necessary for the declared functionality. ### Attack Path 1. Debug mode is enabled by setting `AICADE_GALAXY_DEBUG=true` in `.env`. 2. The exporter loads `AICADE_GALAXY_API_KEY`. 3. It constructs the authenticated request headers. 4. The full header obj ...[truncated 694 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/invoke_artifact.mjs:27
Finding

Sensitive Tool Arguments and Responses Exposed Through Console Logging

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup_env.py:38
Finding

Plaintext API Key File Created Without Restrictive Permissions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 225)May include surrounding context.

md
- `scripts/setup_env.mjs`: preferred interactive `.env` setup for Node hosts

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 226)May include surrounding context.

md
- `scripts/export_artifact.mjs`: preferred artifact export for Node hosts

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 237)May include surrounding context.

md
- `scripts/export_artifact.mjs`: preferred artifact export for Node hosts

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 227)May include surrounding context.

md
- `scripts/invoke_artifact.mjs`: preferred standalone artifact invoker for Node hosts

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 238)May include surrounding context.

md
- `scripts/invoke_artifact.mjs`: preferred standalone artifact invoker for Node hosts

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/export_artifact.mjs (reported line 51)May include surrounding context.

js
from typing import Dict


ENV_PATH = Path(".env")

DEFAULTS = {
    "AICADE_GALAXY_BASE_URL": "https://aicadegalaxy.com/agent",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/export_artifact.py (reported line 52)May include surrounding context.

python
from typing import Dict


ENV_PATH = Path(".env")

DEFAULTS = {
    "AICADE_GALAXY_BASE_URL": "https://aicadegalaxy.com/agent",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_env.mjs (reported line 7)May include surrounding context.

js
from typing import Dict


ENV_PATH = Path(".env")

DEFAULTS = {
    "AICADE_GALAXY_BASE_URL": "https://aicadegalaxy.com/agent",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_env.py (reported line 7)May include surrounding context.

python
from typing import Dict


ENV_PATH = Path(".env")

DEFAULTS = {
    "AICADE_GALAXY_BASE_URL": "https://aicadegalaxy.com/agent",

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill directs the agent to read and write local files, access environment variables, and make authenticated network requests, but it does not declare any explicit tool scope or permission boundary. That creates an authorization gap where a host system or reviewer cannot clearly constrain what the skill is allowed to access, increasing the risk of unintended secret exposure, filesystem modification, or outbound requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes broad phrases like 'ai payments', 'blockchain token', and 'make money with ai' that can match many unrelated requests. Overbroad activation can cause this skill to run in contexts where its file, env, and network behaviors are unnecessary, leading to accidental credential handling or external requests outside the user's intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs use of AICADE_GALAXY_API_KEY and X-API-Key for authenticated requests but does not include safeguards against exposing, logging, or echoing the credential. In a skill that reads .env files and performs network calls, omission of secret-handling guidance materially increases the chance of accidental API key disclosure.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 237)May include surrounding context.

md
- Prefer using the configured `.env` values rather than hardcoding endpoints or keys
- Prefer `node scripts/*.mjs` first, then fall back to `python3 scripts/*.py`
- If neither `node` nor `python3` is available, tell the user to install Node.js
- Do not ask the user to manually craft the artifact if `node scripts/export_artifact.mjs` or `python3 scripts/export_artifact.py` can generate it
- Do not ask the AI to construct raw HTTP requests when `scripts/invoke_artifact.mjs` or `scripts/invoke_artifact.py` can invoke the tool from artifact metadata
- Always pass tool arguments through `--args-file` as a JSON object
- If export fails with `401` or `403`, check `AICADE_GALAXY_API_KEY` first

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

When debug mode is enabled, the script logs the full request headers object, which includes the X-API-Key value. That exposes a live credential to stdout, CI logs, shell history capture tooling, or centralized log collectors, allowing anyone with log access to reuse the API key against the Galaxy admin endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

When debug mode is enabled, the script logs the full request headers, including the X-API-Key value. This can expose a live credential in console output, CI logs, terminal scrollback, or centralized log systems, enabling unauthorized access to the Galaxy admin services endpoint if the logs are later viewed or exfiltrated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

When debug mode is enabled, the script logs the full invocation payload and later the full result object. Those structures can contain secrets, personal data, request parameters, or downstream service responses, creating a confidentiality risk through console history, CI logs, or shared terminals.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script transmits tool arguments to a remote endpoint using the artifact base URL and tool path, which may include user or system data. Although the console prints that a tool is being invoked, it does not clearly warn that request contents are being sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code reads a credential from an environment variable and attaches it as an HTTP header for authentication. This is a sensitive operation, and the file does not provide a user-facing warning or explanatory comment that credentials from the environment will be used in outbound requests.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

When AICADE_GALAXY_DEBUG=true, the script logs the full invocation payload before the request and the full result/raw response after the request. Those structures may contain secrets, personal data, business data, or API outputs from monetized services, and printing them to stdout can expose them to terminal history, CI logs, orchestrator logs, or other downstream log collectors.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The debug mode emits complete request arguments and complete response content for network calls with no sanitization. In this skill context, the tool is intended to invoke external Galaxy services and may handle payment, token, or revenue-related data, which makes inadvertent disclosure through logs more dangerous than ordinary debugging.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The function reads a credential from an environment variable and injects it into an HTTP header for the outbound request. There is no nearby comment, docstring, or other visible disclosure explaining that the skill accesses environment-based secrets and transmits them to a remote service.

Content

No source excerpt is available for this finding.