Skip to content

Commit

Permalink
Purge Cargo.lock files from Mariner dependencies (#6906)
Browse files Browse the repository at this point in the history
Cargo.lock files present in vendored dependencies will cause Component Governance to incorrectly scan those dependencies. Remove these files to prevent this.
  • Loading branch information
gordonwang0 authored Feb 13, 2023
1 parent 35ebb05 commit a7221fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edgelet/build/linux/package-mariner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export CARGO_HOME=${BUILD_REPOSITORY_LOCALPATH}/cargo-home
echo "Vendoring Rust dependencies"
cargo vendor vendor

# Purge Cargo.lock files from dependencies. These files are not necessary and will cause
# Component Governance to incorrectly scan them for issues.
find "$CARGO_HOME/registry/src/" -name "Cargo.lock" -exec echo "Deleting {}" \; -exec rm {} \;

# Configure Cargo to use vendored the deps
mkdir .cargo
Expand Down

0 comments on commit a7221fe

Please sign in to comment.