From be715e3cea7162cdc8644c49a0546bc1c0dd78b7 Mon Sep 17 00:00:00 2001 From: cesnimda Date: Sun, 12 Jul 2026 15:53:35 +0200 Subject: [PATCH] fix(ci): semgrep install fails on Gitea Act runner (no sudo/pipx) 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 --- .gitea/workflows/security.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/security.yml b/.gitea/workflows/security.yml index cf69641..a86c0f2 100644 --- a/.gitea/workflows/security.yml +++ b/.gitea/workflows/security.yml @@ -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"