Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-pin-cargo-llvm-cov.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Add --locked flag to cargo install cargo-llvm-cov in coverage.sh for reproducible installs
2 changes: 1 addition & 1 deletion scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -euo pipefail
# Check if cargo-llvm-cov is installed
if ! cargo llvm-cov --version &> /dev/null; then
echo "cargo-llvm-cov is not installed. Installing..."
cargo install cargo-llvm-cov
cargo install --locked cargo-llvm-cov
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

While the --locked flag ensures that transitive dependencies are pinned to the versions specified in the tool's Cargo.lock, it does not pin the version of cargo-llvm-cov itself. For truly reproducible and secure installs, the tool version should also be pinned (e.g., cargo install --locked --version 0.6.11 cargo-llvm-cov). Without this, the script will always install the latest version available on crates.io, which could introduce breaking changes or security vulnerabilities, partially defeating the purpose of the reproducibility and security goals stated in this pull request.

fi

# Run coverage and generate HTML report
Expand Down
Loading