Back to skill

Security audit

W-Spaces Deploy

Security checks for vulnerabilities and agentic risk

Overview

This W-Spaces deployment skill matches its stated purpose, but it handles passwords and API keys in ways that can expose credentials and can silently send them to a non-default endpoint if the environment is changed.

Review before installing. Use this only in trusted shells or CI jobs, avoid passing real passwords where command history or logs are captured, do not commit .env files, avoid storing live keys in ~/.bashrc, verify WSPACES_API_URL is unset or exactly the intended W-Spaces API, and rotate any key that may have appeared in logs.

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

Warning
Location
scripts/wspaces_auth.sh:24
Finding
Credentials Exposed Through Process Arguments and Plaintext Storage<![CDATA[ ## Vulnerability Details **File Location**: `scripts/wspaces_auth.sh:24-25, 39-51, 59-60, 69-72, 80-81, 93-94`; `SETUP.md:14-30`; `SKILL.md:14-27` **Vulnerability Type**: Sensitive credential exposure **Risk Level**: Medium ### Vulnerable Code The authentication script accepts passwords as command-line arguments and expands passwords and API keys directly into `curl` arguments: ```bash --email) EMAIL="$2"; shift 2 ;; --password) PASSWORD="$2"; shift 2 ;; ``` ```bash register) if [ -z "$EMAIL" ] || [ -z "$PASSWORD" ] || [ -z "$NAME"" ]; then echo "Error: --email, --password, and --name required" exit 1 fi curl -s -X POST "$API_BASE/api/v1/auth/register" \ -H "Content-Type: application/json" \ -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\",\"name\":\"$NAME\"}" | jq . ;; login) if [ -z "$EMAIL" ] || [ -z "$PASSWORD" ]; then echo "Error: --email and --password required" exit 1 fi curl -s -X POST "$API_BASE/api/v1/auth/login" \ -H "Content-Type: application/json" \ -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" | jq . ;; ``` Authenticated requests similarly expand the API key into a process argument: ```bash curl -s -X GET "$API_BASE/api/v1/me" \ -H "X-API-Key: $WSPACES_API_KEY" | jq . ``` The setup documentation recommends permanently storing the API key in a plaintext shell startup file: ```bash export WSPACES_API_KEY="wsk_live_xxxx..." ``` ```bash echo 'export WSPACES_API_KEY="wsk_live_xxxx..."' >> ~/.bashrc source ~/.bashrc ``` `SKILL.md` also suggests plaintext `.env` storage: ```text WSPACES_API_KEY=wsk_live_xxxx... ``` ### Technical Analysis Passwords supplied through `--password` are recorded in the invoking shell's command history under common shell configurations. The script then embeds those passwords in the JSON argu ...[truncated 2526 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Stop accepting passwords directly through ordinary command-line arguments. Prompt interactively with silent input, for example using `read -r -s`, or accept the password through a protected file descriptor. 2. Construct request bodies through standard input rather than placing secret-bearing JSON in the `curl` argument vector. For example, generate JSON with `jq -n` and pipe it to `curl --data-binary @-`. 3. Avoid placing API-key headers directly in command-line arguments where the runtime environment exposes process arguments. Use a permission-restricted temporary curl configuration, protected file descriptor, or an equivalent mechanism that does not expose the key through `argv`. 4. Ensure any temporary credential material is created with restrictive permissions, removed through a cleanup trap, and never written to a shared temporary path. 5. Do not recommend storing live credentials in `~/.bashrc`. Prefer an operating-system credential store, CI secret store, or dedicated secrets manager. 6. If a local environment file must be supported, require permissions such as `chmod 600`, explicitly add it to `.gitignore`, and document that it must not be committed, logged, or backed up without encryption. 7. Redact the `apiKey` and `rawKey` fields from normal command output. Provide an explicit secure export mechanism when the user needs to capture a newly issued key. 8. Add documentation warning users that terminal transcripts, debug modes such as `set -x`, CI logs, and agent logs must not contain passwords or raw API keys. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/wspaces_auth.sh:6
Finding
Unvalidated API Endpoint Override Can Redirect Credentials and API Keys<![CDATA[ ## Vulnerability Details **File Location**: `scripts/wspaces_auth.sh:6, 39-94`; `scripts/wspaces_project.sh:6, 44-61`; `scripts/wspaces_push.sh:6, 49-52`; `scripts/wspaces_deploy.sh:6, 33-46` **Vulnerability Type**: Credential exfiltration through an unvalidated service endpoint **Risk Level**: Medium ### Vulnerable Code Every script accepts an unrestricted API base URL from the inherited environment: ```bash API_BASE="${WSPACES_API_URL:-https://api.wspaces.app}" ``` The authentication script sends passwords to that endpoint: ```bash curl -s -X POST "$API_BASE/api/v1/auth/login" \ -H "Content-Type: application/json" \ -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" | jq . ``` It also sends live API keys to the selected endpoint: ```bash curl -s -X GET "$API_BASE/api/v1/me" \ -H "X-API-Key: $WSPACES_API_KEY" | jq . ``` The same pattern appears in the project, push, and deployment scripts: ```bash curl -s -X PUT "$API_BASE/api/v1/projects/$PROJECT_ID/code" \ -H "X-API-Key: $WSPACES_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"html\":$HTML_ESCAPED}" | jq . ``` ```bash RESULT=$(curl -s -X POST "$API_BASE/api/v1/projects/$PROJECT_ID/deploy" \ -H "X-API-Key: $WSPACES_API_KEY") ``` ### Technical Analysis `WSPACES_API_URL` is trusted without validating its scheme, hostname, port, or destination. An inherited environment variable can therefore replace the documented `https://api.wspaces.app` endpoint with an attacker-controlled server. The scripts do not require HTTPS for an override and do not enforce an allowlist. As a result, a malicious value such as `http://attacker.example` can receive registration data, login passwords, API keys, project metadata, and complete website source. An HTTP destination additionally exposes transmitted data to network interception. Environment variables can be influenced by compromised shell initialization files, malicious CI con ...[truncated 2094 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the endpoint override from production scripts if custom API origins are not required: ```bash API_BASE="https://api.wspaces.app" ``` 2. If endpoint overrides are required for development, require an explicit development flag rather than automatically trusting an inherited environment variable. 3. Parse and validate the configured URL before any request: - Require the `https` scheme. - Allow only approved hostnames. - Reject embedded credentials, unexpected ports, fragments, and malformed URLs. - Resolve the final destination against a strict allowlist. 4. Separate production and development credentials. Never permit live production keys to be sent to local, staging, or arbitrary custom endpoints. 5. Display the destination origin before sending credentials when a non-default development endpoint is enabled, and require explicit confirmation for interactive use. 6. Configure curl to reject insecure TLS behavior and unexpected protocol transitions. Use options such as `--proto '=https'` and do not enable insecure certificate validation. 7. If redirects are enabled in the future, ensure authentication headers cannot be forwarded to an unapproved origin. Prefer disabling redirects for authenticated API requests. 8. Clear or explicitly set the endpoint in trusted CI and agent launch configurations so inherited untrusted values cannot silently redirect requests. 9. Add automated tests confirming that HTTP URLs, unapproved hosts, malformed URLs, and redirect attempts are rejected before any secret is transmitted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Content
paces_auth.sh --register --email you@example.com --password yourpass --name "Your Name"
```

**Check your email** and click the verification link.

**Login to get API key:**
```bash
scripts/wspaces_auth.sh --login --email you@example.com --password yourpass
```

Copy the `apiKey` from the response.

### 2. Set the API key

```bash
export WSPACES_API_KEY="wsk_live_xxxx..."
```

To persist:
```bash
echo 'export WSPACES_API_KEY="wsk_live_xxxx..."' >> ~/.bashrc
source ~/.bashrc
```

### 3. Verify

```bash
scripts/wspaces_auth.sh --me
```

Should return your user info and credits balance.

## Usage

Just tell your agent:
- **"Create a W-Spaces project called My App"**
- **"Push this HTML to W-Spaces"**
- **"Deploy to wspaces.app"**

## What It Does

- Create projects on W-Spaces
- Push HTML/CSS/JS code
- Deploy to live URLs (`*.wspaces.app`)
- Manage API keys
- View deployment history

## What It Doesn't Do

- No code generation
- No AI website builders
- No magic — just deploys what you
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
If the skill only pushes HTML to an existing project while claiming project creation and deployment, users may grant trust or credentials for a more complete workflow than actually exists. In agentic systems, inaccurate capability claims undermine review, policy enforcement, and safe operator expectations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding
If the skill only pushes HTML to an existing project while claiming project creation and deployment, users may grant trust or credentials for a more complete workflow than actually exists. In agentic systems, inaccurate capability claims undermine review, policy enforcement, and safe operator expectations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the skill only pushes HTML to an existing project while claiming project creation and deployment, users may grant trust or credentials for a more complete workflow than actually exists. In agentic systems, inaccurate capability claims undermine review, policy enforcement, and safe operator expectations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding
If the skill only pushes HTML to an existing project while claiming project creation and deployment, users may grant trust or credentials for a more complete workflow than actually exists. In agentic systems, inaccurate capability claims undermine review, policy enforcement, and safe operator expectations.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
[{ "id": "guid", "name": "string", "prefix": "wsk_live_xxxx", "createdAt": "datetime", "lastUsedAt": "datetime|null", "isRevoked": false }]
```

### DELETE /api/v1/auth/api-keys/{id}
Revoke an API key. **Requires auth.**

**Response 204** No Content
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill invokes shell scripts but does not declare any explicit tool scope or allowed tools. In an agent environment, this weakens least-privilege controls and can allow the skill to be executed with broader shell access than users or reviewers expect.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs users to store a live API key in a local .env file without any warning about credential sensitivity, file permissions, or exclusion from source control. This increases the risk of accidental secret exposure through git commits, shared workspaces, logs, backups, or other local tooling.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This markdown file documents revoking API keys and deploying projects, both of which can affect access or production state, but it does not include any cautionary language about their operational impact. Under the markdown-file criteria, descriptions should warn when actions may affect user data, privacy, or system integrity.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest describes a skill for deploying static websites with API key authentication, supporting project creation, code push, and deployment. This script implements end-user account registration/login and API key lifecycle management, which is broader than deployment operations and not described as part of the skill's purpose.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "Error: --email, --password, and --name required"
            exit 1
        fi
        curl -s -X POST "$API_BASE/api/v1/auth/register" \
            -H "Content-Type: application/json" \
            -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\",\"name\":\"$NAME\"}" | jq .
        ;;
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "Error: --email and --password required"
            exit 1
        fi
        curl -s -X POST "$API_BASE/api/v1/auth/login" \
            -H "Content-Type: application/json" \
            -d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\"}" | jq .
        ;;
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
exit 1
        fi
        KEY_NAME="${KEY_NAME:-API Key}"
        curl -s -X POST "$API_BASE/api/v1/auth/api-keys" \
            -H "X-API-Key: $WSPACES_API_KEY" \
            -H "Content-Type: application/json" \
            -d "{\"name\":\"$KEY_NAME\"}" | jq .
Confidence
81% confidence
Finding
The script allows the API destination to be overridden via WSPACES_API_URL while sending the sensitive X-API-Key header to that endpoint. In a skill or agent environment, an attacker who can influence environment variables could redirect this request to a malicious server and capture API keys, making the external transmission materially more dangerous than a normal API call.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes a skill for deploying static websites, including project creation, code push, and deployment. This script also implements project listing and retrieval operations (`--list`, `--get`), which are management/discovery capabilities not mentioned in the manifest description. While related to the same service, they go beyond the specifically claimed deployment actions.

External Transmission

Medium
Category
Data Exfiltration
Content
[ -n "$DESCRIPTION" ] && BODY="$BODY,\"description\":\"$DESCRIPTION\""
        BODY="$BODY}"

        curl -s -X POST "$API_BASE/api/v1/projects" \
            -H "X-API-Key: $WSPACES_API_KEY" \
            -H "Content-Type: application/json" \
            -d "$BODY" | jq .
Confidence
84% confidence
Finding
The script sends user-supplied project metadata to an external service via curl, authenticated with an API key. External transmission is expected for deployment tooling, but in this skill context it is still security-relevant because the destination can be overridden by WSPACES_API_URL and the transfer occurs silently, which could enable unintended data disclosure or credential misuse if the environment is manipulated.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script performs authenticated outbound requests to a remote API using a sensitive API key, but provides no explicit user-facing notice at execution time about what data is being sent or to which endpoint. In an agent skill context, this increases the risk of silent transmission of project names, descriptions, IDs, and metadata to an external service under user credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
# Escape JSON special characters
HTML_ESCAPED=$(echo "$HTML_CONTENT" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')

curl -s -X PUT "$API_BASE/api/v1/projects/$PROJECT_ID/code" \
    -H "X-API-Key: $WSPACES_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"html\":$HTML_ESCAPED}" | jq .
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This shell script sends HTML content, including data read from a local file, to a remote W-Spaces API via curl. Although the script's name suggests a push action, the file itself provides no explicit user-facing disclosure beyond implementation comments that local content will be transmitted off-host.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
README.md:28

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/wspaces-api.md:8

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SETUP.md:24

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:22