Skip to content
← Home

Blog

Notes on supply chain security

Attack post-mortems, technical explainers, and product notes focused on npm and Python. Named attacks, specific dates, no filler.

More posts

  • Attack post-mortem

    shai-hulud: the npm worm that propagates through postinstall scripts

    Self-replicating npm worms scrape publish tokens from infected developer machines and use them to publish malicious versions of every package those tokens can reach. Here is the propagation pattern, why it scales, and what reduces the blast radius.

    3 min read

  • Technical explainer

    How npm resolves transitive dependencies

    A practical walk-through of npm’s dependency resolver: how SemVer ranges become resolved versions, when nested copies appear in node_modules, and why reading a package-lock.json diff is the only reliable supply-chain review.

    3 min read

  • Technical explainer

    How pip’s dependency resolver picks versions

    pip’s backtracking resolver is what decides which version of every Python package gets installed. Here is how it works, what changed in pip 20.3, and how to make builds reproducible with hashed lockfiles.

    3 min read

  • Technical explainer

    Reading a package-lock.json: what every field actually means

    The lockfile is the source of truth for what your build will install. A field-by-field walk-through of package-lock.json so the next thousand-line lockfile diff in code review is readable in minutes.

    3 min read

  • Technical explainer

    Why CI should run `npm ci`, not `npm install`

    npm ci installs strictly from package-lock.json with integrity verification on every package. A small command change with outsized benefits for build reproducibility, performance, and supply-chain hygiene.

    3 min read

  • Security research

    Typosquat naming patterns on PyPI: a taxonomy

    PyPI typosquats follow a small set of recurring patterns: transposition, omission, hyphenation variants, prefix and suffix insertion, abandoned-name resurrection. Here is the catalog and what each pattern looks like in the wild.

    3 min read

  • Technical explainer

    Reproducible Python builds with hash-pinned requirements

    pip-compile --generate-hashes plus pip install --require-hashes gives you the Python equivalent of npm ci: byte-identical wheels across machines and refusal to install if any artifact’s hash does not match.

    3 min read

  • Technical explainer

    SBOM formats explained: SPDX, CycloneDX, and SWID

    Three Software Bill of Materials formats compete for the same shelf. Here is what each format is good at, where it is used, and how to pick one without overthinking it.

    4 min read

  • Security research

    How long do malicious npm packages stay live?

    A research note on detection latency for malicious npm packages: median windows of hours for high-profile cases, days-to-weeks for the long tail, with the data caveats. The implication for defense planning is structural.

    4 min read

  • Technical explainer

    A field guide to malicious npm postinstall script patterns

    npm postinstall is the most common code-execution surface for malicious packages. A taxonomy of the patterns observed in the wild — credential exfiltration, downloaded payloads, obfuscated runtime, conditional triggers — and what reliably catches each one.

    3 min read

  • Technical explainer

    npm audit — what it catches and what it misses

    npm audit checks against known CVE databases and misses every zero-day supply chain attack. Here's exactly what npm audit does, its false positive problem, and how to use it correctly.

    3 min read

  • Technical explainer

    How Veln Consensus works

    Veln Consensus compares the hash of every package you download against other Veln users worldwide. Here's how it detects targeted attacks that few other tools can catch.

    3 min read

  • Technical explainer

    Securing GitHub Actions from supply chain attacks

    GitHub Actions workflows are a prime target for supply chain attacks. Here's how to secure your npm and Python installs, pin action versions, and use Veln in CI.

    2 min read

  • Attack post-mortem

    The colors and faker.js incident

    In January 2022, the developer of colors.js and faker.js deliberately shipped broken, infinite-loop versions of both packages. Here's what happened and what it means for supply chain trust.

    3 min read

  • Technical explainer

    How to respond to a supply chain compromise

    Your CI pipeline installed a malicious npm or Python package. Here's the exact incident response process: what to investigate, what to rotate, and how to prevent recurrence.

    3 min read

  • Technical explainer

    Sigstore root of trust explained: how keyless signing works

    Sigstore replaces long-lived signing keys with short-lived OIDC-issued certificates and a public transparency log. This is the foundation under npm provenance and PyPI Trusted Publishing — here is how the trust chain actually works.

    4 min read

  • Technical explainer

    uv vs pip vs poetry for security

    uv, pip, and poetry have different security properties. Here's a comparison of lockfile security, hash verification, and supply chain protections for each Python package manager.

    3 min read

  • Attack post-mortem

    The node-ipc protest-ware incident

    In March 2022, the node-ipc npm package was modified to delete files on computers in Russia and Belarus. Here's what happened, why it was unprecedented, and what it means for supply chain trust.

    3 min read

  • Technical explainer

    npm provenance and Sigstore

    npm now supports build provenance via Sigstore. Here's what it is, how it works, what attacks it prevents, and where it leaves gaps that Veln fills.

    3 min read

  • Technical explainer

    How to write a secure npm package

    If you publish npm packages, here's how to protect your account, secure your CI publishing pipeline, avoid patterns that trigger security scanners, and use npm provenance.

    2 min read

  • Technical explainer

    Securing Dockerfile Python builds

    A deep dive into securing Python package installs in Docker: multi-stage builds, non-root users, read-only filesystems, Buildkit secrets, and Veln in CI.

    2 min read

  • Technical explainer

    Supply chain security for ML and AI projects

    ML and AI projects are uniquely exposed to supply chain attacks: large dependency trees, frequent new packages, cloud credentials, and model weights. Here's how to protect them.

    3 min read

  • Security research

    Maintainer account compromise: how attackers actually get in

    A taxonomy of the vectors observed across documented npm and PyPI account-takeover incidents: phishing, credential reuse, expired domains, session-token theft, OAuth grants, and social-engineered handoffs. Each with what mitigates it.

    5 min read

  • Attack post-mortem

    The SolarWinds attack explained for developers

    SolarWinds is the most famous supply chain attack. Here's what actually happened, how it compares to npm and PyPI attacks, and what lessons apply to package manager security.

    3 min read

  • Technical explainer

    Python virtual environments and security

    Python virtual environments isolate packages between projects but don't protect against malicious packages. Here's what venv actually does for security and what additional steps are needed.

    3 min read

  • Technical explainer

    npm scopes and private packages

    npm scopes (@company/package) are your first line of defense against dependency confusion attacks. Here's how to configure them correctly and what can still go wrong.

    2 min read

  • Security research

    The cooling period as defense: academic foundations

    The cooling-period idea — refuse to install brand-new versions until they have been published long enough and observed enough — has a long history in academic literature. Here are the threads of research and why two thresholds beat one.

    5 min read

  • Attack post-mortem

    The aiocpa malicious npm update

    In November 2024, aiocpa — a Python library for the CryptoPay API — had a malicious update published that exfiltrated seed phrases and private keys. Here's the full breakdown.

    3 min read

  • Technical explainer

    Understanding Veln's trust score

    Veln assigns a trust score from 0–100 to every package install. Here's exactly what signals contribute to the score, what drives each verdict, and how to interpret the results.

    3 min read

  • Technical explainer

    How to read a Veln security report

    When Veln blocks or warns on a package, it produces a detailed report. Here's how to read every section of the report and decide what to do next.

    2 min read

  • Technical explainer

    Malicious packages targeting AWS credentials

    AWS credentials are the most commonly targeted secret in npm and PyPI supply chain attacks. Here's the specific patterns attackers use, why AWS is targeted, and how to protect your credentials.

    3 min read

  • Technical explainer

    The open-source maintainer burnout problem

    Abandoned and under-maintained npm and PyPI packages are a primary supply chain attack vector. Here's why maintainer burnout creates security risk and what developers can do about it.

    3 min read

  • Technical explainer

    npm and PyPI private registry security

    Private npm and PyPI registries (Artifactory, Nexus, Verdaccio) introduce unique security risks. Here's how to configure them securely and what Veln adds.

    3 min read

  • Technical explainer

    Least-privilege npm tokens

    npm automation tokens with full account access are the norm. Here's how to use granular npm access tokens, scope them to specific packages, and limit the blast radius if a token is stolen.

    2 min read

  • Technical explainer

    How CI caching affects supply chain security

    CI caches for npm and Python can persist malicious packages across builds and across time. Here's which caching strategies are safe, which are risky, and how to configure them correctly.

    2 min read

  • Technical explainer

    Network egress monitoring for supply chain attacks

    Monitoring outbound network traffic from your CI pipelines and developer machines is one of the most effective after-the-fact detections for supply chain attacks. Here's how to set it up.

    2 min read

  • Technical explainer

    The semantic versioning security trap

    Using ^ and ~ in package.json lets npm automatically install new minor and patch versions. Here's why this creates a supply chain attack surface and how to use semver safely.

    2 min read

  • Technical explainer

    First-party vs third-party risk in npm

    Transitive npm dependencies are the primary supply chain attack surface, not direct dependencies. Here's why, how deep dependency trees amplify risk, and what to do about it.

    2 min read

  • Technical explainer

    Verifying Python package metadata before installing

    Before installing a Python package, you can verify its publisher, release history, download counts, and source code. Here's a step-by-step manual verification process and what Veln automates.

    2 min read

  • Technical explainer

    Package manager shell escapes

    npm lifecycle scripts and Python build hooks execute shell commands. Here's how the shell execution works, what escape vectors exist, and how Veln catches shell-based supply chain attacks.

    2 min read

  • Technical explainer

    The supply chain attack surface of LLM-generated code

    LLMs like GPT-4 and Claude sometimes recommend npm and Python packages that don't exist. Attackers register those package names. Here's the risk and how to protect yourself.

    3 min read