Skip to content

Rust pipeline - #2204

Open
chinyeungli wants to merge 74 commits into
mainfrom
1767_rust_pipeline
Open

Rust pipeline#2204
chinyeungli wants to merge 74 commits into
mainfrom
1767_rust_pipeline

Conversation

@chinyeungli

@chinyeungli chinyeungli commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Issues

Changes

  • Added the dedicated pipeline for Rust
    • It takes a single PURL as an input (cargo type)
    • Downloads the crate sources
    • Run scans and determine if there's any license mismatch between "declared licenses" and "detected licenses"
    • Builds the crate source in a container and determines which files are actually used based on the generated .d files.
      • If the build succeeds, the source files are placed under codebase/from/ and the built artifacts under codebase/to/.
    • Identifies the project's source repo and compare if there's any differences between the source repo and source crates

Samples:

I used pkg:cargo/rand@0.7.2 as a sample.

The source crate files are put under the codebase/from

Screenshot 2026-08-06 140923

and the built files are put under codebase/to

Screenshot 2026-08-06 142052

If there is a license mismatch issue, a small red alert sign will be put next to the PURL
Screenshot 2026-08-06 140945

A comparison summary and issue info are put under the extra_data tab
Screenshot 2026-08-06 140849

(The logic behind detected_codebase_license is to collect all license expressions detected in the codebase, deduplicate them, and join them using AND. In the sample, the entire codebase is under (mit OR apache-2.0) and contains one apache‑2.0 license file and one mit license file. Therefore, the final detected_codebase_license becomes (mit OR apache-2.0) AND apache-2.0 AND mit)

Checklist

  • I have read the contributing guidelines
  • I have linked an existing issue above
  • I have added unit tests covering the new code
  • I have reviewed and understood every line of this PR

chinyeungli and others added 30 commits March 13, 2026 13:19
 - Get the input and extract content into the from/ codebase.
 - Build the source and place the built files into the to/ codebase.
 - Run scans.
 - Identify sources in from/ that are used in the build.

Signed-off-by: Chin Yeung Li <tli@nexb.com>
…ses detected in the codebase #1767

 * Introduce new "LICENSE_ISSUE" tag
 * License deduplication/simplification is not working well; work in progress

Signed-off-by: Chin Yeung Li <tli@nexb.com>
This commit is for testing purpose and is definitely not ready.

Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
 * Use Docker for building instead of Cargo
 * Accept only one PURL as input
 * Use the .rlib found in .d files for D2D mapping
 * Remove unnecessary code

Signed-off-by: Chin Yeung Li <tli@nexb.com>
 * Add comparison logic
 * Add tests
 * Update extra_data fields
 * Better code organization
 * etc..

Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: Rishabh Rohil <rishabhrohil024@gmail.com>
Signed-off-by: Rishabh Rohil <rishabhrohil024@gmail.com>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: OmAnand857 <allansmith2561@gmail.com>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: Aayush Kumar <code@aayushk.dev>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
tdruez and others added 25 commits August 5, 2026 18:48
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: Mrityunjay Raj <mr.raj.earth@gmail.com>
Signed-off-by: Prajakta Kamble <prajuu2812@gmail.com>
Signed-off-by: dikshaa2909 <dikshadeware@gmail.com>
… docstring (#2184)

Signed-off-by: Prajakta Kamble <prajuu2812@gmail.com>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
Comment thread scanpipe/pipes/utils.py Fixed
chinyeungli and others added 3 commits August 6, 2026 16:20
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Chin Yeung <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
…et supoorted in matchcode #1767

Signed-off-by: Chin Yeung Li <tli@nexb.com>
@chinyeungli
chinyeungli requested a review from tdruez August 6, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t-rust: Design and implement Scancode.io pipeline for a single Rust package

10 participants