Back to skill

Security audit

Hybrid DB Health

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent database health check, but one documented fallback command can print full OpenAI and Pinecone API keys into logs or chat output.

Review this skill before installing. Its normal script is mostly scoped to health checks, but avoid using the documented manual grep command unless it is changed to a redacted presence check. If these commands have already been run in captured logs or agent transcripts, rotate exposed OpenAI or Pinecone keys.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:38
Finding

Manual Health Check Exposes OpenAI and Pinecone API Keys

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The skill instructs the agent to read a local .env file and grep for sensitive credential names, which directly accesses secrets during routine health checks. Even though the stated purpose is configuration validation, this creates a credential-access path that could expose API keys in command output, logs, tool traces, or downstream summaries, especially in an adversarial or multi-tenant agent environment.

Content

Scanner excerpt · SKILL.md (reported line 48)May include surrounding context.

bash
cd /home/Mike/.openclaw/workspace/rag-pinecone-starter
[ -f .env ] && grep -E '^(OPENAI_API_KEY|PINECONE_API_KEY)=' .env

If either key is blank, report as not connected yet.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/check_hybrid_db.sh (reported line 34)May include surrounding context.

sh
# RAG/Pinecone check
if [ -d "$RAG_DIR" ]; then
  env_file="$RAG_DIR/.env"
  if [ ! -f "$env_file" ]; then
    rag_status="WARN"
    rag_detail="Missing .env file"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/check_hybrid_db.sh (reported line 44)May include surrounding context.

sh
# RAG/Pinecone check
if [ -d "$RAG_DIR" ]; then
  env_file="$RAG_DIR/.env"
  if [ ! -f "$env_file" ]; then
    rag_status="WARN"
    rag_detail="Missing .env file"

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

This code reads API secrets directly from the .env file into shell variables. While done for a connectivity check, direct secret handling increases exposure risk because secrets may be inherited by subprocesses, captured in debugging/tracing, or accidentally surfaced through future logging or error-handling changes.

Content

Scanner excerpt · scripts/check_hybrid_db.sh (reported line 37)May include surrounding context.

sh
env_file="$RAG_DIR/.env"
  if [ ! -f "$env_file" ]; then
    rag_status="WARN"
    rag_detail="Missing .env file"
  else
    openai_key=$(grep -E '^OPENAI_API_KEY=' "$env_file" | head -n1 | cut -d= -f2-)
    pinecone_key=$(grep -E '^PINECONE_API_KEY=' "$env_file" | head -n1 | cut -d= -f2-)

Static analysis

No suspicious patterns detected.