From 9c78565c54d1f954224508f1f0b3e9377a2f5e71 Mon Sep 17 00:00:00 2001 From: psandana <1194304+psandana@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:44:44 -0300 Subject: [PATCH] fix(ci): verify downloaded documentation tools Pin SHA-256 digests for the existing mdBook and mdbook-linkcheck release archives. Check each archive before extraction and fail on HTTP errors. Keep the tool versions unchanged and quote writes to GITHUB_PATH. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 36ce5c31-ff70-4dc0-ada2-79a9b4bbd22d --- .github/workflows/common.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 3f57f0a..def43ac 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -16,8 +16,10 @@ jobs: - name: Install mdBook run: | mkdir -p ~/.local/bin - curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.local/bin - echo "$HOME/.local/bin" >> $GITHUB_PATH + curl --fail --location --silent --show-error https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz -o mdbook.tar.gz + echo "9ef07fd288ba58ff3b99d1c94e6d414d431c9a61fdb20348e5beb74b823d546b mdbook.tar.gz" | sha256sum --check --strict + tar xzf mdbook.tar.gz -C ~/.local/bin + echo "$HOME/.local/bin" >> "$GITHUB_PATH" - name: Linting Markdown Files uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0 @@ -38,10 +40,11 @@ jobs: - name: Install mdbook-linkcheck run: | mkdir -p mdbook-linkcheck - curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck/mdbook-linkcheck.zip + curl --fail --location --silent --show-error https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck/mdbook-linkcheck.zip + echo "18cebca9493804b307b39a44af2664cdfa881e84b8d92a94205d6c51572318ef mdbook-linkcheck/mdbook-linkcheck.zip" | sha256sum --check --strict unzip -d ./mdbook-linkcheck mdbook-linkcheck/mdbook-linkcheck.zip chmod +x mdbook-linkcheck/mdbook-linkcheck - echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH + echo "$PWD/mdbook-linkcheck" >> "$GITHUB_PATH" - name: Build run: mdbook build