Skip to content

Commit 10fb004

Browse files
rajbosCopilot
andcommitted
fix: pin Ollama install to versioned GitHub release with SHA256 verification
Replace unpinned \curl https://ollama.com/install.sh | sh\ (downloadThenRun) with a pinned download from the Ollama GitHub release v0.23.4, verified against its SHA256 hash before extraction. This eliminates the code-scanning alert for unverified remote script execution. - Pinned to: https://github.com/ollama/ollama/releases/download/v0.23.4/ollama-linux-amd64.tar.zst - SHA256: c0822ce85413647f8502862c7179740311f271fcff8f21d61c6d352729f4c28d - Extracts binary to /usr via: tar -I zstd -xf ... -C /usr Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c3fdc76 commit 10fb004

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/check-toolnames.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,14 @@ jobs:
256256

257257
- name: Install Ollama
258258
if: steps.extract.outputs.has_missing == 'true'
259-
run: curl -fsSL https://ollama.com/install.sh | sh
259+
env:
260+
OLLAMA_VERSION: "v0.23.4"
261+
OLLAMA_SHA256: "c0822ce85413647f8502862c7179740311f271fcff8f21d61c6d352729f4c28d"
262+
run: |
263+
curl -fsSL "https://github.com/ollama/ollama/releases/download/${OLLAMA_VERSION}/ollama-linux-amd64.tar.zst" -o ollama-linux-amd64.tar.zst
264+
echo "${OLLAMA_SHA256} ollama-linux-amd64.tar.zst" | sha256sum -c
265+
sudo tar -I zstd -xf ollama-linux-amd64.tar.zst -C /usr
266+
rm ollama-linux-amd64.tar.zst
260267
261268
- name: Start Ollama and ensure model is available
262269
if: steps.extract.outputs.has_missing == 'true'

0 commit comments

Comments
 (0)