T09 · Insecure Skill Coding Practices
- Location
SKILL.md:81- Finding
Arbitrary Command Execution Through Dot-Sourcing of .env.local
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s agency-search purpose is legitimate, but its documented fallback auth flow tells agents to execute a local .env file as shell code and can also send sensitive business intent to a third-party API without explicit minimization.
Review before installing. Prefer the ServiceGraph MCP/OAuth path, or require SERVICEGRAPH_API_KEY to already be present in the process environment. Do not let the agent source .env.local. For sensitive fundraising, IPO, crisis, legal, regulatory, healthcare, or unreleased launch details, ask the agent to build filters locally or confirm exactly what minimized text will be sent to ServiceGraph.
SKILL.md:81Arbitrary Command Execution Through Dot-Sourcing of .env.local
SKILL.md:207Potential Disclosure of Sensitive Business Intent to a Third-Party Translation Endpoint
The skill instructs the agent to source .env.local during execution, which is a credential-access pattern that can expose secrets if tool outputs, command traces, errors, or follow-on prompts leak environment contents into model-visible context. In an adversarial or poorly isolated harness, encouraging access to local secret files expands the attack surface and can normalize secret-handling behavior that other malicious skills could exploit.
.env.local:
( set -a; [ -f .env.local ] && . ./.env.local; set +a;
curl -sS -H "Authorization: Bearer $SERVICEGRAPH_API_KEY" \
'https://api.servicegraph.co/v1/datasets/pro_services/fields' )
The description says the skill should trigger not only on explicit agency-finding requests but also 'even when described indirectly' with examples like 'we need press' and 'manage our brand reputation.' These phrases are broad business-language expressions that can overlap with requests for strategy, writing, or general advice, increasing the risk of invoking this skill outside its intended scope.
The documentation says to 'never read .env* files' and to keep the token out of LLM context, but the very next example instructs using a shell wrapper that sources .env.local. That is an active contradiction in the skill's own guidance about how credentials should be accessed and creates ambiguity about whether the agent should touch local secret files.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
( set -a; [ -f .env.local ] && . ./.env.local; set +a;
curl -sS -H "Authorization: Bearer $SERVICEGRAPH_API_KEY" \
'https://api.servicegraph.co/v1/datasets/pro_services/fields' )
401 unauthorized, prompt the user: