restatedev / restatedev/sdk-rust

Add automated dependency license checking with cargo-deny

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
85
Forks
27
Avg merge
6d 20h
Merged PRs (30d)
2

Description

Context

As part of an OSS license due diligence review, we found that this repository has no automated mechanism to verify that dependency licenses are acceptable. The restate server repo already uses cargo-deny successfully — this issue tracks adding the same for sdk-rust.

Note: The justfile comment on the lint target currently says "Runs all lints (fmt, clippy, deny)" but no deny target actually exists — the comment is stale/aspirational.

Recommended approach

1. Add deny.toml

Use the restate server's deny.toml as a starting template. The SDK's allowlist can likely be more restrictive since there are no weak-copyleft deps currently:

[licenses]
allow = [
    # Permissive
    "MIT",
    "Apache-2.0",
    "Apache-2.0 WITH LLVM-exception",
    "BSD-2-Clause",
    "BSD-3-Clause",
    "ISC",
    "BSL-1.0",
    "CC0-1.0",
    "Zlib",
    "Unicode-3.0",
    "Unicode-DFS-2016",
    "OpenSSL",
    "0BSD",
]
confidence-threshold = 0.8
2. Add CI workflow

Either add a dedicated deps.yml workflow or integrate into the existing CI:

- uses: EmbarkStudios/cargo-deny-action@v2
  with:
    command: check licenses
3. Update justfile

Add a deny target and wire it into lint:

deny:
    cargo deny check
    
lint: check-fmt clippy deny

Why this matters

This repository is MIT-licensed and published as a crate on crates.io. Users pull in its transitive dependencies. An automated license gate ensures no strong copyleft (GPL, AGPL, SSPL) dependencies accidentally enter the dependency tree through routine updates.

Current state (as of 2026-03-16)

All current dependencies are permissively licensed — this is purely a preventive measure.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the restate server's deny.toml with the proposed SDK allowlist, then inspect the existing CI workflow and justfile. Add deny.toml, run cargo deny check licenses, and wire the cargo-deny action and deny target into lint. Done means dependency license checks pass locally and in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ci-cd, security, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.