T05 · Unauthorized Access and Privilege Escalation
- Location
references/runtime-contract.md:20- Finding
Sensitive Backend Configuration Inspection May Expose API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
references/runtime-contract.md, lines 20-29
Vulnerability Type: Sensitive credential access without sufficient safeguards
Risk Level: MediumVulnerable Code Snippet
text ## Authentication The repository routes shown in this skill do not define a request-level API token. The backend itself requires server-side environment variables: - `LLM_API_KEY` - `LLM_BASE_URL` - `LLM_MODEL_NAME` - `ZEP_API_KEY` If requests fail with configuration errors, do not add client auth headers. Check the backend `.env`.A related recovery instruction appears at line 137:
text - check `ZEP_API_KEY`Technical Analysis
The live-backend troubleshooting workflow instructs the agent to check the backend
.envfile when configuration errors occur. Environment files commonly contain plaintext credentials and unrelated secrets. The instructions do not limit the operation to checking whether specific variables are present, require explicit operator authorization, or prohibit displaying secret values.An agent following this guidance could read the complete file and place
LLM_API_KEY,ZEP_API_KEY, or other credentials into its context, execution logs, tool results, or user-facing output. Accessing the values is unnecessary when a presence-only or redacted configuration check would be sufficient.Attack Path
- A user requests optional live backend execution.
- The backend returns a configuration error, or graph construction fails because a required variable is missing.
- The agent follows the runtime contract and opens the backend
.envfile. - The file exposes API keys and potentially other service credentials to the agent context.
- The values may subsequently appear in diagnostic output, transcripts, telemetry, or generated troubleshooting instructions.
- Anyone with access to those channels could reuse the credentials against the associated services.
Impact Assessment
Successful ex ...[truncated 523 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the instruction to inspect
.envwith a presence-only diagnostic procedure. - Require explicit operator approval before accessing any server-side configuration file.
- Prohibit agents from reading, logging, returning, or retaining secret values.
- Recommend a redacted command or administrative health check that reports only whether required variables are configured.
- Restrict checks to an allowlist such as
LLM_API_KEY,LLM_BASE_URL,LLM_MODEL_NAME, andZEP_API_KEY. - Ensure diagnostic output uses fixed redaction, such as
LLM_API_KEY=[SET], rather than partial secret values. - Store credentials in a dedicated secret manager rather than a broadly readable plaintext environment file.
- Apply least-privilege permissions to every backend credential and rotate any credential exposed to agent context or logs.
- Replace the instruction to inspect
