fix(ci): semgrep install fails on Gitea Act runner (no sudo/pipx)
CI / backend (pull_request) Successful in 58s
CI / frontend (pull_request) Successful in 14s
CI / format (pull_request) Failing after 30s
CI / db-tests (pull_request) Failing after 30s
Security / secrets (pull_request) Successful in 7s
Security / dependencies (pull_request) Failing after 42s
Security / sast (pull_request) Failing after 11s

Runner has no sudo binary but already runs as root, and no pipx. Call
apt-get directly and pip install --user semgrep instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
cesnimda
2026-07-12 15:53:35 +02:00
parent cb740c0515
commit be715e3cea
+4 -2
View File
@@ -62,10 +62,12 @@ jobs:
- uses: actions/checkout@v4
# The runner image lacks pip, and a semgrep job-container lacks the node that
# actions/checkout needs — so install pip via apt on the standard image.
# Gitea's Act runner has no sudo binary but already runs as root, so call
# apt-get directly; pip install --user needs no pipx.
- name: Install semgrep
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq python3-pip pipx
pipx install semgrep
apt-get update -qq && apt-get install -y -qq python3-pip
python3 -m pip install --user --break-system-packages semgrep || python3 -m pip install --user semgrep
- name: Semgrep scan
run: |
export PATH="$HOME/.local/bin:$PATH"