Skip to content

Security: mayankcodes-dev/flight-shield

Security

SECURITY.md

Security Policy

Supported Versions

Only the latest minor release line receives security fixes and patches:

Version Supported Notes
3.4.x Supported Active security and bug fixes
3.0.x – 3.3.x Upgrade Upgrade to ^3.4.1 for latest fixes
< 3.0 Unsupported No longer maintained

Reporting a Vulnerability

Please do not open a public GitHub issue, pull request, or discussion for security vulnerabilities.

Report suspected vulnerabilities privately using GitHub Private Vulnerability Reporting.

Please include:

  • Affected version(s) of flight-shield and Node.js runtime version
  • Description of the vulnerability and its security impact
  • Minimal reproduction or proof of concept (keys, payloads, cache setup)
  • Any suggested mitigation, if known

Response and Disclosure Process

  1. Acknowledgment: You will receive a response within 72 hours confirming receipt.
  2. Triage & Fix: If confirmed, a patch release will be prepared and verified alongside regression tests.
  3. Coordinated Disclosure: A patched npm release (with GitHub Actions provenance when published via CI) and a GitHub Security Advisory (and CVE where applicable) will be published before public details are shared.

Security Model and Scope

flight-shield runs purely in-process with zero runtime dependencies, no network clients, and no filesystem I/O. Security guarantees depend on the following boundaries:

  • Key Isolation & Multi-Tenancy: SingleFlight, StampedeShield, and BatchFlight isolate work strictly by key. Callers in multi-tenant applications must include tenant/user authorization context inside keys (for example, tenant:${tenantId}:user:${id}) to prevent cross-tenant data sharing.
  • Shared-Reference Mutation (clone): By default (clone: false), coalesced callers share the resolved object reference. Enable clone: true (or supply a custom clone function) whenever callers mutate returned objects.
  • Key Serialization Safety: serializeKey applies type tags (string, number, bigint, date, regexp, set, map), tracks circular references via WeakMap, and guards unreadable property getters to avoid collisions and uncaught traversal crashes.
  • Memory Bounds: MemoryCacheAdapter enforces an upper maxEntries limit with LRU eviction and lazy expiration so stale entries cannot grow unbounded in memory.
  • Out of Scope: Security of external CacheAdapter backends (Redis, Memcached), upstream database drivers, or user-supplied loader / batchFn callbacks.

There aren't any published security advisories