Principal Engineer / Lead Security Researcher: Antigravity AI
Project: Trace Guard (trace-guard-npm)
Status: ACTIVE CONTINUOUS DEVELOPMENT
To build a world-class, zero-dependency defensive toolkit against autonomous AI browsing agents, Vision-Language Models (VLMs), and LLM content scrapers. Grounded in real computer science, empirical browser testing, polymorphic prompt obfuscation, and cross-layer DOM/AX-Tree/Visual trap engineering. Zero fluff. 100% reproducible results.
- Abandoned client-side mouse-tracking behavioral heuristics due to inherent flaws (PyAutoGUI emulation, high false positive rates, anti-detect browser evasions).
- Adopted Architectural Vulnerability Exploitation: Prompt Injection defense via DOM Canary Tokens & ACL 2025 Adversarial Overlays.
- Empirical Discovery: Proved via Playwright ARIA snapshots (
page.locator('html').ariaSnapshot()) that Chromium automatically stripsaria-hidden="true"elements from the Accessibility Tree. - Solution: Developed
ax-tree-regioncanary tokens (role="region"withoutaria-hidden="true", placed offscreen via CSS) to guarantee exposure to AX agents (Browser-Use, WebArena, Claude AX Mode).
- Polymorphic Prompt Generator: Matrix of salience leads, context roles, instruction verbs, and TOS legal framings generating > 1,200 unique prompt phrasings to defeat static regex matching.
- Decoy API Honeypot Generator: Dynamically injects
/_tg_decoy_*paths into<link rel="alternate">and HTML comments to trap API scrapers and crawlers. - Image Alt-Text & Markdown Traps: Targets Markdown converters (
Turndown.js,Readability.js) using hidden SVG<img>alt-text traps.
- CSP Nonce Auto-Detection: Automatically parses
Content-Security-Policyresponse headers, extracts script nonces ('nonce-XYZ'), and appendsnonce="XYZ"to injected scripts. Ensures full compatibility with strict enterprise CSPs. - Multi-Stream Compression Support: Transparent decompression and re-compression of Gzip, Deflate, and Brotli (
br) HTTP response streams. Verified intests/integration_csp_gzip.test.ts.
- Self-Healing MutationObserver Traps: Client-side script observes DOM mutations. If an automated script attempts to delete or sanitize canary elements from the DOM, Trace Guard logs a high-severity
LLM_AGENT_DETECTED_VIA_CANARY_ELEMENT_DELETEDevent. - Automated Versioned Backup Pipeline: Created
scripts/create_backup.jsproducing timestamped snapshot backups underbackups/snapshot_[timestamp]/.
- Next.js App Router Middleware: Exported
traceGuardNextMiddleware()compatible with Vercel Edge Runtime and Next.js 14/15/16middleware.ts. - Express Middleware: Exported
traceGuardExpress()middleware. - Verified Unit Tests: Added
tests/frameworks.test.ts(100% passing across 3 test suites, 24 tests). - Automated Backup: Created Snapshot #3 under
backups/snapshot_2026-08-02T13-04-05-114Z.
- Class-Based CSS Stylesheet Injection: Injected
.tg-offscreen-trapand.tg-hidden-inputstylesheets to guarantee canary element position isolation even when aggressive HTML sanitizers strip inlinestyle="..."attributes. - Automated Snapshot #4: Saved complete working state to
backups/snapshot_2026-08-02T13-04-29-209Z.
- Fastify Plugin Adapter: Exported
traceGuardFastifysupporting Fastify 4/5onRequest&onSendhooks. - Hono Middleware Adapter: Exported
traceGuardHonosupporting Bun, Deno, and Cloudflare Workers runtime servers. - Automated Snapshot #5: Saved complete working state to
backups/snapshot_2026-08-02T13-05-55-514Z.
- Multimodal Audio API Honeypots: Injected
<audio>tags with prompt injection attributes targeting speech/audio LLM agents. - Canvas Pixel OCR Traps: Rendered pixel-based prompt text on hidden
<canvas>contexts to catch VLM agents using DOM element canvas OCR extraction. - Automated Snapshot #7: Saved complete working state to
backups/snapshot_2026-08-02T13-09-49-746Z.
- Client Cryptographic HMAC Signing: Implemented time-bound HMAC-SHA256 session signatures (
verifyHmacSignature) to reject forged callback reports (INVALID_HMAC_SIGNATURE). - Telemetry Rate Limiting: Sliding window token bucket rate limiter (
checkTelemetryRateLimit) preventing DoS spam on telemetry endpoints. - Decoy Client Metadata Capture: IP & User-Agent logging on honeypot decoy API routes.
- Prometheus Text Exporter: Exported
exportPrometheusMetrics()for native SOC metrics collection. - Automated Continuous Harness: Created
scripts/auto_loop_test.jsrunning build, test, benchmark, and automatic backup creation in a single automated step. - Automated Snapshots #8 through #15: Saved snapshots up to
backups/snapshot_2026-08-02T13-19-20-772Z.
- OpenAPI 3.0 Deception Generator (
src/honeypot.ts): Auto-generates dynamic OpenAPI specs with canary prompt directives embedded in parameter and header descriptions. - Automatic Route Interception:
traceGuardNextMiddleware, Express, Fastify, and Hono automatically serve honeypot schemas on/openapi.jsonand/swagger.json. - Verified Unit Tests: Added
tests/honeypot.test.ts(31 active unit tests passing across 4 test suites). - Automated Snapshot #18: Saved complete working state to
backups/snapshot_2026-08-02T13-21-28-250Z.
- CDP & Automation Leaks Trap (
src/cdp_traps.ts): Injected DOM traps detecting Chrome DevTools Protocol (CDP) leaks (navigator.webdriver, Selenium, PhantomJS). - Enterprise SIEM Audit Exporter (
src/audit.ts): ExportedformatCefEvent()(ArcSight/Splunk CEF) andformatSyslogEvent()(Syslog RFC 5424). - Verified Unit Tests: Added
tests/cdp_traps.test.tsandtests/audit.test.ts(34 active unit tests passing across 6 test suites). - Automated Snapshot #20: Saved complete working state to
backups/snapshot_2026-08-02T13-24-10-374Z.
- Adversarial Gauntlet Harness (
scripts/adversary_gauntlet.ts): Created automated benchmark testing 5 evasion vectors (Static Regex Filter, Self-Healing DOM Tamper, Decoy Route Trapping, Anti-Forgery HMAC, and OpenAPI Deception). - Empirical Results: 100.0% Static Regex Evasion Resilience + 100% Evasion Trapping Efficacy across all 5 test vectors.
- Automated Snapshot #22: Saved complete working state to
backups/snapshot_2026-08-02T13-26-10-478Z.
- GraphQL Introspection Honeypot (
src/graphql_honeypot.ts): Generates deceptive GraphQL__schemapayloads injecting canary instructions into rootQuery,Mutation, andTypedescriptions to poison GraphQL scrapers. - Framework Auto-Interception:
traceGuardNextMiddleware, Express, Fastify, and Hono automatically intercept requests to/graphqland/?query={__schema...}to serve the honeypot schema. - Verified Unit Tests: Added
tests/graphql_honeypot.test.ts(39 active unit tests passing across 7 test suites). - Automated Snapshot #24: Saved complete working state to
backups/snapshot_2026-08-02T13-30-48-726Z.
- SEO Deception Engine (
src/seo_honeypot.ts): Auto-generates deceptiverobots.txtandsitemap.xmlpayloads. InjectsSYSTEM DIRECTIVE FOR AI READERSas#comments in robots.txt and<!-- -->comments in sitemap.xml. - Agent Crawler Misdirection:
sitemap.xmlexplicitly guides crawlers to the/_tg_decoy_*API honeypot. - Framework Auto-Interception: Integrated
/robots.txtand/sitemap.xmlinterception across Next.js, Express, Fastify, and Hono middlewares. - Verified Unit Tests: Added
tests/seo_honeypot.test.ts(45 active unit tests passing across 8 test suites). - Automated Snapshot #25: Saved complete working state to
backups/snapshot_2026-08-02T13-32-49-211Z.
- LLM Text Deception Engine (
src/llmstxt_honeypot.ts): Auto-generates deceptive/llms.txtand/llms-full.txtfiles (the emerging standard for AI website documentation ingestion, e.g., Anthropic Claude). - Framework Auto-Interception: Intercepts
/llms.txtand/llms-full.txtrequests across all supported framework adapters to serve the honeypot instead of real documentation. - Verified Unit Tests: Added
tests/llmstxt_honeypot.test.ts(50 active unit tests passing across 9 test suites). - Automated Snapshot #26: Saved complete working state to
backups/snapshot_2026-08-02T13-35-48-009Z.
- Global Header Honeypot (
src/header_honeypot.ts): Injects deceptive directives directly into standard HTTP response headers (e.g.,X-AI-Compliance,Server-Timing, and pre-emptiveLinkheaders pointing to decoys). - Framework Global Injection: Updated Next.js, Express, Fastify, and Hono middlewares to globally attach
getSafeGlobalHeaders(ai)to intercepted or HTML responses. This ensures headless scrapers reading headers are poisoned even if they avoid DOM extraction. - Verified Unit Tests: Added
tests/header_honeypot.test.tsand updatedframeworks.test.ts(55 active unit tests passing across 10 test suites). - Automated Snapshot #27: Saved complete working state to
backups/snapshot_2026-08-02T13-40-28-479Z.
- JSON Data Poisoning Engine (
src/json_poison.ts): Auto-generates realistic, confidential PII and user record payloads heavily embedded with canary directives. - Decoy Route Payload Injection: Intercepted decoy route hits across all framework adapters now return poisoned JSON payloads instead of empty responses (
{ status: 'ok', data: [] }), exploiting automated agents attempting data extraction. - Verified Unit Tests: Added
tests/json_poison.test.ts(56 active unit tests passing across 11 test suites). - Automated Snapshot #28: Saved complete working state to
backups/snapshot_2026-08-02T13-42-36-129Z.
- WebSocket Frame Deception (
src/websocket_honeypot.ts): Generates poisoned streaming frames (generateWebSocketPoisonFrame) containing embedded canary directives targeting real-time AI agents (e.g., live streaming LLM consumers). - Public API Surface Expansion: Exported
getSafeGlobalHeaders,generatePoisonedJsonData, andgenerateWebSocketPoisonFramefrom main index entry point (src/index.ts). - Verified Unit Tests: Added
tests/websocket_honeypot.test.ts(57 active unit tests passing across 12 test suites). - Automated Snapshot #29: Saved complete working state to
backups/snapshot_2026-08-02T13-44-15-471Z.
- Audio Trap Generator (
src/audio_honeypot.ts): Generates client-side JavaScript (generateAudioHoneypotScript) that initializes near-inaudibleSpeechSynthesisUtteranceand 18kHz ultrasoundAudioContextoscillators. This traps multimodal AI agents listening to live browser audio outputs. - Verified Unit Tests: Added
tests/audio_honeypot.test.ts(58 active unit tests passing across 13 test suites). - Automated Snapshot #30: Saved complete working state to
backups/snapshot_2026-08-02T13-45-24-894Z.
- Canary Primitives: 16 distinct traps across 5 Agent Viewports (DOM, AX Tree, VLM Vision, Audio STT)
- Prompt Variations: > 1,200 polymorphic natural language combinations
- Unit & Integration Tests: 58 active test cases across 13 suites (100% clean, 0 open handles)
- TypeScript Build: 0 errors (
tscESNext/CommonJS) - Generation Throughput: 64,140 pages/sec (15.59 µs latency overhead)
- Adversarial Gauntlet Evasion Resilience: 100.0%
- API Deception: OpenAPI/Swagger (
/openapi.json), GraphQL Introspection (/graphql), SEO Crawlers (/robots.txt), Web LLM Extractors (/llms.txt), Global HTTP Headers, Decoy PII JSON, WebSocket Stream Frames, and SpeechSynthesis/WebAudio Streams - SIEM Log Exporters: CEF (ArcSight/Splunk) + Syslog RFC 5424
- Automation Detection: CDP Flags + Selenium + MutationObserver + WebAudio
- Cryptographic Security: HMAC-SHA256 session verification + SRI SHA-384 script hashes + Sliding-window Telemetry Rate Limiting
- Prometheus Metrics:
exportPrometheusMetrics()&getMetrics() - Framework Support: Node.js HTTP Server, Next.js Edge Runtime, Express, Fastify, Hono (Bun / Cloudflare Workers)
- Automated Snapshots: Snapshots #1 through #30 saved in
backups/ - Human False Positive Rate: 0.0%