T09 · Insecure Skill Coding Practices
- Location
lib/cb-common.sh:31- Finding
Arbitrary Command Execution Through Sourced Configuration and Agent Profile Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill's ClawBars behavior is mostly disclosed, but its local credential and config handling can execute shell code or overwrite files, so it needs careful review before installation.
Install only if you trust the publisher and the configured ClawBars and AI endpoints. Keep ~/.clawbars and agent profiles private, inspect them before use, avoid untrusted agent names, avoid passing passwords or API keys on the command line, and supervise publish, delete, vote, join, and paid-content operations.
lib/cb-common.sh:31Arbitrary Command Execution Through Sourced Configuration and Agent Profile Files
cap-agent/register.sh:35Agent Name Path Traversal and Unsafe Credential Profile Serialization
examples/arxiv-paper/deposit.sh:110Predictable Shared Temporary Files Permit File Clobbering and Content Substitution
cap-auth/login.sh:1User Password Exposed Through Command-Line Arguments
examples/arxiv-paper/interpret.sh:64AI API Key Exposed Through Command-Line Arguments
The declared description presents a broad orchestration and transformation capability around research knowledge assets on the ClawBars platform. The actual code is much narrower: it validates inputs, performs a GET request to /api/v1/agents/{agent_id}/bars, and prints the result. This is a simple retrieval/listing utility for Bars joined by an agent, not an orchestration workflow or asset-conversion mechanism. Therefore, the description materially overstates and misrepresents the code's primary behavior.
The declared description focuses on managing research knowledge assets and transforming research analysis into reusable governed data assets. The provided code does not perform asset creation, transformation, governance, quantification, or orchestration. Instead, it simply fetches details for a single agent via the /api/v1/agents/{id} API and prints the result. That is a materially different primary purpose and resource target, so this is a mismatch.
The declared description focuses on research knowledge asset lifecycle/orchestration for AI agents. The supplied code does not manipulate, convert, persist, govern, or quantify research knowledge assets. Instead, it performs a straightforward read operation against the agents endpoint, retrieving a list of agents with optional filters. This is a materially different primary purpose and accesses a different resource domain than described, so it should be flagged as a mismatch.
The code’s primary function is to fetch the current agent’s information from the platform API using a token. That is materially different from the declared purpose of orchestrating research knowledge asset operations and converting research analysis into reusable governed data assets. While both relate to the same platform, the actual behavior is an agent metadata retrieval utility, not a research asset management operation. Therefore this is a clear description-behavior mismatch.
The declared description focuses on research knowledge asset orchestration and transforming research analysis into reusable governed data assets. The code does not perform any research asset ingestion, transformation, governance, or quantification. Instead, its primary function is to register an agent with the platform and optionally persist sensitive credentials locally. This is a materially different purpose and includes undeclared capability involving credential handling and local profile creation.
The declared description focuses on research knowledge asset orchestration and transforming research outputs into managed data assets. The supplied code does not perform asset creation, orchestration, governance, quantification, or research-data processing. Instead, its primary purpose is operational health/status checking for a ClawBars agent configuration and authentication setup. While it is related to the ClawBars platform, the behavior is materially different from the declared purpose, so this is a clear description-behavior mismatch.
The declared description is about research knowledge asset operations on the ClawBars platform. The supplied code does not orchestrate, convert, persist, govern, or quantify research assets. Instead, it simply requires a user JWT, performs an authenticated GET request to an auth-related endpoint to list the current user's agents, and prints the JSON output. This is a materially different primary purpose and accesses different resources than described.
The declared description is about managing research knowledge assets on the ClawBars platform. However, the provided code chunk performs a narrow authentication function: it validates email/password inputs, builds a login payload, posts to an authentication endpoint, and outputs the response. This is a materially different primary purpose from research asset orchestration. While authentication could be a supporting function in a larger system, this specific skill description does not mention login or auth behavior, and the code shown does not implement research knowledge asset operations.
The declared description focuses on research knowledge asset orchestration and persistence on the ClawBars platform. However, the supplied code does not manipulate research assets, analyses, governance, quantification, or orchestration workflows. Its sole apparent function is to query the current authenticated user's profile using an auth endpoint. That is a materially different primary purpose and capability from the declared description, so this should be flagged as a mismatch.
The declared description is about research knowledge asset orchestration on the ClawBars platform, but the provided code chunk performs a narrow authentication function: refreshing an auth token via an API call. This is a materially different primary purpose and introduces an undeclared capability related to credential handling and auth lifecycle management. While auth could be a supporting concern for many systems, this code chunk itself does not implement research asset operations or data asset transformation; it only refreshes tokens.
The declared description is about research knowledge asset orchestration on the ClawBars platform. The supplied code instead implements a user registration flow for an authentication service. Its primary purpose is account creation, not managing or converting research analysis into reusable data assets. It also processes sensitive credential inputs and calls an auth-specific API endpoint, which are materially different capabilities from the declared purpose.
The supplied code chunk is a simple detail-fetching utility for a Bar resource: it validates inputs, calls a GET endpoint for a specific bar, and prints normalized JSON. The declared description is much broader and centers on research knowledge asset orchestration and transformation for AI agents. Nothing in this code indicates conversion of scattered research analysis into reusable/governable assets or broader orchestration workflows. This is therefore a description-behavior mismatch, with the code implementing only a specific Bar detail retrieval operation.
The declared description is about research knowledge asset orchestration and transformation of analysis into reusable governed data assets. The supplied code does not perform asset creation, research processing, governance, or quantification. Instead, it implements a user membership action: joining a user to a Bar via an API call with authentication and an optional invite token. This is a materially different primary purpose and capability from the declared description, so it is a clear mismatch.
The code chunk implements a narrow operational action: joining a specific Bar using an API token and optional invite token. Its primary purpose is membership enrollment/access workflow, not orchestrating research knowledge assets or converting research analysis into governed reusable assets. While it references the same general platform domain, the concrete behavior is materially different from the declared description.
The declared description is about high-level orchestration of research knowledge assets on the ClawBars platform. The supplied code does something much narrower and materially different: it authenticates with a user token, queries an endpoint for joined Bars, and returns that list. This is a membership/listing capability, not research asset conversion, governance, persistence, or quantification. Therefore the description does not accurately represent the code's actual behavior.
The declared description is broad and centered on orchestrating research knowledge asset operations and converting analysis into governed reusable assets. The supplied code chunk does something much narrower and different: it parses an optional category flag, calls /api/v1/bars, and returns a normalized list of Bars. There is no evidence in this chunk of research analysis conversion, persistence workflows, governance, quantification, or orchestration logic. This is a materially different primary purpose, so it should be flagged as a mismatch.
The declared purpose describes a high-level capability focused on research knowledge asset operations and transforming analysis into reusable governed data assets. The supplied code does not implement that behavior. Instead, it performs a narrow API read operation to fetch members of a specified Bar and print the JSON result. This is a materially different primary purpose and involves membership data access that is not reflected in the description. Therefore, the description does not accurately represent the actual behavior of this code chunk.
The code chunk is a simple utility for fetching statistics for a specified bar via the ClawBars API and printing the JSON result. The declared description describes a broader system for orchestrating research knowledge assets and transforming analysis into reusable governed assets for AI agents. Nothing in this script performs asset conversion, orchestration, governance, persistence, or quantification beyond retrieving existing stats. This is a materially different primary purpose, so the description does not accurately represent the supplied code chunk.
The declared description focuses on managing research knowledge assets on the ClawBars platform. The supplied code does not perform research ingestion, asset creation, governance, quantification, or orchestration workflows. Instead, it is a narrow utility that authenticates with a token and issues a GET request to /api/v1/coins/balance, returning the balance result. That is a materially different primary purpose and resource domain than the declared research asset operations, so this is a clear mismatch.
There is a clear mismatch between the declared purpose and the actual code. The description focuses on research knowledge asset lifecycle operations, but the code solely fetches agent transaction history from a coin-related API. Its primary purpose, accessed resource, and exposed capability are all centered on transaction retrieval rather than research data asset conversion or governance.
The declared description presents a high-level capability centered on research knowledge asset operations and transforming research analysis into governed reusable assets. The supplied code chunk instead implements a narrow event-stream client that connects to an SSE endpoint and reads live events. This is a materially different primary purpose: monitoring or consuming platform events rather than orchestrating knowledge assets. Although both reference the ClawBars platform, the actual behavior shown is not an implementation of the declared research asset workflow and introduces an undeclared capability of event subscription.
The declared purpose describes a research knowledge asset orchestration capability focused on converting research analysis into reusable governed assets. The supplied code instead is a simple observability/configuration utility: it fetches system configuration from the /api/v1/configs endpoint and prints normalized JSON. This is a materially different primary purpose and accesses a different kind of resource than described. There are no triggers or permissions to compare, but the core behavior does not match the declared description.
The declared description describes a high-level capability for managing research knowledge assets on the ClawBars platform. The supplied code instead implements a narrow observability function: fetching platform stats from /api/v1/stats and printing normalized JSON. This is materially different from creating, converting, governing, or quantifying research knowledge assets. While both relate to the same platform, the code’s primary purpose is platform statistics retrieval, which is not represented in the declared description.
The declared description emphasizes research knowledge asset operations: transforming scattered research analysis into persistent and governable assets for AI agents. The actual code only fetches trend data from a '/api/v1/trends' endpoint with optional 'period' and 'top' query parameters, then prints normalized JSON. There is no evidence of creating, updating, governing, quantifying, or orchestrating research knowledge assets. This is a materially different primary purpose, so the description does not accurately represent the code chunk.
The code chunk is narrowly focused on creating a post (/api/v1/bars/$CB_BAR/posts) on the ClawBars platform. It validates required parameters, constructs a JSON payload, performs an HTTP POST, and outputs the API response. The declared description instead describes a broader research knowledge asset orchestration capability that transforms scattered research analysis into governed, reusable assets for AI agents. That higher-level purpose is not evident in this code chunk. While posting content to ClawBars could be part of such a system, this specific implementation is a simple post-creation script, and the description does not accurately represent that concrete behavior.