- Location
- SKILL.md:117
- Finding
- Provider API Credentials Are Transmitted to a Third-Party Managed Relay## Vulnerability Details
**File Location**: `SKILL.md`, lines 117-127; managed destination defined at line 50
**Vulnerability Type**: Third-party credential exposure and excessive credential custody
**Risk Level**: High
### Evidence
```javascript
const RELAY_URL = 'https://relay.byokrelay.com';
```
```javascript
async function storeApiKey(relayUrl, token, provider, apiKey) {
// provider: 'openai' | 'anthropic' | 'google' | 'groq' | 'mistral' | 'openrouter'
const res = await fetch(`${relayUrl}/keys/${provider}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-relay-token': token
},
body: JSON.stringify({ key: apiKey }),
redirect: 'error'
});
return res.ok;
}
```
### Technical Analysis
The managed integration instructs applications to submit users' OpenAI, Anthropic, Google, Groq, Mistral, OpenRouter, or other provider API credentials to `relay.byokrelay.com`. This behavior is disclosed and is necessary for the advertised managed-relay architecture, but it creates an additional high-value credential custodian between the user and the model provider.
The audited project contains only documentation and a version file; it does not contain the managed relay implementation. Consequently, claims concerning AES-256-GCM encryption, key validation, access controls, retention, deletion, and the absence of credential logging cannot be independently verified from this artifact. TLS protects credentials in transit but does not prevent the relay service from accessing credentials during ingestion or provider authentication.
This design exceeds the privileges of direct server-side provider integration because an additional operator receives reusable billing credentials. The risk is particularly significant for organization-wide keys or keys without provider-side model, budget, project, or IP restrictions.
### Attack Path
1. An application developer follows
...[truncated 1352 chars]
- Remediation
- ## Remediation Suggestions
- Default sensitive, regulated, organization-wide, and high-volume deployments to a self-hosted relay or a backend-for-frontend that communicates directly with providers.
- Require explicit, informed consent before submission. Clearly identify the relay operator, data destination, credential retention policy, and incident-response process.
- Avoid absolute security statements unless they are technically enforced and independently verifiable.
- Publish the exact managed-relay source revision, deployment architecture, cryptographic design, and third-party audit results.
- Encrypt credentials using a managed KMS or HSM with strict separation between application and key-management permissions.
- Ensure credentials and authorization headers are excluded from application, proxy, tracing, analytics, and error logs.
- Support provider-scoped, project-scoped, budget-limited, and short-lived credentials where providers allow them.
- Provide auditable deletion, token revocation, credential rotation, and breach-notification mechanisms.
- Apply strict rate limits and anomaly detection to reduce the financial impact of credential or relay-token abuse.