T09 · Insecure Skill Coding Practices
- Location
scripts/swarm_runner.py:98- Finding
Arbitrary Environment Secret Disclosure Through a Configurable API Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This forecasting skill does what it claims, but its configurable API endpoint can expose chosen environment secrets and prompt data if a user runs an unsafe config.
Review this before installing if you may run configs from other people or use sensitive environment variables. Only run configs you trust, avoid direct api_key values in shared files, prefer official provider URLs or local Ollama, and keep agent counts and delays within a deliberate budget.
scripts/swarm_runner.py:98Arbitrary Environment Secret Disclosure Through a Configurable API Endpoint
scripts/swarm_runner.py:74Unbounded Agent Expansion and API Execution Permit Resource Exhaustion
The skill advertises executable usage that implies shell execution, file reads, environment variable access, and outbound network access, but it does not declare any explicit tool scope or permissions boundary. That omission can cause an agent or user to run the skill with broader capabilities than expected, increasing the risk of unintended command execution, data exposure from local files/env vars, or uncontrolled external requests.
The skill encourages sending target names, prices, and free-form context to external LLM providers, but the description does not warn users that this data leaves the local environment. In practice, users may include proprietary trading signals, internal research, or sensitive market context, creating an avoidable confidentiality and compliance risk when transmitted to third-party APIs.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
provider: groq # groq | openai | ollama
model: llama-3.3-70b-versatile
api_key_env: GROQ_API_KEY # env var name
base_url: https://api.groq.com/openai/v1/chat/completions # optional override
max_tokens: 150
delay_ms: 1200 # delay between requests
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
provider: groq # groq | openai | ollama
model: llama-3.3-70b-versatile
api_key_env: GROQ_API_KEY # env var name
base_url: https://api.groq.com/openai/v1/chat/completions # optional override
max_tokens: 150
delay_ms: 1200 # delay between requests
The function transmits target data, free-form context, and bearer credentials to a configurable remote endpoint, including an arbitrary base_url override, without any trust boundary checks, allowlisting, or prominent disclosure to the user at execution time. In a skill that may process proprietary market context or internal forecasting data, this creates a real exfiltration risk and can also leak API keys to attacker-controlled endpoints if the config is modified.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
base_urls = {
'groq': 'https://api.groq.com/openai/v1/chat/completions',
'openai': 'https://api.openai.com/v1/chat/completions',
'ollama': 'http://localhost:11434/v1/chat/completions',
}
url = api_config.get('base_url') or base_urls.get(provider, base_urls['groq'])
This POST sends the assembled prompt content, including target name, current price, and arbitrary context, to an external service. Because the destination can be overridden by configuration and the same request may include a bearer token, the call can become a data and credential exfiltration channel if the config is malicious or careless.
try:
if HAS_REQUESTS:
r = requests.post(url, json=payload, headers=headers, timeout=30)
r.raise_for_status()
data = r.json()
else:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
consensus_script = Path(__file__).parent / 'consensus.py'
if consensus_script.exists():
try:
proc = subprocess.run(
[sys.executable, str(consensus_script)],
input=json.dumps(consensus_input),
capture_output=True, text=True, timeout=10
This markdown file documents both an environment-variable key and a direct api_key field, but it does not warn users that putting API keys directly into config files can expose secrets through source control, logs, or shared files. Because this is a skill description file and the documented behavior affects credential privacy, a brief warning is warranted.
No suspicious patterns detected.