Skip to content

feat(security): supply-chain security — SBOM, dependency pinning and provenance verification #867

Closed

Description

@0xDeon

feat(security): supply-chain security — SBOM, dependency pinning and provenance verification

📌 Overview

Nester's code is a small fraction of what actually runs in production — the rest is dependencies: Go modules, npm packages, Rust crates, Python packages, and the base images and CI actions that build and ship everything. Each is code Nester did not write but fully trusts, and the supply chain is one of the most actively exploited attack surfaces in modern software: a compromised package version, a typosquatted dependency, a malicious update to a transitive dependency, or a poisoned CI action can inject code that steals keys or drains funds, and it does so through the front door of the build where ordinary code review never looks. Issue #794 re-enables Dependabot for update automation, which is necessary but addresses only staying current — it does not address knowing exactly what is in the build, verifying it is what it claims to be, or preventing a malicious dependency from entering.

This issue builds supply-chain security: a Software Bill of Materials (SBOM) for every artifact, strict dependency pinning and integrity verification, provenance checks on dependencies and CI actions, and automated scanning that blocks known-vulnerable or suspicious dependencies before they ship. It hardens the part of the attack surface that code review cannot see.

🎯 Objectives

  • Generate a complete SBOM for every build artifact so what ships is fully known.
  • Pin dependencies and verify integrity so builds are reproducible and tamper-evident.
  • Verify provenance of dependencies and CI actions to resist supply-chain injection.
  • Scan for known-vulnerable and suspicious dependencies and block on policy.
  • Cover every ecosystem in the monorepo: Go, npm, Rust, Python, and CI/containers.

🧩 Requirements

Generate an SBOM (CycloneDX or SPDX format) for each deployable artifact — the Go API, the frontend, the intelligence service, and the contracts — enumerating every direct and transitive dependency with versions and hashes. The SBOM is produced in CI on every build and retained, so for any deployed version there is an exact, queryable record of its contents. When a new vulnerability is disclosed in some package, the SBOM answers "are we affected, and where?" in seconds instead of a frantic manual audit.

Pin and verify. Dependencies are pinned to exact versions with integrity hashes (Go's go.sum, npm lockfile with integrity, Cargo.lock, Python hashes), and the build verifies those hashes so a dependency whose content changed for a pinned version is rejected — this is what makes a build reproducible and tamper-evident. CI actions must be pinned to a commit SHA, not a mutable tag: a @v4 tag can be repointed to malicious code by whoever controls the action, while a SHA cannot. Audit the workflows (.github/workflows/) and pin every third-party action to a SHA.

Provenance verification where available: prefer dependencies and actions that publish build provenance/attestations, and verify them. For the highest-value dependencies, this raises assurance that the artifact was built from the claimed source. Document which dependencies have verified provenance and which are trusted on hash-pinning alone.

Automated scanning with policy gates: integrate vulnerability scanning across all ecosystems into CI (there is a security workflow at .github/workflows/security.yml and gitleaks config to build on), and define a policy — a known critical/high vulnerability in a production dependency blocks the merge/release until remediated or explicitly, auditably waived (a .vulnignore exists; ensure waivers are justified and time-bounded, not permanent silent suppressions). Add typosquat/suspicious-package detection for new dependencies so a malicious lookalike is caught at introduction.

Introduction control: adding a new dependency is a security decision. Require that new dependencies pass the scans and, for significant additions, a brief review of the package's provenance and health. This is process backed by CI gates, not a manual hope.

⚙️ Technical Notes

SBOM generation, scanning and provenance checks are primarily CI work in .github/workflows/ — extend .github/workflows/security.yml and the main CI (.github/workflows/ci.yml) and contract audit (.github/workflows/contract-audit.yml). Use ecosystem-appropriate tooling (document the chosen scanners/SBOM generators) covering Go modules, the frontend npm tree, the Rust contracts (Cargo), the Python intelligence service, and container base images. Pin all third-party actions to SHAs across every workflow. Coordinate with Dependabot (#794) so automated updates and this gating work together — Dependabot proposes updates, these gates verify them. The existing .gitleaks.toml/.gitleaksignore and .vulnignore are the starting policy surface; ensure ignore entries are justified and reviewed.

Document the supply-chain policy — SBOM retention, pinning rules, action-SHA requirement, scan gates, waiver process, and new-dependency review — in SECURITY.md.

Because most of this is CI/config, "tests" here means verifiable CI behavior: a build produces an SBOM artifact; a seeded known-vulnerable dependency fails the gate; an unpinned or SHA-mismatched action is flagged; a typosquat-shaped new dependency is caught; and a waiver requires justification. Validate these on a branch before merging.

📦 Expected Outcome

Every Nester build produces a complete, retained SBOM, so the exact contents of any deployed version are known and vulnerability exposure is answerable instantly. Dependencies across all ecosystems are pinned with verified integrity, CI actions are pinned to SHAs, and provenance is verified where available. Automated scanning blocks known-vulnerable and suspicious dependencies before they ship, with auditable, time-bounded waivers. Adding a dependency is a gated decision. The invisible supply-chain attack surface is brought under the same scrutiny as the code itself.

✅ Acceptance Criteria

  • An SBOM (CycloneDX/SPDX) is generated in CI for the API, frontend, intelligence service and contracts, and retained per build.
  • Dependencies are pinned with integrity hashes across Go, npm, Rust and Python, and builds verify them.
  • All third-party CI actions are pinned to commit SHAs, not mutable tags, across every workflow.
  • Provenance/attestations are verified where available, with the coverage documented.
  • CI vulnerability scanning covers all ecosystems and container base images and blocks on a known critical/high in a production dependency; a seeded-vulnerable-dependency test fails the gate.
  • Typosquat/suspicious-package detection flags a malicious lookalike on introduction.
  • Waivers (.vulnignore etc.) require justification and are time-bounded, not permanent silent suppressions.
  • The supply-chain policy is documented in SECURITY.md, and the CI behaviors above are verified on a branch.

🚨 Contribution Rule

  • All PRs MUST target the dev branch
  • PRs opened against main will be automatically rejected
  • Ensure your branch is created from dev

Activity

  1. added
    infrastructureFoundational scaffolding and tooling
    priority:highHigh priority - foundational work
    securitySecurity vulnerability or risk
    OSSOpen-source contribution issue — PR must branch off and target dev, all CI green
    on Jul 23, 2026
  2. DatboiCaleb commented on Jul 26, 2026

    @DatboiCaleb

    @DatboiCaleb has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

    Hi Good day Maintainer

    I'm a smart contract and full-stack developer who turns complex ideas into secure, production-ready blockchain code. With strong skills in Rust and Solidity, I build systems that are fast, safe, and built to last. My experience with the Stellar SDK and Soroban lets me ship real-world Web3 solutions that actually move value.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @DatboiCaleb to this issue.

  3. payfoxX commented on Jul 26, 2026

    @payfoxX
    Contributor

    @Myart352 has applied to work on this issue as part of the Stellar Wave Program's 7th wave.

    Hi! I'd like to work on #867 – Supply-chain security: SBOM, dependency pinning, and provenance verification.

    I'll implement the required supply-chain security improvements by extending the existing CI and security workflows to generate and retain SBOMs for all deployable artifacts, enforce dependency integrity verification across Go, npm, Rust, and Python, and pin all third-party GitHub Actions to immutable commit SHAs. Where supported, I'll integrate provenance verification and document the resulting trust model and coverage.

    I'll also strengthen the security gates by adding vulnerability scanning across all supported ecosystems and container images, enforcing policy-based failures for critical and high-severity production dependencies, validating waiver requirements, and introducing checks for suspicious or typosquatted dependencies. Finally, I'll document the complete supply-chain security policy—including SBOM retention, dependency pinning, action SHA requirements, scan gates, waiver process, and new dependency review—in SECURITY.md.

    Before opening the PR, I'll validate the CI behavior on a branch, including SBOM generation, vulnerability gate enforcement, action pinning verification, and other required acceptance criteria, and I'll ensure the PR targets the dev branch as required.

    I'd be happy to take this on.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Myart352 to this issue.

  4. drips-wave commented on Jul 26, 2026

    @drips-wave

    Congratulations, @Myart352! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on July 30, 2026.

    🧑‍💻 @Myart352: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  5. grantfox-oss commented on Aug 31, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @payfoxX's PR #1001 was approved and merged by @0xDeon.

    🏆 @payfoxX: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,126 total points). Track your full progress on GrantFox.

    👏 Great work, @payfoxX! Keep contributing to Suncrest-Labs.

  6. added a commit that references this issue on Aug 31, 2026
    343b081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OSSOpen-source contribution issue — PR must branch off and target dev, all CI greenStellar WaveIssues in the Stellar wave programinfrastructureFoundational scaffolding and toolingpriority:highHigh priority - foundational worksecuritySecurity vulnerability or risk

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions