T09 · Insecure Skill Coding Practices
- Location
scripts/batch.sh:69- Finding
Arbitrary Command Execution Through Crafted Batch CSV Records
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This lead-enrichment skill is purpose-aligned in concept, but it ships misleading mock enrichment output and unsafe shell scripts that require review before installation.
Review or fix the scripts before installing. Do not process untrusted CSV files with batch.sh, do not rely on the produced dossiers as real research, avoid shared secrets-file probing, and consider privacy, retention, and CRM-transfer obligations before using this for prospect or candidate data.
scripts/batch.sh:69Arbitrary Command Execution Through Crafted Batch CSV Records
scripts/batch.sh:54Output Directory Escape Through Unsanitized Lead-Derived Filenames
The skill advertises extensive enrichment, scraping-adjacent collection, batch processing, export, caching, and talking-point generation that are not actually implemented in the described artifacts. This mismatch can mislead operators into granting broader privileges, trusting outputs that were never produced, or integrating the skill into sensitive workflows under false assumptions about behavior and safeguards.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
},
"premium_sources": {
"_note": "Optional paid services — add API keys to ~/.clawdbot/secrets.env",
"hunter_io": {
"enabled": false,
"api_key_env": "HUNTER_API_KEY",
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
},
"premium_sources": {
"_note": "Optional paid services — add API keys to ~/.clawdbot/secrets.env",
"hunter_io": {
"enabled": false,
"api_key_env": "HUNTER_API_KEY",
The script accesses a shared secrets file under $HOME/.clawdbot/secrets.env during setup, which constitutes credential discovery behavior. In the context of a lead-enrichment skill that aggregates external data sources, probing for available commercial API credentials increases risk because it expands visibility into the user's broader secret inventory without explicit consent.
# Check for optional premium source API keys
PREMIUM_SOURCES_FOUND=false
if [ -f "$HOME/.clawdbot/secrets.env" ]; then
if grep -q "HUNTER_API_KEY" "$HOME/.clawdbot/secrets.env" 2>/dev/null; then
echo " ✓ Hunter.io API key found"
PREMIUM_SOURCES_FOUND=true
This grep checks whether HUNTER_API_KEY exists in a global secrets file, revealing the presence of a credential unrelated to minimal setup needs. Even without exfiltrating the value, enumerating available secrets can aid later misuse or normalize unauthorized inspection of sensitive files.
# Check for optional premium source API keys
PREMIUM_SOURCES_FOUND=false
if [ -f "$HOME/.clawdbot/secrets.env" ]; then
if grep -q "HUNTER_API_KEY" "$HOME/.clawdbot/secrets.env" 2>/dev/null; then
echo " ✓ Hunter.io API key found"
PREMIUM_SOURCES_FOUND=true
fi
This check enumerates the presence of CLEARBIT_API_KEY in a shared secrets file, which is unnecessary for safe setup and exposes metadata about the user's secret holdings. Credential-presence discovery is sensitive because it can be combined with social engineering, follow-on code changes, or user profiling.
echo " ✓ Hunter.io API key found"
PREMIUM_SOURCES_FOUND=true
fi
if grep -q "CLEARBIT_API_KEY" "$HOME/.clawdbot/secrets.env" 2>/dev/null; then
echo " ✓ Clearbit API key found"
PREMIUM_SOURCES_FOUND=true
fi
This line probes for APOLLO_API_KEY in a global secrets file, continuing the same pattern of unauthorized secret inventorying. The skill context makes this more concerning because sales-intelligence tooling naturally benefits from premium data sources, creating incentive to opportunistically discover and use existing credentials.
echo " ✓ Clearbit API key found"
PREMIUM_SOURCES_FOUND=true
fi
if grep -q "APOLLO_API_KEY" "$HOME/.clawdbot/secrets.env" 2>/dev/null; then
echo " ✓ Apollo API key found"
PREMIUM_SOURCES_FOUND=true
fi
The skill explicitly instructs users to run shell scripts (setup.sh, enrich.sh, batch.sh, export.sh) but does not declare an allowed tool scope or permissions boundary. In an agent environment, this creates ambiguity about what command execution is expected and can lead to overbroad shell access, making misuse or accidental execution of unsafe commands more likely.
The skill is designed to collect, infer, store, and package personal and contact data about third parties, including likely email addresses, social profiles, recent activity, and talking points, but it does not prominently warn users about the privacy and compliance implications. In this context, the omission is significant because the skill encourages dossier-building and outreach workflows that can easily cross legal, policy, or ethical boundaries.
The skill directly promotes piping enriched lead records into a CRM via HTTP POST without an explicit warning that this transmits third-party personal data to an external system. Because the exported data may include inferred emails, social profiles, activity, and company intelligence, silent onward transfer increases privacy, compliance, and data-governance risk.
The example command sends enriched lead data to an external endpoint with curl, which constitutes outbound transmission of potentially sensitive personal data. While CRM export is a legitimate use case, the context makes this dangerous because users may copy-paste the pattern without understanding that dossier contents are being exfiltrated from the local environment to a third-party service.
./scripts/export.sh --format json enriched/*.json |
curl -X POST https://your-crm.com/api/leads -d @-
## Config
This section enables contact discovery, including pattern-based email guessing and MX verification, which materially increases the privacy sensitivity of the skill. In a lead-enrichment and outreach context, this can facilitate profiling and contact inference about individuals without explicit notice or consent, making misuse for unsolicited outreach or bulk targeting more likely.
The config enables saving enriched lead dossiers to disk by default, including contact info, social profiles, recent activity, and raw sources, without any explicit warning or stronger safeguards. In this skill's context, the stored data is potentially sensitive personal and business intelligence, so default local persistence increases risk of unintended retention, local compromise, or secondary misuse.
The skill metadata promises real multi-source enrichment, but the implementation explicitly returns fabricated mock data. In a lead-enrichment context, this can mislead downstream automation, sales decisions, CRM records, and user trust because the output looks authoritative despite not being sourced from real external systems.
The script accepts LinkedIn input and the skill description advertises LinkedIn-based enrichment, but no LinkedIn parsing or enrichment is performed. In this context, unsupported inputs can cause silent misoperation or misleading outputs, especially when users rely on the tool for automated prospect research.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
if ! command -v "$tool" &> /dev/null; then
echo "⚠ Prerequisite missing: '$tool'. Please install it to continue."
# On macOS: brew install jq
# On Debian/Ubuntu: sudo apt-get install jq
exit 1
fi
done
The setup script reads an unrelated global secrets file in the user's home directory to detect third-party API keys. Even though it only checks for key names and does not print secret values, this is still credential discovery against a broader secret store outside the skill's own configuration boundary, which violates least privilege and normal user expectations.
This section constrains output style options, including one described for cold outreach, but it does not require a specific human language or locale. Because SQP-3 is limited to language/locale policy violations, this does not clearly meet the rule and is low confidence.
This JSON manifest includes natural-language notes describing automatic behaviors such as 'Auto-enrich leads that reach QUALIFIED state' and 'POST enriched leads to your CRM after processing' without clarifying the exact triggering conditions, exclusions, or user control boundaries. In a manifest/config context, this can make invocation scope ambiguous and increase the risk of unintended automatic execution.
The script exposes flags for talking points, depth, and refresh, but these options do not influence output. While not a direct code-execution flaw, this is still security-relevant deception in an automation skill because operators may assume controls like refresh or output depth are functioning when they are not.
The script performs a file write when --output is provided, but there is no prior warning in comments or usage text that running the skill can overwrite a local file path. Under the code-file criteria, file writes should have some form of user disclosure unless clearly covered by the skill description; here the write behavior is only implicit in the flag name and success message after the fact.
No suspicious patterns detected.