Files
openclaw/.github/workflows/opengrep-precise-full.yml
Peter Steinberger 234df15a6d chore: refresh dependencies after seven-day cooldown (#128414)
* build(deps): refresh dependencies after cooldown

Apply dependency, toolchain, action, image, and exact tool updates released by the inclusive 2026-08-16 seven-day cutoff. Adapt owner boundaries for the resulting CUA, logging, Teams, Markdown, native, and test-harness contract changes while retaining versions blocked by upstream compatibility constraints.

* fix(ui): align markdown renderer env typing

* fix(deps): align postcss and mistral peer contracts

* fix(deps): repair refreshed dependency contracts

* fix(deps): retain tslog startup budget

* fix(ci): verify Android tools with SHA-256

* fix(ci): fence Android SDK cache version
2026-08-24 03:01:54 -07:00

79 lines
2.9 KiB
YAML

name: OpenGrep — Full
# Manual repository-wide scan for the high-precision OpenGrep rule super-config.
# This is intentionally separate from PR scanning so broad/backlog findings do
# not block unrelated pull requests.
on:
workflow_dispatch:
concurrency:
group: opengrep-full-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
permissions:
contents: read
security-events: write
jobs:
scan:
name: Scan full repository (precise)
runs-on: ${{ vars.OPENCLAW_CI_RUNNER_BACKEND == 'github' && 'ubuntu-24.04' || 'blacksmith-16vcpu-ubuntu-2404' }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install opengrep
env:
# Pin the official Linux asset and its published digest. The upstream
# installer validates tags through an unauthenticated GitHub API and
# can fail before scanning even when this fixed release is available.
OPENGREP_VERSION: v1.27.1
OPENGREP_LINUX_X64_SHA256: 58053da76672bbeb5b0a5441021c58338707052e10f81d777140ca879bd491ce
run: |
set -euo pipefail
binary="$(mktemp "${RUNNER_TEMP}/opengrep.XXXXXX")"
trap 'rm -f "$binary"' EXIT
curl -fsSL --retry 4 --retry-all-errors --retry-delay 2 \
--connect-timeout 10 --max-time 300 \
-o "$binary" \
"https://github.com/opengrep/opengrep/releases/download/${OPENGREP_VERSION}/opengrep_manylinux_x86"
printf '%s %s\n' "$OPENGREP_LINUX_X64_SHA256" "$binary" | sha256sum --check
install_dir="${RUNNER_TEMP}/openclaw-opengrep"
mkdir -p "$install_dir"
install -m 0755 "$binary" "$install_dir/opengrep"
echo "$install_dir" >> "$GITHUB_PATH"
- name: Verify opengrep
run: opengrep --version
- name: Run full opengrep scan
# Manual full scans cover all first-party source paths so maintainers can
# audit the complete rulepack without making PRs inherit unrelated backlog.
run: |
mkdir -p .opengrep-out
scripts/run-opengrep.sh --sarif --error
- name: Upload SARIF to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
# Only upload if the scan actually produced a SARIF file.
if: always() && hashFiles('.opengrep-out/precise.sarif') != ''
with:
sarif_file: .opengrep-out/precise.sarif
category: opengrep-full
- name: Upload SARIF as workflow artifact
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: opengrep-full-sarif
path: .opengrep-out/precise.sarif
if-no-files-found: error
retention-days: 30