Back to skill

Security audit

EdgeOS Applications

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly purpose-aligned for EdgeOS applications and ticket purchases, but it stores login tokens locally and can initiate real crypto-payment authorization with insufficient safeguards.

Install only if you are comfortable with this skill contacting the EdgeOS production API, using your application/profile data, and helping authorize real ticket payments. Use it in a private workspace, clear scripts/.state after use, avoid shared machines, and require the agent to show the exact payment amount, recipient, network, and final consent before any wallet signature.

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/env.sh:5
Finding

JWT Bearer Tokens Stored Without Restrictive File Permissions

Content
View full analysis
/dev/null || true)" fi if [[ -n "$email" ]]; then local file file="$(jwt_state_file_for_email "$email")" if [[ -f "$file" ]]; then JWT="$(cat "$file" 2>/dev/null || true)" return 0 fi fi JWT="${JWT:-}" } save_jwt_to_state() { local token="${1:-}" local email="${2:-${SESSION_EMAIL:-}}" if [[ -z "$token" || -z "$email" ]]; then return 0 fi mkdir -p "$STATE_DIR" local file file="$(jwt_state_file_for_email "$email")" printf '%s' "$token" > "$file" printf '%s' "$email" > "$JWT_STATE_CURRENT_EMAIL_FILE" } ``` ### Technical Analysis The skill persistently writes JWT bearer tokens and the current user's email address into predictable files beneath `scripts/.state`. It does not set a restrictive `umask`, explicitly assign mode `0600` to token files, or enforce mode `0700` on the state directory. Consequently, effective permissions depend on the process environment and its existing umask. In a permissively configured or shared runtime, other local users or processes may be able to read these files. A JWT is a bearer credential: possession is generally sufficient to authenticate as the affected user until the token expires or is revoked. The persistent `current_email` selector also allows later invocations without an explicit `SESSION_EMAIL` to load the most recently used account. This creates a risk ...[truncated 1250 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth_login.sh:5
Finding

Email and OTP Exposed in Request URL and Process Arguments

Content
View full analysis
"}' exit 1 fi EMAIL_ENC="$(EMAIL="$EMAIL" python3 -c 'import urllib.parse,os; print(urllib.parse.quote(os.environ["EMAIL"], safe=""))' )" body=$(curl -sS -X POST "$BASE_URL/citizens/login?email=$EMAIL_ENC&code=$CODE") ``` ### Technical Analysis The login request places both the email address and one-time password in the URL query string. The OTP is also accepted as a positional shell argument. Although HTTPS protects the URL while it is transmitted over the network, query strings are commonly captured by reverse-proxy access logs, API gateways, tracing systems, monitoring products, error reports, and server request logs. In addition, the expanded URL and the positional OTP may be observable through local process inspection while the script and `curl` are running. An OTP is short-lived, which limits the exploitation window, but disclosure before redemption can allow an attacker to exchange it for a bearer token. Logging also creates unnecessary retention of authentication material beyond the intended OTP workflow. ### Attack Path 1. The victim runs `auth_login.sh `. 2. The OTP appears in the shell process arguments and is interpolated into curl's URL. 3. An attacker with local process visibility observes the command line, or an operator with access to proxy/API logs retrieves the query string. 4. Before the code expires or is consumed, the attacker submits the captured email and OTP to the login endpoint. 5. The endpoint returns an access token to the attacker. 6. The attacker uses the token to impersonate the victim through authenticated API calls. ### Impact Assessm ...[truncated 512 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/buy_ticket_submit.sh:64
Finding

Sensitive Temporary Files May Remain After Errors or Interruption

Content
View full analysis
"$HTTP_CODE" code=$(cat "$HTTP_CODE") body=$(cat "$RESP_FILE") payment_response=$(grep -i '^PAYMENT-RESPONSE:' "$HDR_FILE" | tail -n1 | sed -E 's/^PAYMENT-RESPONSE:[[:space:]]*//I' | tr -d '\r') rm -f "$HDR_FILE" "$RESP_FILE" "$HTTP_CODE" ``` The same cleanup pattern also appears in: - `scripts/buy_ticket_challenge.sh:32-48` - `scripts/check_application_status.sh:53-64` - `scripts/submit_application.sh:34-47` ### Technical Analysis The scripts create temporary files using `mktemp` and remove them only after curl and the subsequent parsing commands complete successfully. They use `set -euo pipefail`, so a curl failure, failed parsing command, process interruption, or termination signal can exit the script before the explicit `rm` statement executes. The temporary files may contain authenticated API response bodies, application metadata, x402 challenge details, or payment response headers. `mktemp` normally creates files with restrictive permissions, reducing exposure to unrelated local users, but stale sensitive data can remain available to processes running as the same account, privileged users, workspace collection systems, or forensic and backup tooling. ### Attack Path 1. The user invokes an affected script, causing temporary header, response, and status files to be created. 2. The remote service writes sensit ...[truncated 1107 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly instructs the agent to infer sensitive personal attributes such as gender from pronouns/context and residence-based status without explicit user opt-in. This creates privacy and profiling risk, can produce incorrect or discriminatory data, and may cause the system to submit sensitive attributes to an external service without the user knowingly providing them.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The crypto payment flow says to sign an EIP-3009 TransferWithAuthorization and 'tell user/agent exactly what will be signed,' but it does not require an explicit warning that this is a real blockchain authorization that can move funds and may be irreversible. In a purchasing skill, this omission is especially dangerous because users may mistake the step for a routine confirmation rather than a binding onchain payment approval.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill invokes shell scripts, uses environment-backed configuration, and performs authenticated network requests, but it declares no explicit tool/permission boundaries. That creates an overbroad execution surface where the runtime may grant more capability than users or reviewers expect, increasing the risk of command execution, secret exposure, or unintended outbound calls if the skill is triggered in the wrong context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description covers generic actions like authenticating, checking applications, retrieving attendees, browsing products, and buying tickets, which can match common user intents outside a narrowly defined workflow. That broad trigger surface can cause the wrong skill to activate and perform sensitive actions or data access in conversations that did not clearly intend to use this backend.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

The instruction to read workspace USER.md and use it as prefill context introduces a broad, weakly bounded source of personal data into the decision flow. If USER.md contains stale, cross-user, injected, or excessive data, the skill may over-collect, misattribute identity details, or submit private information to the API without sufficiently verifying relevance and provenance.

Content

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

md
- `{baseDir}/references/flow.md`
- `{baseDir}/references/api-contract.md` (API source of truth)

Before collecting fields, read workspace `USER.md` and use it as prefill context when values are relevant and trustworthy for the current user.

## Runtime configuration

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 31)May include surrounding context.

md
Values are defined once in:
- `{baseDir}/scripts/env.sh`

Do not ask users to configure runtime values in v1.
Use the values from `scripts/env.sh` consistently for auth and API calls.

## Script-first rule

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This contract instructs the agent to handle OTP-based authentication, JWT acquisition, and payment authorization for real USDC transactions without an explicit requirement to obtain clear user consent at each sensitive step or warn about credential/payment sensitivity. In a skill that can authenticate a user and trigger blockchain-backed payments, omission of user-facing confirmation and safe-handling guidance increases the risk of unintended purchases, social engineering, or unsafe secret handling by downstream implementations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The flow explicitly persists the authenticated email in session state for later calls, but provides no user notice, consent, retention boundary, or guidance on how that identity data is protected or cleared. In an agent skill that handles authentication and purchases, silent persistence of identity context can lead to unintended account linkage, privacy leakage across sessions, or actions being taken under the wrong user identity if session handling is weak.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documented flow explicitly persists JWT access tokens under local script state and auto-loads them for a session email when no JWT is provided. Persisting bearer tokens and silently reusing them increases the risk of credential theft, cross-user mixups on shared systems, and unintended authenticated actions if the local state directory is exposed or reused without clear user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script sends the user's email and OTP code in an HTTP request, which is a safety-relevant network operation involving sensitive authentication data. While the script prints usage and success/error messages, it does not disclose that credentials will be transmitted, and there is no inline comment or other warning in this file.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/auth_request_otp.sh (reported line 12)May include surrounding context.

sh
exit 1
fi

body=$(curl -sS -X POST "$BASE_URL/citizens/authenticate" \
  -H "Content-Type: application/json" \
  -d "{\"email\":\"$EMAIL\",\"use_code\":true}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script performs a network POST request transmitting the provided email address to the authentication service. There is no confirmation prompt, user-facing notice, or explanatory comment/docstring in this file disclosing that user data will be sent over the network.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/buy_ticket_challenge.sh (reported line 36)May include surrounding context.

sh
RESP_FILE=$(mktemp)
HTTP_CODE=$(mktemp)

curl -sS -X POST "$BASE_URL/agent/buy-ticket" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JWT" \
  --data-binary "@$PAYLOAD_FILE" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The script sends a bearer JWT in an HTTP Authorization header to the /agent/buy-ticket endpoint. Although the comments mention that a JWT is required, there is no confirmation prompt, user-facing log, or warning explaining that credentials and request data will be transmitted over the network.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/buy_ticket_submit.sh (reported line 68)May include surrounding context.

sh
RESP_FILE=$(mktemp)
HTTP_CODE=$(mktemp)

curl_cmd=(curl -sS -X POST "$BASE_URL/agent/buy-ticket"
  -H "Content-Type: application/json"
  -H "Authorization: Bearer $JWT"
  -H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE_B64"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script sources environment state and loads a JWT, then uses it for authenticated API calls, but it does not include any visible warning, prompt, or explanatory comment about accessing sensitive credentials. This matches the code-file criterion for sensitive environment variable or credential access lacking disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script sends citizen_id and popup_city_id to a remote endpoint and includes the JWT in the Authorization header, but there is no confirmation prompt, visible logging, or explanatory comment disclosing that user/system data is being transmitted. For code files, network calls that transmit data should have some form of user disclosure unless clearly documented as expected behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This script persists JWTs and the associated email identifier to disk in a local state directory without any protection controls such as restrictive file permissions, encryption, or lifecycle management. If the host is shared, backed up, or otherwise accessible to other local users or processes, the token can be recovered and reused to impersonate the user against the EdgeOS/OpenClaw APIs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/payment_create.sh (reported line 56)May include surrounding context.

sh
)
fi

body=$(curl -sS -L -X POST "$BASE_URL/payments" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JWT" \
  -d "$PAYLOAD")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script reads JWT from the environment or state and later uses it for authenticated API access. The current comments only say that JWT is required, but they do not warn users that a credential will be loaded and transmitted for the request.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/payment_preview.sh (reported line 56)May include surrounding context.

sh
)
fi

body=$(curl -sS -X POST "$BASE_URL/payments/preview" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JWT" \
  -d "$PAYLOAD")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script performs a network POST to the payments preview endpoint and includes an Authorization bearer token plus application, product, and attendee data in the request body. While the header comments list required arguments, they do not warn the user that the script will send potentially sensitive identifiers and credentials to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script sends an authenticated network request with a JWT in the Authorization header, which is a safety-relevant operation involving credentials and remote data access. Aside from terse internal comments about required environment variables, there is no confirmation prompt, user-facing log message, or explanatory disclosure that the script will contact a remote payment endpoint using the token.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script sources environment setup and loads a JWT, which is credential material used for authenticated API access. Although JWT is listed as required, there is no explicit user-facing notice that the script will access and use this sensitive token for remote requests.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/submit_application.sh (reported line 37)May include surrounding context.

sh
HTTP_CODE=$(mktemp)
RESP_FILE=$(mktemp)

curl -sS -L -X POST "$BASE_URL/applications" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JWT" \
  --data-binary "@$PAYLOAD_FILE" \

Static analysis

No suspicious patterns detected.