Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rust binary support #1435 #1488

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Conversation

AyanSinhaMahapatra
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra commented Dec 30, 2024

Add support for parsing rust binaries (#1435):

  • Add a new optional step (Rust) in the deploy_to_develop pipeline to map rust binaries to rust source files
  • Add support for parsing rust binaries using rust-inspector at https://pypi.org/project/rust-inspector/0.1.0/
    • Add support for getting symbols from rust binaries (elf)
    • Add support for getting packages and dependencies from rust binaries (which are built using cargo-auditable)

* Add support to get packages from rust binaries
* Add support for rust source to binary mapping using symbols

Reference: #1435
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
We were failing on the d2d pipelines if we uploaded a single binary
on the to side, as the d2d pipeline requires uploading an archive only.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
We were having a lot of extra logger lines in certain cases previously
on selecting wrong options, as the traceback was being shown in the log
too. So this creates a warning instead of a log entry.

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Copy link
Contributor

@tdruez tdruez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good looks good, I've added a few suggestions.
Also, make sure to always include new pipe and pipeline modules in the documentation.

scanpipe/pipes/symbolmap.py Outdated Show resolved Hide resolved
scanpipe/pipes/symbolmap.py Outdated Show resolved Hide resolved
scanpipe/pipes/symbolmap.py Outdated Show resolved Hide resolved
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
@AyanSinhaMahapatra
Copy link
Member Author

All green, thanks for the reviews @tdruez 😄 Merging!

@AyanSinhaMahapatra AyanSinhaMahapatra merged commit 7b00d3f into main Jan 6, 2025
9 checks passed
@AyanSinhaMahapatra AyanSinhaMahapatra deleted the add-rust-binary-support branch January 6, 2025 12:06
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.

back2source: Extend ScanCode.io pipeline for Rust source and binaries
2 participants