T09 · Insecure Skill Coding Practices
- Location
searchch.py:144- Finding
Unsanitized Remote Directory Data Allows Terminal and Markdown Output Injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a straightforward search.ch Swiss phone-directory lookup skill with disclosed API key and network use, but users should be careful with personal contact data and persistent API-key storage.
Install only if you are comfortable sending lookup terms, locations, phone numbers, and your search.ch API key to search.ch. Avoid storing the API key in shell profile files on shared or heavily automated systems; use per-session environment variables, a gateway secret, or a secrets manager when possible. Treat returned names, addresses, emails, and websites as untrusted display data, especially if shown in Markdown-capable clients.
searchch.py:144Unsanitized Remote Directory Data Allows Terminal and Markdown Output Injection
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
ored in the SEARCHCH_API_KEY environment variable.
Temporary (current session):
export SEARCHCH_API_KEY="your-api-key-here"
Permanent (add to shell profile):
# For bash (~/.bashrc or ~/.bash_profile)
echo 'export SEARCHCH_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc
# For zsh (~/.zshrc)
echo 'export SEARCHCH_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrc
For Clawdbot Gateway:
Add to your gateway config or environment:
env:
SEARCHCH_API_KEY: "your-api-key-here"
echo $SEARCHCH_API_KEYCode accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_api_key() -> str:
"""Get API key from environment variable."""
key = os.environ.get("SEARCHCH_API_KEY")
if not key:
print("❌ Error: SEARCHCH_API_KEY environment variable not set", file=sys.stderr)
The skill requires environment access for an API key and network access to query an external API, but it does not declare an explicit tool scope such as permissions or allowed-tools. In agent environments, missing scope declarations can cause over-broad execution privileges, reduce auditability, and make it harder to constrain or review what the skill is allowed to access.
The skill is explicitly designed for person lookup and reverse phone number lookup, which can expose personal contact details and facilitate profiling or harassment if used without notice or safeguards. The context makes this more sensitive, not less, because the primary purpose includes searching individuals rather than only public business records.
The documentation recommends persisting an API key in shell profile files such as ~/.bashrc and ~/.zshrc without warning that these files may be broadly readable to local tools, accidentally committed, backed up, or exposed through support/debug workflows. This is not malware, but it does encourage long-lived credential storage in a less controlled location, increasing the chance of credential disclosure.
This code file performs an HTTP request to a third-party service using user-provided query and location values, but there is no confirmation prompt or user-facing disclosure at the point of transmission. Although network access is inherent to an API wrapper, the code does not visibly warn users that their inputs are being sent off-system, which matters because phone-directory lookups can contain personal data such as names, addresses, or phone numbers.
The search function sets lang to de by default, and the CLI mirrors that default, which means the tool forces a specific language unless the user notices and overrides it. The policy criteria call out locale or language defaults as violations when a specific language is imposed without explicit opt-in.
The printed status messages Keine Treffer gefunden and Treffer are always shown in German regardless of user preference. This is a natural-language policy issue because the interface language is fixed rather than selected by the user or tied to a documented, justified locale constraint.
No suspicious patterns detected.