Skip to content

Add cargo-deny supply-chain policy with denylist for unmaintained Soroban deps #1206

@Baskarayelu

Description

@Baskarayelu

Description

Soroban contracts inherit security posture from every transitive dependency in Cargo.lock. Add a deny.toml enforcing: no duplicate soroban-sdk versions, no GPL/AGPL licenses in dependencies, denylist of known-vulnerable crates, advisory database checks, and unmaintained-crate warnings. Wire into CI to fail PRs that regress the policy.

Requirements and context

  • Secure: cargo-deny runs in CI; advisory feed pinned to a known commit.
  • Tested: violation against a fixture branch produces failure.
  • Documented: docs/supply-chain-policy.md.
  • Reference: Cargo.toml, Cargo.lock.

Suggested execution

git checkout -b feature/cargo-deny-policy

  • Add deny.toml at repo root.
  • CI workflow step running cargo deny check.
  • Docs: docs/supply-chain-policy.md.
  • Rust doc comments are not applicable; document policy choices in markdown.
  • Validate that licenses, advisories, bans, and sources are all enforced.

Test and commit

Run cargo deny check. Cover edge cases: yanked versions, multi-version sdk, license drift. Include security note about transitive risk.

Example commit message

ci(supply-chain): add cargo-deny policy with advisory and license enforcement

Guidelines

  • Minimum 95% test coverage
  • Clear documentation in docs/supply-chain-policy.md
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentationsecuritySecurity hardening and auditssmart-contractSoroban/Rust smart contract worksorobanStellar Soroban specific

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions