mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
fix(ci): bound opengrep installer downloads (#109089)
* fix(ci): bound opengrep installer downloads * test(ci): tighten opengrep installer guard --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -38,9 +38,13 @@ jobs:
|
||||
OPENGREP_VERSION: v1.22.0
|
||||
OPENGREP_INSTALL_SHA: f458d7f0d52cc58eae1ca3cf3d5caf101e637519
|
||||
run: |
|
||||
curl -fsSL --connect-timeout 30 --max-time 120 \
|
||||
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh" \
|
||||
| bash -s -- -v "$OPENGREP_VERSION"
|
||||
# Download first so a timed-out transfer cannot execute a partial installer.
|
||||
installer="$(mktemp "${RUNNER_TEMP}/opengrep-install.XXXXXX")"
|
||||
trap 'rm -f "$installer"' EXIT
|
||||
curl -fsSL --connect-timeout 10 --max-time 120 \
|
||||
-o "$installer" \
|
||||
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh"
|
||||
bash "$installer" -v "$OPENGREP_VERSION"
|
||||
echo "$HOME/.opengrep/cli/latest" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Verify opengrep
|
||||
|
||||
@@ -64,9 +64,13 @@ jobs:
|
||||
OPENGREP_VERSION: v1.22.0
|
||||
OPENGREP_INSTALL_SHA: f458d7f0d52cc58eae1ca3cf3d5caf101e637519
|
||||
run: |
|
||||
curl -fsSL --connect-timeout 30 --max-time 120 \
|
||||
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh" \
|
||||
| bash -s -- -v "$OPENGREP_VERSION"
|
||||
# Download first so a timed-out transfer cannot execute a partial installer.
|
||||
installer="$(mktemp "${RUNNER_TEMP}/opengrep-install.XXXXXX")"
|
||||
trap 'rm -f "$installer"' EXIT
|
||||
curl -fsSL --connect-timeout 10 --max-time 120 \
|
||||
-o "$installer" \
|
||||
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh"
|
||||
bash "$installer" -v "$OPENGREP_VERSION"
|
||||
echo "$HOME/.opengrep/cli/latest" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Verify opengrep
|
||||
|
||||
Reference in New Issue
Block a user