Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add automated dependency license checking (Python + Rust)

Đang mở
#182 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, rust
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu bằng việc xem xét Cargo.toml và pyproject.toml, sau đó kiểm tra workflow CI hiện có để xác định nơi các bước kiểm tra dependency cần được đặt. So sánh các cách tiếp cận liccheck và pip-licenses được đề xuất cho Python, đồng thời thêm cargo-deny cho Rust bằng các policy về license đã liệt kê. Công việc được xem là hoàn tất khi CI kiểm tra cả hai hệ sinh thái, bao gồm các Python extras tùy chọn, và từ chối các license không được phép.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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. This is a hybrid Python + Rust (maturin/PyO3) project, so both ecosystems need coverage.

Recommended approach

Rust side: cargo-deny

Add a deny.toml alongside the existing Cargo.toml:

[licenses]
allow = [
    "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

Add to CI:

- uses: EmbarkStudios/cargo-deny-action@v2
  with:
    command: check licenses
Python side: liccheck or pip-licenses

Option A: liccheck — add a [tool.liccheck] section to pyproject.toml:

[tool.liccheck]
authorized_licenses = [
    "MIT License",
    "Apache Software License",
    "BSD License",
    "ISC License (ISCL)",
    "Python Software Foundation License",
    "Mozilla Public License 2.0 (MPL 2.0)",
]

Run as: liccheck -r <requirements-file>

Option B: pip-licenses — run as a CI step:

pip-licenses --allow-only="MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;PSF-2.0;MPL-2.0"
Note on the published wheel

The published restate-sdk wheel currently has dependencies = [] (zero Python runtime deps) — all deps are in optional extras ([openai], [adk], etc.). The Rust native extension has its dependencies statically compiled in. License checking is still valuable as a preventive measure and to cover the optional extras that users install.

Why this matters

An automated license gate ensures no strong copyleft (GPL, AGPL, SSPL) dependencies accidentally enter the dependency tree through routine updates to either the Rust or Python side.

Current state (as of 2026-03-16)

All current dependencies (146 Python, 113 Rust) are permissively licensed — this is purely a preventive measure.

Ngôn ngữ chính
Python
Star
81
Fork
22
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của restatedev/sdk-python

Tất cả issue của restatedev/sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.