Back to skill

Security audit

Corpus

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it can send a Corpus API token to any configured API URL, so users should review its configuration carefully before installing.

Install only if you trust the publisher and can keep CORPUS_API_BASE_URL pinned to the legitimate HTTPS Corpus API. Prefer setting CORPUS_API_TOKEN through the OpenClaw environment rather than passing it on the command line, and review any save-url or create-reminder action before allowing it to run.

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/corpus_api.py:30
Finding

Bearer token can be transmitted to an arbitrary or plaintext endpoint

Content
View full analysis
None: self.base_url = base_url.rstrip("/") self.token = token self.timeout = timeout def request(self, method: str, candidate: RequestCandidate) -> Any: url = f"{self.base_url}{candidate.path}" if candidate.query: pairs = [] for key, value in candidate.query.items(): if value is None: continue pairs.append((key, str(value))) if pairs: url = f"{url}?{urllib.parse.urlencode(pairs)}" data = None headers = { "Authorization": f"Bearer {self.token}", "Accept": "application/json", } ``` ```python parser.add_argument( "--base-url", default=os.getenv("CORPUS_API_BASE_URL", DEFAULT_BASE_URL), help=f"Corpus API base URL (default: {DEFAULT_BASE_URL})", ) ``` ```python client = CorpusClient(base_url=args.base_url, token=args.token, timeout=args.timeout) ``` The corresponding configuration documentation explicitly permits an environment-controlled destination: ```markdown - `CORPUS_API_BASE_URL`: API base URL (default: `https://corpusai.app`). ``` ### Technical Analysis The client accepts `--base-url` or `CORPUS_API_BASE_URL` without validating the URL scheme, hostname, port, embedded credentials, query, or fragment. It then attaches the Corpus bearer token to every request sent to the resulting URL. Consequently, authenticated requests are not limited to the declared Corpus service. A malicious configuration can direct them to an attacker-controlled HTTP or HTTPS server. An `http://` destination would additionally expose the bearer token ...[truncated 1781 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/corpus_api.py:98
Finding

API token can be exposed through command-line arguments

Content
View full analysis
`, potentially after following the script's error guidance. 2. The full invocation is stored in shell history, an Agent execution record, process-monitoring output, or another logging system. 3. A local user or log reader obtains the token from that retained command. 4. The exposed token is replayed against the Corpus API. 5. The attacker exercises whichever read or write operations are authorized for the token. ### Impact Assessment An attacker who retrieves the argument can impersonate the token holder within the token's server-side permission scope. This may expose private Corpus profile and library information and may permit write operations such as saving URLs or creating ...[truncated 205 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requires sensitive capabilities (env for CORPUS_API_TOKEN and network for API access) but does not declare an explicit tool scope such as permissions or allowed-tools. Without a narrow, machine-readable scope, an agent runtime may grant broader-than-necessary access or make it harder to enforce policy boundaries, increasing the chance of unintended token exposure or unauthorized outbound requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The save-url handler sends the provided URL and optional user note to remote API endpoints, which can affect user data/privacy. While the CLI command name indicates functionality, this file contains no confirmation prompt, user-facing notice, or explicit warning comment/docstring near the operation describing that data will be uploaded to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The create-reminder handler posts reminder data to remote endpoints, causing a persistent change to the user's account. This file does not include a confirmation prompt, visible notice, or explanatory warning comment/docstring around this state-changing action.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.