Back to skill

Security audit

Humanos - Programmable Human Authorization for Agent Actions

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned, but its optional enforcement hook can fail open for sensitive actions and does not enforce mandate constraints before allowing tool execution.

Install only if you understand that the approval-request scripts are API clients and that the optional guard hook should not be treated as a complete security boundary. Keep credentials tightly permissioned, avoid custom VIA_API_URL values unless isolated test credentials are used, and require separate controls for exact action matching, amount/recipient/resource constraints, and fail-closed protection of high-risk tools.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
hooks/humanos-guard/handler.ts:113
Finding
Mandate constraints are retrieved but never enforced<![CDATA[ ## Vulnerability Details **File Location**: `hooks/humanos-guard/handler.ts:91-92, 113-126, 173-193` **Vulnerability Type**: Authorization constraint bypass **Risk Level**: High ### Vulnerable Code ```typescript const encodedScope = encodeURIComponent(scope); const encodedTool = encodeURIComponent(toolName); const url = `${apiUrl}/v1/via/mandates?scope=${encodedScope}&toolName=${encodedTool}`; ``` ```typescript return { valid: true, mandate: { id: mandate.id, scope: mandate.scope, validUntil: validUntil.toISOString(), constraints: mandate.constraints, }, }; ``` ```typescript const scope = _extractScope(toolName, args); const result = await _checkMandateViaApi(toolName, scope); if (!result.valid) { const reason = result.reason || "No valid mandate"; event.messages.push( `Action blocked by VIA Mandate Guard. ${reason}. ` + `Use the humanos skill to create an approval request before proceeding. ` + `Example: "I need approval from manager@company.com to ${scope}"` ); console.log(`[humanos-guard] BLOCKED: ${toolName} — ${reason}`); if (event.context && typeof event.context === "object") { (event.context as Record<string, unknown>).blocked = true; (event.context as Record<string, unknown>).blockReason = reason; } } else { console.log( `[humanos-guard] ALLOWED: ${toolName} — mandate ${result.mandate?.id} valid until ${result.mandate?.validUntil}` ); } ``` ### Technical Analysis The hook queries mandates using only a broad scope and tool name. It does not send a canonical representation of the proposed action, including critical attributes such as the payment amount, recipient, document identifier, destination account, or affected resource. Although the API response can contain `mandate.constraints`, the hook merely copies those constraints into the result object. It never compares them with the actual tool arguments before allowing execution. Consequently, any non-expired and non-rev ...[truncated 1442 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Define a canonical action schema containing the tool name, operation, amount, currency, recipient, resource identifiers, and other security-relevant arguments. 2. Bind the approval cryptographically to a digest of that canonical action. 3. Submit the action digest or complete canonical action when querying the mandate service. 4. Implement strict local validation of every returned constraint before allowing execution. 5. Reject unknown, malformed, missing, or unsupported constraints instead of treating them as optional. 6. Validate that the mandate scope exactly matches the requested operation rather than relying on a broad inferred scope. 7. Add tests covering amount increases, recipient changes, resource substitutions, expired constraints, and malformed constraint objects. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
hooks/humanos-guard/handler.ts:26
Finding
Keyword-based protection policy allows sensitive actions to bypass mandate checks<![CDATA[ ## Vulnerability Details **File Location**: `hooks/humanos-guard/handler.ts:26-61, 158-169` **Vulnerability Type**: Incomplete authorization enforcement **Risk Level**: High ### Vulnerable Code ```typescript const SENSITIVE_KEYWORDS = [ "payment", "transfer", "sign", "approve", "authorize", "send money", "wire", "invoice", "contract", "execute", "withdraw", "deposit", ]; function _getProtectedPatterns(): string[] { const envPatterns = process.env.VIA_PROTECTED_TOOLS; if (envPatterns) { return envPatterns.split(",").map((p) => p.trim()); } return SENSITIVE_KEYWORDS; } function _requiresMandate(toolName: string, args: Record<string, unknown>): boolean { const patterns = _getProtectedPatterns(); const argsStr = JSON.stringify(args).toLowerCase(); const combined = `${toolName.toLowerCase()}:${argsStr}`; return patterns.some((pattern) => { try { return new RegExp(pattern.toLowerCase()).test(combined); } catch { return combined.includes(pattern.toLowerCase()); } }); } ``` ```typescript const toolName = event.context.toolName || "unknown"; const args = (event.context.args || {}) as Record<string, unknown>; if (!_requiresMandate(toolName, args)) { return; } ``` ### Technical Analysis The hook determines whether authorization is necessary by searching the serialized tool name and arguments for a short list of keywords or administrator-supplied regular expressions. If no keyword matches, the handler returns and the tool call proceeds without a mandate check. Text matching is not a reliable security boundary. Equivalent operations can be described with synonyms, encoded values, opaque identifiers, or arguments that contain no descriptive text. The default policy also omits several sensitive operations listed in the project documentation, including deleting data, modifying permissions, rotating credentials, publishing under a user's identity, and controlling physical devices. The ...[truncated 1177 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace free-form keyword inference with an explicit registry of protected tools and structured operations. 2. Use stable operation identifiers supplied by the tool integration rather than descriptions embedded in arguments. 3. Apply a deny-by-default policy to tools capable of financial, destructive, identity, permission, credential, or external side effects. 4. Require an explicit administrative decision for tools that are not classified. 5. Treat malformed configuration and unknown tool names as protected rather than unprotected. 6. If configurable patterns remain available, anchor and validate them and use them only as an additional control—not the primary authorization boundary. 7. Add bypass tests using synonyms, opaque identifiers, encoded arguments, deletion operations, role changes, and credential-management actions. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sign-request.sh:8
Finding
Unrestricted API URL override can disclose bearer credentials and approval data<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sign-request.sh:8, 27-33`; `hooks/humanos-guard/handler.ts:78-100` **Vulnerability Type**: Credential and sensitive-data disclosure through unsafe endpoint configuration **Risk Level**: High ### Vulnerable Code ```bash local base_url="${VIA_API_URL:-https://api.humanos.id}" ``` ```bash curl -s -X "$method" \ "${base_url}${path}" \ -H "Authorization: Bearer ${VIA_API_KEY}" \ -H "X-Timestamp: ${timestamp}" \ -H "X-Signature: ${signature}" \ -H "Content-Type: application/json" \ ${body:+-d "$body"} | jq . ``` ```typescript const apiUrl = process.env.VIA_API_URL || "https://api.humanos.id"; const apiKey = process.env.VIA_API_KEY; ``` ```typescript const url = `${apiUrl}/v1/via/mandates?scope=${encodedScope}&toolName=${encodedTool}`; const response = await fetch(url, { method: "GET", headers: { "Authorization": `Bearer ${apiKey}`, "X-Timestamp": timestamp, "X-Signature": signature, "Content-Type": "application/json", }, signal: controller.signal, }); ``` ### Technical Analysis `VIA_API_URL` is accepted without validating its scheme, hostname, port, or trust level. Both the shell scripts and guard hook attach the real bearer token and HMAC authentication metadata to requests sent to this configured endpoint. Request creation can also include contact details, consent text, structured mandate data, document content, redirect URLs, and internal identifiers. If the environment variable is poisoned or mistakenly configured, these values are sent directly to an arbitrary server. The implementation does not enforce HTTPS or restrict the destination to an approved hostname. ### Attack Path 1. Gain influence over the OpenClaw environment or configuration and set `VIA_API_URL` to an attacker-controlled HTTP or HTTPS server. 2. Wait for the agent to create an approval request, retrieve a credential, look up a user, or perform a mandate check. 3. The script or hook cons ...[truncated 744 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse the configured endpoint as a URL before use. 2. Require the `https:` scheme and reject plaintext HTTP, embedded credentials, fragments, and unexpected ports. 3. Restrict production use to an explicit allowlist such as `api.humanos.id`. 4. Require a separate opt-in development mode and separate low-privilege credentials for custom endpoints. 5. Avoid sending production bearer tokens after redirects to a different origin; disable redirects or validate every redirect destination. 6. Log only the approved origin, never authentication headers or sensitive request bodies. 7. Validate configuration at startup and fail closed if the endpoint is malformed or untrusted. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup-openclaw.sh:25
Finding
Installer does not enforce restrictive permissions on the credential configuration<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup-openclaw.sh:25-46` **Vulnerability Type**: Insecure secret-file permissions **Risk Level**: Medium ### Vulnerable Code ```bash # Create minimal config if missing if [[ ! -f "$CONFIG_FILE" ]]; then cat > "$CONFIG_FILE" << 'JSONEOF' { "skills": { "entries": { "humanos": { "enabled": true, "env": { "VIA_API_KEY": "REPLACE_WITH_YOUR_API_KEY", "VIA_SIGNATURE_SECRET": "REPLACE_WITH_YOUR_SECRET" } } } } } JSONEOF echo " Created ${CONFIG_FILE} — edit it with your API credentials" else echo " Config already exists at ${CONFIG_FILE}" echo " Make sure it has VIA_API_KEY and VIA_SIGNATURE_SECRET for the humanos skill" fi ``` ### Technical Analysis The setup script creates `~/.openclaw/openclaw.json` without first applying a restrictive `umask` and without running `chmod 600` afterward. The resulting permissions depend on the user's environment. Under a permissive umask, the file may be readable by the user's group or other local accounts. Although the initially written values are placeholders, the installer explicitly tells the user to edit this same file and insert the real API key and signing secret. The script also does not verify or correct the permissions of an existing configuration file. Documentation that recommends `chmod 600` is not an effective enforcement mechanism because users can omit the manual step. ### Attack Path 1. Run the installer in an environment with a permissive umask. 2. The script creates `~/.openclaw/openclaw.json` with group-readable or world-readable permissions. 3. Insert the real `VIA_API_KEY` and `VIA_SIGNATURE_SECRET` as instructed. 4. Another local account or process reads the configuration file. 5. The exposed credentials are used to access the API or forge signed requests. ### Impact Assessment A local attacker may obtain both the bearer API key and HMAC signing secret. This can ...[truncated 284 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Set `umask 077` before creating the OpenClaw directory or configuration file. 2. Create the file atomically with owner-only permissions. 3. Run `chmod 600 "$CONFIG_FILE"` immediately after creation. 4. Inspect and correct permissions when the configuration file already exists. 5. Verify that the configuration is owned by the current user and reject symlinks or unexpected file types. 6. Consider storing secrets in an operating-system credential store rather than plaintext JSON. 7. Warn and stop setup if the file remains accessible to group or other users. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sign-request.sh:24
Finding
HMAC signing secret is passed through the OpenSSL process argument list<![CDATA[ ## Vulnerability Details **File Location**: `scripts/sign-request.sh:24-25` **Vulnerability Type**: Local secret exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```bash local signature signature=$(printf '%s' "$sign_payload" | openssl dgst -sha256 -hmac "$VIA_SIGNATURE_SECRET" | awk '{print $NF}') ``` ### Technical Analysis The signing secret is supplied to OpenSSL as the value of the `-hmac` command-line option. This places the secret in the child process's argument vector. On systems where process command lines are observable to other local users, monitoring tools, diagnostic systems, or privileged processes, the secret may be captured while OpenSSL is running. The exposure window is short but repeats for every API request. Environment variables have their own exposure considerations, but copying the secret into a command-line argument unnecessarily creates an additional disclosure channel. ### Attack Path 1. Obtain the ability to inspect command lines for the victim's processes, as allowed by the host's process-visibility configuration. 2. Continuously monitor process execution while the user invokes one of the API scripts. 3. Capture the `openssl dgst -sha256 -hmac <secret>` invocation. 4. Extract `VIA_SIGNATURE_SECRET` from the argument list. 5. Use the secret to generate valid HMAC signatures for forged requests, normally in combination with access to the associated API key. ### Impact Assessment A local observer may recover the HMAC signing secret. If the bearer API key is also available, the attacker can construct authenticated requests that appear to originate from the victim. The exact exploitability depends on operating-system process isolation and whether unprivileged users can inspect another user's process arguments. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace command-line HMAC generation with an in-process implementation using a maintained cryptographic library. 2. If OpenSSL must be retained, provide key material through a protected file descriptor or another mechanism that does not include the secret in the argument vector. 3. Avoid temporary files containing the secret. 4. Minimize the lifetime of secret-bearing variables and do not enable shell tracing around signing operations. 5. Add platform-specific tests confirming that the secret does not appear in process listings, logs, or error messages. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (41)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill performs authenticated outbound API requests and uses HMAC signing secrets, but those powerful capabilities are not reflected in a narrowly scoped description about requiring approval. Hidden credentialed network access raises the risk of overtrust, data exfiltration to third parties, and misuse if the skill is invoked unexpectedly.

Ae1

High
Category
analysis-evasion
Content
Use the signing script: `scripts/sign-request.sh`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| Resolve DID | `scripts/resolve-did.sh` | `GET` | `/v1/via/dids/:did` | `--did` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| Resolve DID | `scripts/resolve-did.sh` | `GET` | `/v1/via/dids/:did` | `--did` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| Resend OTP | `scripts/resend-otp.sh` | `PATCH` | `/v1/request/resend/:id` | `--id` (and optional `--contact`) |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
| Resend OTP | `scripts/resend-otp.sh` | `PATCH` | `/v1/request/resend/:id` | `--id` (and optional `--contact`) |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Tool Parameter Abuse

High
Category
Tool Misuse
Content
source "$(dirname "$0")/sign-request.sh"

via_curl DELETE "/v1/request/${ID}"
Confidence
90% confidence
Finding
The script interpolates an externally supplied ID directly into the request path for a destructive DELETE operation, with no validation of allowed format or characters in this file. If the downstream curl wrapper does not safely constrain or encode the path, a caller may abuse the parameter to target unintended resources, produce malformed signed requests, or exploit path/query manipulation in the API call.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Remove existing symlink if present
if [[ -L "${SKILLS_DIR}/${SKILL_NAME}" ]]; then
  rm "${SKILLS_DIR}/${SKILL_NAME}"
  echo "  Removed existing symlink"
fi
Confidence
95% 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).

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
A mandate signature can represent:

- A simple yes/no approval
- A signed document (PDF)
- A payment authorization
- Identity verification (KYC)
Confidence
75% 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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```

```bash
chmod 600 ~/.openclaw/openclaw.json
```

3. Verify the skill loads:
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- All requests signed with HMAC-SHA256
- API keys read from environment variables at runtime, never hardcoded in scripts
- When using OpenClaw, credentials are managed via `~/.openclaw/openclaw.json` — set secure file permissions (`chmod 600 ~/.openclaw/openclaw.json`)
- W3C Verifiable Credentials with EdDSA proofs
- OTP verification for all approval flows
- Guard hook uses native fetch API (Node.js 18+), no shell command execution
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- All requests signed with HMAC-SHA256
- API keys read from environment variables at runtime, never hardcoded in scripts
- When using OpenClaw, credentials are managed via `~/.openclaw/openclaw.json` — set secure file permissions (`chmod 600 ~/.openclaw/openclaw.json`)
- W3C Verifiable Credentials with EdDSA proofs
- OTP verification for all approval flows
- Guard hook uses native fetch API (Node.js 18+), no shell command execution
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares powerful capabilities through metadata and documented behavior (environment access, shell tooling, authenticated network calls) but does not declare an explicit tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it harder for a runtime or reviewer to understand and constrain what the skill may do before installation or invocation.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
hooks/humanos-guard/handler.ts:46