← Lab /Security & privacy

Snapshot-based Elastic Agent detects npm cooldown removals that log tailing misses

Using Elastic Agent’s CEL integration reliably detects when the npm min-release-age setting is removed from developer workstations, whereas filestream cannot.

Security & privacy Elastic Security Labs 7 Aug 2026 Method Deployed evidence

Published as “The security signal log tailing can't see: tracking npm cooldown removals with Elastic Agent”

Why it matters

Enables security teams to monitor npm cooldown adoption and spot attempts to bypass supply-chain defenses on developer workstations.

Summary

The team built a ~40-line CEL integration in Elastic Agent that snapshots each .npmrc file every six hours. When the min-release-age line disappears, the ingest pipeline marks cooldown.absent = true, providing a removal signal that filestream’s append-only model cannot produce. They also added an agent-side script to strip auth tokens before transmission. The approach runs on several hundred macOS hosts with low data volume, though detection latency is limited to the 6-hour heartbeat interval.

What they found 3

  1. Filestream does not emit events when the min-release-age line is removed

    “Filestream emits on append, not on removal”

  2. CEL snapshots generate a cooldown.absent signal when the key disappears

    “the next snapshot has no key; the dashboard shows the transition. That is the removal signal filestream could not produce.”

  3. Small files under 1024 bytes require native file identity to be ingested

    “A 22-byte .npmrc will never grow, so the data never moves.”

Caveats 5

  • The detection latency for a removal is the heartbeat interval, 6 hours in our case.
  • Increasing the heartbeat frequency dramatically raises document volume (up to a thousand-fold at 1 s intervals) with no added signal.
  • Detection latency is limited to the 6-hour heartbeat interval.
  • High-frequency snapshots generate large volumes of unchanged documents.
  • Windows variant has not yet been deployed.

What’s new here 4

  • Implemented a CEL snapshot integration that polls .npmrc files every 6 hours.
  • Demonstrated that filestream cannot emit events for line removals in small config files.
  • Added an agent-side JavaScript processor to filter out npm auth tokens before they leave the host.
  • Introduced a heartbeat model to keep adoption dashboards accurate over time.