Skip to content

Commit ee9bc9a

Browse files
authored
fix: harden cron and Workboard scheduling under load (#114564)
* fix: harden cron and Workboard scheduling under load * test: refresh cron pagination prompt snapshots * test: verify Workboard stress and generated cron snapshots * fix(workboard): reclaim expired cross-board worker capacity safely * fix(workboard): keep reclaim interval private to lifecycle owner * fix(ci): pin and verify reliable OpenGrep security scanner * test: guard checksum-verified OpenGrep installation
1 parent 92eb942 commit ee9bc9a

29 files changed

Lines changed: 1306 additions & 146 deletions

‎.github/workflows/opengrep-precise-full.yml‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,24 @@ jobs:
3131

3232
- name: Install opengrep
3333
env:
34-
# Pin both the install script (by commit SHA) and the binary version.
35-
# The script SHA must match the v1.25.0 release tag in opengrep/opengrep
36-
# so a compromised or force-pushed `main` cannot RCE in our CI runner.
37-
# Bump both together when upgrading.
34+
# Pin the official Linux asset and its published digest. The upstream
35+
# installer validates tags through an unauthenticated GitHub API and
36+
# can fail before scanning even when this fixed release is available.
3837
OPENGREP_VERSION: v1.25.0
39-
OPENGREP_INSTALL_SHA: 27b5fba1b315fbc63d0fd474d01f5d8235cc86e2
38+
OPENGREP_LINUX_X64_SHA256: 9ac4aebb47ba3f7b0d8fc641ac8749cb6c2f253f616131a67d9631e00d4bea33
4039
run: |
41-
# Download first so a timed-out transfer cannot execute a partial installer.
42-
installer="$(mktemp "${RUNNER_TEMP}/opengrep-install.XXXXXX")"
43-
trap 'rm -f "$installer"' EXIT
44-
curl -fsSL --connect-timeout 10 --max-time 120 \
45-
-o "$installer" \
46-
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh"
47-
bash "$installer" -v "$OPENGREP_VERSION"
48-
echo "$HOME/.opengrep/cli/latest" >> "$GITHUB_PATH"
40+
set -euo pipefail
41+
binary="$(mktemp "${RUNNER_TEMP}/opengrep.XXXXXX")"
42+
trap 'rm -f "$binary"' EXIT
43+
curl -fsSL --retry 4 --retry-all-errors --retry-delay 2 \
44+
--connect-timeout 10 --max-time 300 \
45+
-o "$binary" \
46+
"https://github.com/opengrep/opengrep/releases/download/${OPENGREP_VERSION}/opengrep_manylinux_x86"
47+
printf '%s %s\n' "$OPENGREP_LINUX_X64_SHA256" "$binary" | sha256sum --check
48+
install_dir="${RUNNER_TEMP}/openclaw-opengrep"
49+
mkdir -p "$install_dir"
50+
install -m 0755 "$binary" "$install_dir/opengrep"
51+
echo "$install_dir" >> "$GITHUB_PATH"
4952
5053
- name: Verify opengrep
5154
run: opengrep --version

‎.github/workflows/opengrep-precise.yml‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,24 @@ jobs:
5757

5858
- name: Install opengrep
5959
env:
60-
# Pin both the install script (by commit SHA) and the binary version.
61-
# The script SHA must match the v1.25.0 release tag in opengrep/opengrep
62-
# so a compromised or force-pushed `main` cannot RCE in our CI runner.
63-
# Bump both together when upgrading.
60+
# Pin the official Linux asset and its published digest. The upstream
61+
# installer validates tags through an unauthenticated GitHub API and
62+
# can fail before scanning even when this fixed release is available.
6463
OPENGREP_VERSION: v1.25.0
65-
OPENGREP_INSTALL_SHA: 27b5fba1b315fbc63d0fd474d01f5d8235cc86e2
64+
OPENGREP_LINUX_X64_SHA256: 9ac4aebb47ba3f7b0d8fc641ac8749cb6c2f253f616131a67d9631e00d4bea33
6665
run: |
67-
# Download first so a timed-out transfer cannot execute a partial installer.
68-
installer="$(mktemp "${RUNNER_TEMP}/opengrep-install.XXXXXX")"
69-
trap 'rm -f "$installer"' EXIT
70-
curl -fsSL --connect-timeout 10 --max-time 120 \
71-
-o "$installer" \
72-
"https://raw.githubusercontent.com/opengrep/opengrep/${OPENGREP_INSTALL_SHA}/install.sh"
73-
bash "$installer" -v "$OPENGREP_VERSION"
74-
echo "$HOME/.opengrep/cli/latest" >> "$GITHUB_PATH"
66+
set -euo pipefail
67+
binary="$(mktemp "${RUNNER_TEMP}/opengrep.XXXXXX")"
68+
trap 'rm -f "$binary"' EXIT
69+
curl -fsSL --retry 4 --retry-all-errors --retry-delay 2 \
70+
--connect-timeout 10 --max-time 300 \
71+
-o "$binary" \
72+
"https://github.com/opengrep/opengrep/releases/download/${OPENGREP_VERSION}/opengrep_manylinux_x86"
73+
printf '%s %s\n' "$OPENGREP_LINUX_X64_SHA256" "$binary" | sha256sum --check
74+
install_dir="${RUNNER_TEMP}/openclaw-opengrep"
75+
mkdir -p "$install_dir"
76+
install -m 0755 "$binary" "$install_dir/opengrep"
77+
echo "$install_dir" >> "$GITHUB_PATH"
7578
7679
- name: Verify opengrep
7780
run: opengrep --version

0 commit comments

Comments
 (0)