<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ohigs</title>
    <description>The latest articles on DEV Community by ohigs (@ohigs).</description>
    <link>https://dev.to/ohigs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4285363%2F6b40d438-62bb-4367-9dd3-b02a0472acad.jpg</url>
      <title>DEV Community: ohigs</title>
      <link>https://dev.to/ohigs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ohigs"/>
    <language>en</language>
    <item>
      <title>Fixing Trivy Debian, Ubuntu and Alpine Backport False Positives Deterministically</title>
      <dc:creator>ohigs</dc:creator>
      <pubDate>Sat, 05 Dec 2026 19:48:25 +0000</pubDate>
      <link>https://dev.to/ohigs/fixing-trivy-debian-ubuntu-and-alpine-backport-false-positives-deterministically-1hb3</link>
      <guid>https://dev.to/ohigs/fixing-trivy-debian-ubuntu-and-alpine-backport-false-positives-deterministically-1hb3</guid>
      <description>&lt;p&gt;If you scan Debian, Ubuntu, Alpine, RHEL, or Amazon Linux container images in CI, you have probably triaged this alert: a scanner flags an OpenSSL or glibc CVE against your base image, you check &lt;code&gt;apt-cache policy&lt;/code&gt; or the Debian Security Tracker, and the package is already patched.&lt;/p&gt;

&lt;p&gt;That alert is a backport false positive.&lt;br&gt;
It happens because stable Linux distributions backport security patches without bumping upstream minor version numbers.&lt;/p&gt;
&lt;h2&gt;
  
  
  How upstream version ranges misclassify patched Linux packages
&lt;/h2&gt;

&lt;p&gt;Look at this real Trivy JSON (schema v2) finding against a Debian 12.5 container image (from &lt;code&gt;fixtures/trivy-debian-backport.json&lt;/code&gt; in &lt;code&gt;osty-dev/supply-chain-benchmark&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"VulnerabilityID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"CVE-2024-5535"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"PkgName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"openssl"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"InstalledVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"3.0.11-1~deb12u2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"FixedVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"3.0.12"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"fixed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MEDIUM"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"openssl: SSL_select_next_proto buffer overread"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same report flags &lt;code&gt;libssl3&lt;/code&gt; at &lt;code&gt;3.0.11-1~deb12u2&lt;/code&gt; against upstream &lt;code&gt;FixedVersion: "3.0.12"&lt;/code&gt;.&lt;br&gt;
Any tool that compares the upstream prefix (&lt;code&gt;3.0.11 &amp;lt; 3.0.12&lt;/code&gt;) against NVD CPE ranges concludes the container is vulnerable.&lt;/p&gt;

&lt;p&gt;In reality, the Debian security team backported the fix for &lt;code&gt;CVE-2024-5535&lt;/code&gt; into &lt;code&gt;3.0.11-1~deb12u2&lt;/code&gt; while preserving the &lt;code&gt;3.0.11&lt;/code&gt; ABI so existing binaries do not break.&lt;br&gt;
You can check the installed Debian revision directly inside any running image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dpkg-query -W -f=&lt;span class="s1"&gt;'${Package} ${Version}\n'&lt;/span&gt; openssl libssl3
dpkg --compare-versions 3.0.11-1~deb12u2 ge 3.0.11-1~deb12u2 &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"patched"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every major enterprise Linux distribution uses its own authoritative backport feed and package version ordering:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Distribution&lt;/th&gt;
&lt;th&gt;Authoritative backport feed&lt;/th&gt;
&lt;th&gt;Version comparison semantics&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Debian&lt;/td&gt;
&lt;td&gt;Debian Security Tracker / OVAL&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;dpkg&lt;/code&gt; epoch, upstream, and Debian revision (&lt;code&gt;~deb12u2&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ubuntu&lt;/td&gt;
&lt;td&gt;Ubuntu Security Notices (USN) / OVAL&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;dpkg&lt;/code&gt; version ordering with &lt;code&gt;ubuntu&lt;/code&gt; revision suffix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alpine&lt;/td&gt;
&lt;td&gt;Alpine SecDB&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;apk&lt;/code&gt; version comparison with &lt;code&gt;-rN&lt;/code&gt; release suffix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RHEL / UBI&lt;/td&gt;
&lt;td&gt;Red Hat CSAF / OVAL&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;rpm&lt;/code&gt; epoch-version-release (&lt;code&gt;EVR&lt;/code&gt;) comparison&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon Linux&lt;/td&gt;
&lt;td&gt;Amazon Linux Security Advisories (ALAS)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;rpm&lt;/code&gt; &lt;code&gt;EVR&lt;/code&gt; comparison scoped to AL2 / AL2023&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When a scanner falls back to NVD CPE matching, misidentifies the base OS inside a distroless or multi-stage image, or ingests an SBOM that stripped the distro qualifier (&lt;code&gt;pkg:deb/debian/openssl@3.0.11-1~deb12u2?distro=debian-12&lt;/code&gt;), backport truth is lost and false positives return on every build.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three controls that stop backport false positives
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Preserve distro PURL qualifiers in your SBOMs
&lt;/h3&gt;

&lt;p&gt;Configure your SBOM generator to emit full distro package URLs including the release qualifier (&lt;code&gt;?distro=debian-12&lt;/code&gt;, &lt;code&gt;?distro=alpine-3.19&lt;/code&gt;, &lt;code&gt;?distro=ubuntu-22.04&lt;/code&gt;).&lt;br&gt;
Stripping the revision suffix or flattening OS packages into generic CPEs forces downstream vulnerability trackers back into upstream version comparison.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Separate builder-stage packages from runtime images
&lt;/h3&gt;

&lt;p&gt;Multi-stage Dockerfiles install compilers, headers, and build tools in a &lt;code&gt;builder&lt;/code&gt; stage and copy only the compiled binary into a minimal runtime stage.&lt;br&gt;
Scanning the repository or intermediate build layers instead of the final runtime image and deployed workload surfaces CVEs for packages that never ship to production.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Verify against distro feeds and record VEX provenance
&lt;/h3&gt;

&lt;p&gt;Before opening a remediation PR or blocking a deploy, check each OS-package CVE against the distro's own feed (Debian OVAL, Ubuntu USN, Alpine SecDB, RHEL CSAF, Amazon Linux ALAS) using native package-version comparison (&lt;code&gt;dpkg&lt;/code&gt;, &lt;code&gt;apk&lt;/code&gt;, &lt;code&gt;rpm&lt;/code&gt;).&lt;br&gt;
Record &lt;code&gt;not_affected&lt;/code&gt; verdicts with traceable VEX provenance so the same finding does not resurface on the next CI run.&lt;/p&gt;

&lt;p&gt;Three quick ways to test this on your own Trivy JSON output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste a Trivy JSON report or lockfile into &lt;a href="https://osty.dev/tools/backport-check" rel="noopener noreferrer"&gt;osty.dev/tools/backport-check&lt;/a&gt; to check backport status locally in your browser without uploading files.&lt;/li&gt;
&lt;li&gt;Inspect &lt;code&gt;fixtures/trivy-debian-backport.json&lt;/code&gt; in &lt;a href="https://github.com/osty-dev/supply-chain-benchmark" rel="noopener noreferrer"&gt;osty-dev/supply-chain-benchmark&lt;/a&gt;, which contains the &lt;code&gt;CVE-2024-5535&lt;/code&gt; finding on Debian 12 &lt;code&gt;openssl 3.0.11-1~deb12u2&lt;/code&gt; alongside scenario &lt;code&gt;a07&lt;/code&gt; (zero actionable alerts on the patched build, one alert on the unpatched build of the same upstream version).&lt;/li&gt;
&lt;li&gt;Connect Claude Code, Cursor, or Codex to the free read-only public MCP endpoint at &lt;code&gt;https://mcp.osty.dev/mcp&lt;/code&gt; and call &lt;code&gt;check_cve_backport&lt;/code&gt; before letting an agent bump your base image.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next steps when a CVE is unpatched
&lt;/h2&gt;

&lt;p&gt;When the distro feed confirms a vulnerability is unpatched, run two more checks before upgrading:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Compiler reachability:&lt;/strong&gt; Check whether production code actually calls the vulnerable symbol using native compiler call graphs rather than string-matching imports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ABI and license safety:&lt;/strong&gt; Check whether the patched version raises the ELF &lt;code&gt;glibc&lt;/code&gt; symbol floor above your target host (for example, &lt;code&gt;GLIBC_2.34&lt;/code&gt; on a &lt;code&gt;glibc 2.31&lt;/code&gt; node) or changes the package license.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Applying those three filters in order - distro backport truth, runtime lineage, and compiler reachability - removes most container alert noise while keeping real, reachable upgrades at the top of the queue.&lt;br&gt;
See &lt;a href="https://osty.dev/see" rel="noopener noreferrer"&gt;osty.dev/see&lt;/a&gt; and &lt;a href="https://osty.dev/benchmarks" rel="noopener noreferrer"&gt;osty.dev/benchmarks&lt;/a&gt; for the test fixtures and methodology.&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Blocking Malicious npm postinstall Scripts and Slopsquatted Packages Before Install</title>
      <dc:creator>ohigs</dc:creator>
      <pubDate>Sat, 05 Dec 2026 19:48:15 +0000</pubDate>
      <link>https://dev.to/ohigs/blocking-malicious-npm-postinstall-scripts-and-slopsquatted-packages-before-install-2gfc</link>
      <guid>https://dev.to/ohigs/blocking-malicious-npm-postinstall-scripts-and-slopsquatted-packages-before-install-2gfc</guid>
      <description>&lt;p&gt;Most teams rely on a CVE scanner in CI to secure npm and Python dependencies.&lt;br&gt;
That workflow misses two attack classes that execute before any advisory exists: compromised packages published minutes before &lt;code&gt;npm ci&lt;/code&gt; runs, and hallucinated package names ("slopsquatting") registered by attackers targeting AI coding assistants.&lt;/p&gt;

&lt;p&gt;When a malicious &lt;code&gt;postinstall&lt;/code&gt; hook executes during &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;npm ci&lt;/code&gt;, it runs with the full privileges of the developer laptop or CI runner.&lt;br&gt;
It can read &lt;code&gt;.env&lt;/code&gt; files, &lt;code&gt;~/.ssh&lt;/code&gt;, &lt;code&gt;~/.aws/credentials&lt;/code&gt;, or &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; and exfiltrate them over DNS or HTTPS during the install step before your test suite even starts.&lt;br&gt;
By the time a CVE or GHSA advisory is published hours later, those credentials are already compromised.&lt;/p&gt;
&lt;h2&gt;
  
  
  Comparison of pre-install controls
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;Stops brand-new &lt;code&gt;postinstall&lt;/code&gt; malware&lt;/th&gt;
&lt;th&gt;Stops slopsquatting&lt;/th&gt;
&lt;th&gt;Breaks native addons (&lt;code&gt;sharp&lt;/code&gt;, &lt;code&gt;esbuild&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Works offline / air-gapped&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CVE-only scanner (Trivy, Grype, OSV-Scanner)&lt;/td&gt;
&lt;td&gt;No (requires prior advisory)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Partial (CVE DB sync)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Static AST heuristics (GuardDog, Socket)&lt;/td&gt;
&lt;td&gt;Partial (bypassed by obfuscation)&lt;/td&gt;
&lt;td&gt;Partial&lt;/td&gt;
&lt;td&gt;No (can raise noisy alerts)&lt;/td&gt;
&lt;td&gt;GuardDog yes; Socket SaaS no&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Global &lt;code&gt;ignore-scripts=true&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Partial (blocks install hooks, not import-time code)&lt;/td&gt;
&lt;td&gt;Yes (requires manual allowlist)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Release-age cooldown (3-7 days)&lt;/td&gt;
&lt;td&gt;Yes for auto-PRs; not manual installs&lt;/td&gt;
&lt;td&gt;No (attacker ages package)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Behavioral detonation + signed lockfile gate&lt;/td&gt;
&lt;td&gt;Yes (observes real egress and secret reads)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (differential baseline)&lt;/td&gt;
&lt;td&gt;Yes (signed local cache)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Four pre-install controls for CI and laptops
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Commit lockfiles, disable scripts where possible, and enforce release-age cooldowns
&lt;/h3&gt;

&lt;p&gt;Never run bare &lt;code&gt;npm install&lt;/code&gt; in CI.&lt;br&gt;
Use &lt;code&gt;npm ci --ignore-scripts&lt;/code&gt; on repositories that do not compile native addons, and set a release-age cooldown so automated dependency bots do not pull brand-new releases immediately.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;.npmrc&lt;/code&gt; for pure-JS repos:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="na"&gt;ignore-scripts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;renovate.json&lt;/code&gt; to enforce a 5-day cooldown across ecosystems (with a manual override path for CISA KEV fixes):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"minimumReleaseAge"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"5 days"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Isolate install steps from production secrets
&lt;/h3&gt;

&lt;p&gt;Keep cloud deploy keys and registry publish tokens out of the job that runs &lt;code&gt;npm ci&lt;/code&gt; or &lt;code&gt;pip install&lt;/code&gt;.&lt;br&gt;
In GitHub Actions, pin build and test jobs to &lt;code&gt;permissions: contents: read&lt;/code&gt; and move OIDC cloud credentials into a separate deployment job that consumes only the built artifact:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Gate lockfiles against behavioral detonation verdicts before install
&lt;/h3&gt;

&lt;p&gt;When your repository depends on native packages (&lt;code&gt;esbuild&lt;/code&gt;, &lt;code&gt;sharp&lt;/code&gt;, &lt;code&gt;sqlite3&lt;/code&gt;) and cannot set &lt;code&gt;ignore-scripts=true&lt;/code&gt; globally, static heuristics alone create noisy alerts while still missing obfuscated payloads.&lt;/p&gt;

&lt;p&gt;Behavioral detonation installs each new package release inside an ephemeral microVM sandbox (such as Firecracker) seeded with planted honey-secrets (fake AWS keys, fake &lt;code&gt;.npmrc&lt;/code&gt; tokens, fake SSH keys) and records actual DNS queries, HTTPS egress, and filesystem reads.&lt;br&gt;
To avoid false positives on legitimate packages that already compile native code, each release's trace is diffed against the previous clean version (a differential baseline) so only new suspicious behavior escalates.&lt;/p&gt;

&lt;p&gt;Consider a &lt;code&gt;package-lock.json&lt;/code&gt; that includes a package with &lt;code&gt;"hasInstallScript": true&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"node_modules/evil-postinstall-fixture"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1.2.3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"resolved"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://registry.npmjs.org/evil-postinstall-fixture/-/evil-postinstall-fixture-1.2.3.tgz"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"hasInstallScript"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the Apache 2.0 &lt;code&gt;osty&lt;/code&gt; CLI and &lt;code&gt;osty-dev/osty-action&lt;/code&gt;, you can gate &lt;code&gt;package-lock.json&lt;/code&gt;, &lt;code&gt;uv.lock&lt;/code&gt;, &lt;code&gt;requirements.txt&lt;/code&gt;, &lt;code&gt;go.sum&lt;/code&gt;, and &lt;code&gt;go.mod&lt;/code&gt; against Ed25519-signed verdicts before &lt;code&gt;npm ci&lt;/code&gt; executes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;supply-chain-gate&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;osty&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;osty-dev/osty-action@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;lockfile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;package-lock.json&lt;/span&gt;
          &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.osty/edge-cache.sqlite&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;osty verify&lt;/code&gt; reads Ed25519-signed verdicts from a local SQLite cache (or an imported &lt;code&gt;osty airgap export&lt;/code&gt; archive), makes zero outbound network calls during verification, requires no SaaS API token or write permissions, and fails closed if a package has no signed verdict.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Guard coding agents against slopsquatting
&lt;/h3&gt;

&lt;p&gt;AI coding assistants (Claude Code, Cursor, Codex, Antigravity) sometimes invent plausible package names that do not exist yet.&lt;br&gt;
Attackers monitor common LLM hallucinations and register those names on npm and PyPI with credential-stealing install scripts.&lt;/p&gt;

&lt;p&gt;Two rules close that gap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Require coding agents to run a lockfile gate (&lt;code&gt;osty verify --lockfile package-lock.json --json&lt;/code&gt;) before installing any newly added dependency.&lt;/li&gt;
&lt;li&gt;Instruct the agent to treat a non-zero exit code as a hard stop instead of weakening &lt;code&gt;.osty/policy.yaml&lt;/code&gt;.
The open-source &lt;code&gt;osty-security&lt;/code&gt; Agent Skill codifies those rules (&lt;code&gt;npx skills add osty-dev/agent-skills&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Reproduce locally on a poisoned lockfile fixture
&lt;/h2&gt;

&lt;p&gt;You can test the fail-closed lockfile gate locally in under a minute using the public benchmark repository (&lt;code&gt;osty-dev/supply-chain-benchmark&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install osty-dev/tap/osty
git clone https://github.com/osty-dev/supply-chain-benchmark.git
&lt;span class="nb"&gt;cd&lt;/span&gt; supply-chain-benchmark
scripts/verify-fixtures.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;fixtures/package-lock.json&lt;/code&gt; contains &lt;code&gt;benign-fixture@2.0.0&lt;/code&gt; alongside &lt;code&gt;evil-postinstall-fixture@1.2.3&lt;/code&gt;.&lt;br&gt;
With no signed verdict cached, &lt;code&gt;osty verify&lt;/code&gt; exits 1 and quarantines both packages; once a signed intelligence archive is imported, &lt;code&gt;evil-postinstall-fixture@1.2.3&lt;/code&gt; is blocked as &lt;code&gt;SUPPLY_CHAIN_VERDICT_CONFIRMED_MALICIOUS&lt;/code&gt; with the forensic reason in structured JSON.&lt;/p&gt;

&lt;p&gt;Full CLI reference and threat model details live at &lt;a href="https://osty.dev/guard" rel="noopener noreferrer"&gt;osty.dev/guard&lt;/a&gt; and &lt;a href="https://github.com/osty-dev/osty" rel="noopener noreferrer"&gt;github.com/osty-dev/osty&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>supplychain</category>
    </item>
  </channel>
</rss>
