Dev.to Security 🔐 Cybersecurity 👁 2 📖 2 min read

Software Supply Chain Security: It’s Not Just About Version Numbers Anymore

We’ve all been there — go get or npm install, watch the spinner spin, and trust it’s all what you expect. That trust is exactly where attackers slip in. The Discovery Moment A few months back, I thought "p

We’ve all been there — go get or npm install, watch the spinner spin, and trust it’s all what you expect. That trust is exactly where attackers slip in.

The Discovery Moment

A few months back, I thought "pin versions" was enough. Then I dug into SBOMs (Software Bill of Materials) and realised: a version number tells you what you asked for — not what actually arrived. I could see a release said v1.2.3, but an SBOM scan showed the binary contained code that didn't match the public repository. That was my wake-up call. Supply chain attacks don't target your code — they target the code you don't write but rely on anyway.

✅ My 3 Practical Tips

1. 🔐 Pin by hash, not just version

Versions get overwritten, tags move, and mirrors can be compromised. A cryptographic hash means exactly this bytes-and-nothing-else.

  • Go: go mod vendor + verify hashes; Go 1.21+ caches modules by hash automatically
  • Why it works: If a bad actor replaces v1.2.3 with malicious code, the hash changes — your build fails instead of shipping malware
  • Start small: Add hash pinning to your critical path dependencies this week — everything else can wait

2. 📝 Generate and review an SBOM — it's simpler than it sounds

An SBOM is just a complete inventory: what you're using, where it came from, and its provenance. You can't protect what you don't know you have.

  • Tooling: syft or cyclonedx — one command, zero config needed for most projects
  • Don't drown: Start by just answering: "Which 10 dependencies pull in the most other code?" That's your high-risk list
  • Education angle: An SBOM isn't compliance paperwork — it's your visibility. You can't fix a vulnerability in something you didn't know you were using

3. 🧪 Layer lightweight checks — don't wait for "the perfect pipeline"

You don't need enterprise-grade tooling. Combine three quick checks:

Check What it catches Effort
Hash verification Tampered packages One-time setup
SBOM diffs Unexpected/new dependencies appearing Run on each PR
Nuclei/Semgrep Known vulnerabilities in what you ship 30-second CI step

Key insight: No single tool catches everything. Hash pinning catches tampering but not old vulnerabilities. SBOMs show you the inventory but don't tell you if it's safe. Use them together.

🎯 The Big Takeaway

Supply chain security isn't about becoming paranoid — it's about knowing what you ship and being confident it hasn't changed since you reviewed it. Version numbers are a promise. Hashes plus SBOMs are proof. You don't need to do everything at once — pick one tip today, apply it to one project, and build from there.

💬 Over to you: What's one dependency in your stack you've never actually checked the provenance of? Let me know in the comments — let's learn together.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.