Back to skill

Security audit

Komodo

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says for Komodo infrastructure management, but it needs Review because it handles powerful API credentials without enforcing HTTPS and may print secret configuration values.

Install only if you are comfortable giving this skill Komodo infrastructure-management authority. Use a narrowly scoped Komodo API key, set KOMODO_URL to an HTTPS endpoint you control, avoid passing secrets in JSON arguments unless output is protected, and review any deploy, run, update, or destroy command before execution.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
openclaw.ts:3
Finding
Komodo API Credentials Can Be Transmitted over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `openclaw.ts:3-13`; credential transmission is implemented in the bundled client at `scripts/run.js:732-750` and duplicated in all generated `scripts/*.js` entry points. **Vulnerability Type**: Missing transport security enforcement for sensitive credentials **Risk Level**: High ### Vulnerable Code ```typescript const url = process.env.KOMODO_URL; const key = process.env.KOMODO_API_KEY; const secret = process.env.KOMODO_API_SECRET; if (!url) throw new Error("Missing env: KOMODO_URL"); if (!key) throw new Error("Missing env: KOMODO_API_KEY"); if (!secret) throw new Error("Missing env: KOMODO_API_SECRET"); export const komodo = KomodoClient(url, { type: "api-key", params: { key, secret }, }); ``` The bundled client transmits these values as HTTP headers: ```javascript function KomodoClient(url, options) { const state = { jwt: options.type === "jwt" ? options.params.jwt : undefined, key: options.type === "api-key" ? options.params.key : undefined, secret: options.type === "api-key" ? options.params.secret : undefined }; const request = (path, type, params) => new Promise(async (res, rej) => { try { let response = await fetch(`${url}${path}/${type}`, { method: "POST", body: JSON.stringify(params), headers: { ...state.jwt ? { authorization: state.jwt } : state.key && state.secret ? { "x-api-key": state.key, "x-api-secret": state.secret } : {}, "content-type": "application/json" } }); ``` ### Technical Analysis `KOMODO_URL` is accepted directly from the environment without parsing its scheme or requiring HTTPS. Although the documentation gives HTTPS examples, the implementation also accepts an address beginning with `http://`. Every API request includes the API key and secret in request headers. If the configured endpoint uses HTTP, both credentials and infrastr ...[truncated 1736 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse `KOMODO_URL` with the standard `URL` class before initializing the client. 2. Require the `https:` protocol by default and terminate execution for `http:` or other schemes. 3. If plaintext HTTP is necessary for isolated local development, require an explicit development-only override such as `KOMODO_ALLOW_INSECURE_HTTP=true` and print a prominent warning. 4. Reject URLs containing embedded usernames or passwords. 5. Consider restricting the configured hostname or origin in managed deployments so configuration manipulation cannot redirect credentials to an attacker-controlled server. 6. Use a narrowly scoped Komodo API identity for this Skill, granting only the read, write, or execute permissions required for intended operations. 7. Rotate the API credentials if they may previously have been used over HTTP. Example validation: ```typescript const endpoint = new URL(url); if (endpoint.protocol !== "https:") { const allowInsecure = process.env.KOMODO_ALLOW_INSECURE_HTTP === "true" && (endpoint.hostname === "localhost" || endpoint.hostname === "127.0.0.1"); if (!allowInsecure) { throw new Error("KOMODO_URL must use HTTPS"); } } if (endpoint.username || endpoint.password) { throw new Error("KOMODO_URL must not contain embedded credentials"); } ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/create.ts:33
Finding
Resource Configurations Are Printed without Secret Redaction<![CDATA[ ## Vulnerability Details **File Location**: `src/create.ts:33-46` and `src/update.ts:32-36,72-74`; corresponding behavior is present in generated `scripts/create.js` and `scripts/update.js`. **Vulnerability Type**: Sensitive information exposure through console output **Risk Level**: Medium ### Vulnerable Code `src/create.ts`: ```typescript let config: Record<string, unknown> | undefined; if (jsonConfig) { try { config = JSON.parse(jsonConfig); } catch { console.error("Invalid JSON config:", jsonConfig); process.exit(1); } } const resourceType = type as ResourceType; console.log(`Creating ${type} "${name}"...`); if (config) console.log("Config:", JSON.stringify(config, null, 2)); ``` `src/update.ts`: ```typescript let config: Record<string, unknown>; try { config = JSON.parse(jsonPatch); } catch { console.error("Invalid JSON patch:", jsonPatch); process.exit(1); } ``` ```typescript const id = await resolveId(); console.log(`Updating ${type} "${name}" (${id})...`); console.log("Patch:", JSON.stringify(config, null, 2)); ``` The invalid-JSON error paths also print the complete unparsed argument: ```typescript console.error("Invalid JSON config:", jsonConfig); console.error("Invalid JSON patch:", jsonPatch); ``` ### Technical Analysis Both resource-management commands accept arbitrary JSON configuration and print the entire value without inspecting or redacting sensitive fields. Komodo resource configurations may include environment variables, access tokens, registry credentials, passwords, private repository credentials, or other deployment secrets. Console output may be retained by CI systems, Agent transcripts, shell redirection, centralized log collectors, terminal recording, or automation platforms. Therefore, values intended only for Komodo Core can be disclosed to additional parties and systems. The issue applies both to valid JSON and to malformed input because parsing errors echo the original argument. ### ...[truncated 1150 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not print complete resource configurations by default. 2. Replace configuration output with a summary of changed top-level field names. 3. Recursively redact fields whose names indicate sensitive content, including `secret`, `password`, `token`, `authorization`, `credential`, `private_key`, `api_key`, and similar variants. 4. Treat environment-variable maps as sensitive by default rather than relying exclusively on key-name matching. 5. Do not echo malformed JSON arguments in parsing-error messages. 6. If complete diagnostic output is required, place it behind an explicit opt-in debug flag and warn that the output may contain secrets. 7. Configure CI and Agent environments to restrict access to command output and avoid long-term retention of sensitive logs. 8. Rotate any credentials that may already have been captured in execution logs. A safer default would be: ```typescript console.log(`Creating ${type} "${name}"...`); if (config) { console.log("Config fields:", Object.keys(config).join(", ")); } ``` For parsing failures: ```typescript catch { console.error("Invalid JSON config."); process.exit(1); } ``` The same changes should be applied to `src/update.ts`, followed by rebuilding all generated JavaScript entry points. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (49)

Credential Access

High
Category
Privilege Escalation
Content
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
.env.development.local
.env.test.local
.env.production.local
.env.local

# caches
.eslintcache
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Ae1

High
Category
analysis-evasion
Content
node scripts/list.js <type>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/create.js <type> <name> [json-config]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/update.js <type> <name> '<json>'
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.js <type> <name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.js <type> <name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.js <type> <name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.js <type> <name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/deploy-stack.js <stack-name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/stack-ctrl.js <action> <stack-name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/deployment-ctrl.js <action> <deployment-name>
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/get-logs.js stack <stack-name> [tail]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/create.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/deploy-stack.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/deployment-ctrl.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/get-logs.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/index.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/list.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/run.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/stack-ctrl.js:905

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/update.js:905