Back to skill

Security audit

Crewai Workflows

Security checks for vulnerabilities and agentic risk

Overview

This skill is a remote AI workflow client, but it ships a hardcoded API key and stores full responses in a predictable temporary file, so users should review it before installing.

Install only if you are comfortable sending workflow inputs and API credentials to crew.iclautomation.me and its model providers. The publisher should rotate the exposed key, replace it with a placeholder, narrow the skill trigger text, add an explicit data-handling warning, and stop saving full responses to predictable /tmp files by default.

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

Error
Location
SKILL.md:15
Finding
Hardcoded API Credential Exposed in Skill Documentation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:15-18` **Vulnerability Type**: Hardcoded secret / exposed API credential **Risk Level**: High ### Vulnerable Code ```bash Set the API key as an environment variable (recommended): export CREWAI_API_KEY="5aZyTFQJAAT03VPIII5zsIPcL8KTtdST" ``` ### Technical Analysis The Skill documentation contains a plaintext, live-looking API key. Because `SKILL.md` is distributed with the Skill, every person or system that can access the package can recover and reuse the credential independently of the helper script. Moving the same hardcoded value into an environment variable does not protect it: the secret is already disclosed in the source file and may also remain accessible through package archives, caches, repository history, audit logs, or copied documentation. The audit did not verify whether the credential remains active. If it is active, an attacker can use it to authenticate directly to the documented CrewAI service. A shared credential also prevents reliable attribution of requests to individual users. ### Attack Path 1. An attacker downloads or otherwise obtains access to the Skill package. 2. The attacker reads `SKILL.md` and extracts the embedded API key. 3. The attacker sends requests directly to the documented service, for example by placing the key in the `X-API-Key` request header. 4. If the key remains valid, the service accepts requests under the credential owner's identity and authorization scope. 5. The attacker consumes available quota, invokes exposed workflows, or performs any other operation permitted to that key until it is revoked or restricted. ### Impact Assessment Successful exploitation does not grant local operating-system privileges. It grants the attacker the remote API privileges assigned to the exposed credential. Potential effects include: - Unauthorized use of the CrewAI service. - Consumption of quotas or paid resources. - Abuse of workflows available to the cre ...[truncated 334 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Revoke and rotate the disclosed API key immediately; removal from the current file is insufficient once a secret has been distributed. 2. Remove the real credential from `SKILL.md`, package archives, release artifacts, and version-control history where feasible. 3. Replace the example with an unambiguously nonfunctional placeholder: ```bash export CREWAI_API_KEY="YOUR_API_KEY" ``` 4. Require each user or deployment to provision its own credential through a protected environment variable or secret-management system. 5. Use separate credentials per user or workload to support revocation, least privilege, rate limits, and audit attribution. 6. Restrict each key to only the required endpoints and operations. 7. Review server access logs for suspicious use of the exposed key and invalidate related sessions or derived credentials if applicable. 8. Add automated secret scanning to development and release pipelines to prevent future credential publication. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/call_crew.sh:75
Finding
Predictable and Insecure Temporary Response File<![CDATA[ ## Vulnerability Details **File Location**: `scripts/call_crew.sh:75-78` **Vulnerability Type**: Predictable temporary file, symbolic-link overwrite, and sensitive-data exposure **Risk Level**: Medium ### Vulnerable Code ```bash # Save full response to temp file for inspection TEMP_FILE="/tmp/crewai_response_$(date +%s).json" echo "$RESPONSE" | jq '.' > "$TEMP_FILE" echo "💾 Full response saved to: $TEMP_FILE" ``` ### Technical Analysis The script constructs a file in the shared `/tmp` directory using only the current Unix timestamp in seconds. This name is predictable and is not created atomically. Shell redirection opens the selected path without verifying that it is a newly created regular file owned by the current user. A local attacker may predict the timestamp and pre-create the path as a symbolic link. When the script performs `> "$TEMP_FILE"`, it follows the link and truncates or replaces the linked target, subject to the victim process's file permissions and operating-system symbolic-link protections. The response file may also be created with permissions derived from the user's current `umask`. With a common `022` umask, a newly created file is typically readable by other local users. The full remote response may contain customer-support text, business data, generated content, trace identifiers, or other sensitive information. Files are retained without automatic cleanup. Runs occurring during the same second also select the same filename, allowing accidental overwrites or cross-run data confusion. ### Attack Path 1. A local attacker observes or predicts when another user will invoke the Skill. 2. The attacker calculates the expected path, such as `/tmp/crewai_response_<current_timestamp>.json`. 3. Before the response is saved, the attacker creates that path as a symbolic link to a file writable by the victim process. 4. The victim runs the script and receives a successful API response. 5. Shell redirection follows the pre-created ...[truncated 1238 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not store complete responses by default. Make persistence an explicit opt-in behavior. 2. If a temporary copy is required, create it atomically with `mktemp` under a restrictive `umask`: ```bash umask 077 TEMP_FILE="$(mktemp "${TMPDIR:-/tmp}/crewai_response.XXXXXXXXXX.json")" printf '%s\n' "$RESPONSE" | jq '.' > "$TEMP_FILE" ``` 3. Prefer a user-private runtime or data directory rather than a shared temporary directory. 4. Register a cleanup trap when the file is temporary: ```bash trap 'rm -f -- "$TEMP_FILE"' EXIT ``` 5. If retention is required, accept an explicit destination path, document that it may contain sensitive information, and enforce owner-only permissions with `chmod 600`. 6. Avoid timestamp-only names; secure random names generated through `mktemp` prevent collisions and pre-creation attacks. 7. Define and enforce a retention policy for stored responses. 8. Consider saving only necessary output fields rather than the complete remote response. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill description does not warn that user inputs are transmitted to `crew.iclautomation.me` and processed by external models including DeepSeek, Perplexity, and Gemini. Without upfront disclosure, users or calling agents may pass confidential business, customer support, or analytics data to third parties without informed consent or policy review.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The file exposes a hardcoded API key directly in the documentation and encourages users to export and use it. This is a direct credential disclosure: anyone who can read the skill can reuse the key to access the external CrewAI service, incur charges, abuse workflows, or pivot into any data reachable through that account.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill documents shell-based execution (`scripts/call_crew.sh`, `curl`) but does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch can cause the platform or a calling agent to invoke shell/network-capable behavior without clear governance, increasing the risk of unintended command execution or data exfiltration through external requests.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The description is broad enough to match generic content generation, analysis, and support tasks, which can cause the skill to be selected for many unrelated prompts. In this skill's context, overbroad routing is risky because invocation sends user input to an external server and third-party models, so accidental activation can leak sensitive data or trigger unnecessary external actions.

External Transmission

Medium
Category
Data Exfiltration
Content
scripts/call_crew.sh marketing '{"topic": "mindfulness apps"}' "YOUR_API_KEY"
```

### Option 2: Direct cURL

```bash
curl -X POST "https://crew.iclautomation.me/crews/<crew_name>/run" \
Confidence
84% confidence
Finding
The cURL example explicitly posts data to an external domain, confirming outbound transmission of arbitrary skill inputs. External transmission is expected for this workflow, but it remains security-relevant because the skill handles marketing, support, and business-analysis content that may contain sensitive or proprietary information, and the destination is a non-platform server.

External Transmission

Medium
Category
Data Exfiltration
Content
echo "🚀 Calling $CREW_NAME crew..."
echo ""

RESPONSE=$(curl -s --max-time "$TIMEOUT" \
  -X POST "https://crew.iclautomation.me/crews/$CREW_NAME/run" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
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
89% confidence
Finding
The script transmits both user-supplied JSON and an API key to a third-party remote service, but the help text does not clearly disclose that data leaves the local environment. This can cause users to send sensitive customer, support, marketing, or business analysis data without informed consent, which is especially risky given the skill's stated use cases.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The script writes the full API response to a predictable file in /tmp, which may contain sensitive model outputs, trace identifiers, or customer/business data supplied to the workflow. On multi-user systems or in shared environments, temporary files can be discovered or retained longer than expected, increasing the chance of unintended disclosure.

Static analysis

No suspicious patterns detected.