SK-I-01instrumentSystems & Security

trace-npm

What does an npm install really touch?

2026-08-21alpha on npmrepository ↗npm package ↗

npm now asks you to approve install scripts. Nothing tells you what they do.

Human

trace-npm runs one lifecycle script under a syscall tracer and reports what it read, what it spawned and what it contacted — including, in its demonstration capture, the planted credential that took the bait.

npx trace-npm run --package suspect --script postinstall

Evidence, not verdicts: the output is a record of observed behaviour with its blind spots attached.

Technical

The instrument executes the target script inside a controlled environment while a syscall tracer records filesystem reads, process spawns and network endpoints. The resulting trace is normalised into an inspectable report: every touched path, every child process, every contacted host, each with its raw syscall line preserved.

The demonstration capture below replays a recorded run against a package whose postinstall was planted with a credential-harvesting payload. The decoy key is read forty-one milliseconds after the script starts.

PLATE 01A recorded postinstall, replayed
t · 0ms — 0 / 0 eventsrecorded capture · replayed locally
    capture: recorded once, replayed as data tracer: strace -f -ttt events: 24 · flagged: 2 duration: 300ms package: planted postinstall payload
    Scrub the time axis. At t = 41ms the script reads the decoy key; at t = 78ms two kilobytes leave the machine. The install exits 0 and reports success.

    Full

    Provenance. The package name and publication history are preserved. Originally developed in Sekiya’s Systems & Security area; ownership transferred to Joshua’s personal GitHub profile on 2026-09-15 and it is no longer Sekiya-owned or Sekiya-developed work. This page is kept as a historical reference, not a current Sekiya research listing.

    Blind spots. The tracer sees one process tree on one kernel; behaviour gated on environment, time or remote state may not fire during a run. A clean report is an absence of observed behaviour, not evidence of absence.

    SK-I-01 · instrument · Systems & Security · first published 2026-08-21
    source: joshuadefreitas/trace-npm