Skip to content

Security: VarshuDev/internet-graveyard

Security

SECURITY.md

Security Policy

Supported Versions

Version Supported
1.0.x Supported
< 1.0 End of Life

Autonomous Bot & Archival Control Architecture (/bot)

Internet Graveyard features an internal, hardened Autonomous Bot & Archival Command Terminal located at the obfuscated route /bot for curating records, moderating user submissions, and orchestrating crawler/scraper pipelines.

Multi-Layer Security Architecture:

  1. Route Obfuscation & Decoy 404s:

    • The former /admin and /api/admin endpoints have been decommissioned into strict 404 decoys (notFound()) to defeat automated CMS bots and scanner wordlists.
    • The /bot endpoint is strictly excluded from all public navigation links, footers, search engines, and sitemaps with noindex, nofollow, noarchive, nosnippet robots directives.
  2. Timing-Safe Cryptographic Verification:

    • Secret key verification uses constant-time crypto.timingSafeEqual over SHA-256 digests. This prevents timing side-channel attacks from inferring secret characters or lengths.
  3. Cryptographically Signed HMAC-SHA256 Session Tokens:

    • Raw credentials are never stored in the client cookie.
    • Upon successful passkey authentication, an HMAC-SHA256 signed session token (timestamp.nonce.signature) is minted with an automatic 24-hour expiration window.
    • Cookies are issued with HttpOnly, SameSite=Strict, Path=/, and Secure (production) attributes.
  4. Brute-Force Rate Limiting & Lockout Defense:

    • The /api/bot/auth login endpoint enforces an in-memory IP rate limiter:
      • Maximum 5 failed attempts per IP within a 15-minute sliding window.
      • Exceeding the threshold triggers an automatic 15-minute lockout (429 Too Many Requests).
      • Failed attempts incur an artificial progressive defense delay to slow automated dictionary attacks.
  5. Cross-Origin Request Forgery (CSRF) & Origin Defense:

    • All state-changing methods (POST, PUT, DELETE) on /api/bot/* validate that the Origin or Referer headers match the verified host before processing.
  6. Backend API Guard:

    • Every request to /api/bot requires authentication.
    • Accepts tokens via Authorization: Bearer <TOKEN>, x-bot-token: <TOKEN>, or the graveyard_bot_session HTTP-Only cookie.
    • Any unauthorized request receives 401 Unauthorized.

Environment Variables:

  • BOT_SECRET_KEY (or ADMIN_SECRET_KEY / ADMIN_PASSKEY): Master passkey used to authenticate bot and curator sessions.
    • Must be supplied via private .env.local or host environment variables (e.g. Vercel).
    • If unset, the server dynamically generates an unguessable runtime crypto secret, strictly preventing any default or unauthorized access.

Reporting a Vulnerability

If you discover a security vulnerability within Internet Graveyard, please do not open a public issue.

Instead, please responsibly disclose it by emailing: [email protected] or submitting a private advisory via GitHub Security Advisories.

Please provide:

  • A description of the vulnerability and its potential impact.
  • Step-by-step instructions to reproduce the issue or proof-of-concept.
  • Any suggestions for mitigation or patching.

We will acknowledge receipt within 48 hours and work diligently to release a patch.

There aren't any published security advisories