MCPcopy
hub / github.com/garrytan/gstack / generateCanary

Function generateCanary

browse/src/security.ts:272–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270 * URLs, file writes (per Codex review tension #2 — canary covers all channels).
271 */
272export function generateCanary(): string {
273 // 12 hex chars = 48 bits of entropy, astronomically low collision.
274 return `CANARY-${randomBytes(6).toString('hex').toUpperCase()}`;
275}
276
277/**
278 * Append the canary instruction to a system prompt. Claude is told never to

Calls

no outgoing calls

Tested by

no test coverage detected