How to fix: Honeycomb write key in source
Honeycomb events API keys grant ingest to specific datasets; long-lived classic keys can also read.
Why it matters
An exposed Honeycomb write key lets an attacker inject fake trace events to poison observability data, potentially hiding real errors or performance issues from your engineering team during an incident.
Honeycomb events API keys grant ingest to specific datasets; long-lived classic keys can also read.
How to fix it
- 1Rotate the key in the Honeycomb UI under Settings → API Keys
- 2Switch to environment-scoped keys with shorter TTLs
- 3Use classic keys only for ingest; never expose them in browser bundles
Code examples
Server-only Honeycomb instrumentation
// Only initialize Honeycomb server-side (API route, server component)
import { NodeSDK } from '@opentelemetry/sdk-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
const sdk = new NodeSDK({
traceExporter: new OTLPTraceExporter({
url: 'https://api.honeycomb.io/v1/traces',
headers: {
'x-honeycomb-team': process.env.HONEYCOMB_API_KEY!, // server-only
'x-honeycomb-dataset': 'production',
},
}),
});References
Detected automatically by VulnRadar. The check id is secret-honeycomb-write-key, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is Honeycomb write key in source?
- VulnRadar rates this high severity in the secrets category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id secret-honeycomb-write-key, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Honeycomb write key in source map to?
- It maps to CWE-798. In the OWASP Top 10 it falls under A07:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.