<?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: Shantanu Sharma</title>
    <description>The latest articles on DEV Community by Shantanu Sharma (@shantanu_sharma_22c430781).</description>
    <link>https://dev.to/shantanu_sharma_22c430781</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1592633%2Fe0671f98-7c59-4a57-b763-0c79c1065e54.png</url>
      <title>DEV Community: Shantanu Sharma</title>
      <link>https://dev.to/shantanu_sharma_22c430781</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shantanu_sharma_22c430781"/>
    <language>en</language>
    <item>
      <title>How I built forgeseal to solve JS/TS supply chain security in one command</title>
      <dc:creator>Shantanu Sharma</dc:creator>
      <pubDate>Fri, 13 Mar 2026 14:02:40 +0000</pubDate>
      <link>https://dev.to/shantanu_sharma_22c430781/how-i-built-forgeseal-to-solve-jsts-supply-chain-security-in-one-command-3om3</link>
      <guid>https://dev.to/shantanu_sharma_22c430781/how-i-built-forgeseal-to-solve-jsts-supply-chain-security-in-one-command-3om3</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The EU Cyber Resilience Act hits enforcement in September 2026, and it requires SBOMs (Software Bills of Materials) for every software product. If you ship to Europe, this isn't optional.&lt;br&gt;
For JavaScript and TypeScript teams, the supply chain security toolchain is fragmented. You need separate tools for SBOM generation, artifact signing, provenance attestations, and vulnerability management. Each has its own configuration, its own assumptions about your setup, and most of them struggle with the variety of JS/TS lockfile formats (npm v2/v3, yarn classic, yarn berry v2/v3/v4, pnpm v6/v9, bun text and binary).&lt;/p&gt;

&lt;p&gt;So I built forgeseal, one tool that does all of it.&lt;/p&gt;
&lt;h2&gt;
  
  
  What forgeseal Does
&lt;/h2&gt;

&lt;p&gt;forgeseal is a single Go binary that handles the entire supply chain security workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;forgeseal pipeline &lt;span class="nt"&gt;--dir&lt;/span&gt; ./my-project &lt;span class="nt"&gt;--output-dir&lt;/span&gt; ./artifacts &lt;span class="nt"&gt;--vex-triage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one command:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Detects and parses&lt;/strong&gt; your lockfile (supports all six JS/TS formats)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generates a CycloneDX SBOM&lt;/strong&gt; with proper PURLs, integrity hashes, and dependency graphs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signs the SBOM&lt;/strong&gt; with Sigstore keyless signing (no GPG keys to manage)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creates a SLSA v1 provenance attestation&lt;/strong&gt; with CI environment metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queries OSV.dev&lt;/strong&gt; and generates a VEX document with vulnerability triage stubs&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install&lt;/span&gt;
go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/sn45/forgeseal/cmd/forgeseal@latest

&lt;span class="c"&gt;# Generate an SBOM&lt;/span&gt;
forgeseal sbom &lt;span class="nt"&gt;--dir&lt;/span&gt; ./my-project

&lt;span class="c"&gt;# Full pipeline&lt;/span&gt;
forgeseal pipeline &lt;span class="nt"&gt;--dir&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--output-dir&lt;/span&gt; ./forgeseal-output &lt;span class="nt"&gt;--vex-triage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each command is also available standalone. Need just the SBOM? &lt;br&gt;
Use &lt;code&gt;forgeseal sbom&lt;/code&gt; &lt;br&gt;
Just signing? &lt;code&gt;forgeseal sign&lt;/code&gt; &lt;br&gt;
Just VEX triage? &lt;code&gt;forgeseal vex triage&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Lockfile Parser Challenge
&lt;/h2&gt;

&lt;p&gt;The most interesting engineering challenge was parsing all six lockfile formats correctly. Each one has quirks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm&lt;/strong&gt; has v2 and v3 schemas with different key structures in &lt;code&gt;package-lock.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yarn Classic&lt;/strong&gt; uses a custom text format that requires a state machine parser&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yarn Berry&lt;/strong&gt; looks like YAML but has its own conventions for resolution and checksums&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pnpm v9&lt;/strong&gt; splits data across &lt;code&gt;packages&lt;/code&gt; and &lt;code&gt;snapshots&lt;/code&gt; maps that need cross referencing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bun&lt;/strong&gt; uses JSONC (JSON with comments) where base64 hashes can contain &lt;code&gt;//&lt;/code&gt; sequences that look like comment markers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I validated forgeseal against 10 major open source projects: socket.io, jest, storybook, vue, astro, nuxt, svelte, next.js, elysia, and hono. That's 15,000+ components across all six formats. PURLs, dependency edges, and integrity hashes all matched the source lockfiles.&lt;/p&gt;
&lt;h2&gt;
  
  
  CI Integration
&lt;/h2&gt;

&lt;p&gt;forgeseal ships as a GitHub Action:&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="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sn45/forgeseal@v1&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pipeline&lt;/span&gt;
    &lt;span class="na"&gt;dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.'&lt;/span&gt;
    &lt;span class="na"&gt;sign&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;true'&lt;/span&gt;
    &lt;span class="na"&gt;attest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;true'&lt;/span&gt;
    &lt;span class="na"&gt;vex-triage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;true'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In GitHub Actions, the OIDC token for Sigstore signing is obtained automatically. Just set &lt;code&gt;permissions: id-token: write&lt;/code&gt; on your workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qko2a3lle0vi2xfdwv7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qko2a3lle0vi2xfdwv7.png" alt="marketing poster tall" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The core pipeline is solid. On the roadmap: container image SBOM support, Grype/Trivy integration for richer vulnerability data, and a &lt;code&gt;forgeseal audit&lt;/code&gt; command that evaluates your project's supply chain security posture against CRA requirements.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/sns45/forgeseal" rel="noopener noreferrer"&gt;github.com/sns45/forgeseal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apache 2.0 licensed. Contributions welcome.&lt;/p&gt;

</description>
      <category>security</category>
      <category>javascript</category>
      <category>go</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
