diff --git a/.gitea/workflows/pr-checker.yml b/.gitea/workflows/pr-checker.yml index b8707d9..8e6817c 100644 --- a/.gitea/workflows/pr-checker.yml +++ b/.gitea/workflows/pr-checker.yml @@ -129,9 +129,15 @@ jobs: droast --no-roast --min-severity warning . # ------------------------------------------------------- snyk security ---- + # DISABLED: Snyk free plan only includes ~100 test credits/month, which the + # pipeline would burn through quickly (2 tests per PR push). + # To re-enable, delete the "if: false" line below. Consider also running + # this job only on PRs marked "ready for review" or on a weekly schedule + # instead of on every push. snyk: name: Security scan (Snyk) runs-on: ubuntu-latest + if: false # snyk/snyk:node is amd64-only ("no matching manifest for linux/arm64"), # so install the CLI via npm in the multi-arch node image instead container: node:22-bookworm @@ -221,8 +227,15 @@ jobs: run: | # jq is not in the node image - use node for JSON encoding BODY=$(node -e 'process.stdout.write(JSON.stringify(require("fs").readFileSync("/tmp/review.md","utf8")))') - curl -sf -X POST \ + HTTP_CODE=$(curl -s -o /tmp/comment-response.json -w "%{http_code}" \ + -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ -d "{\"body\": ${BODY}}" \ - "${GITHUB_API_URL}/repos/${REPO}/issues/${PR_NUMBER}/comments" + "${GITHUB_API_URL}/repos/${REPO}/issues/${PR_NUMBER}/comments") + echo "POST status: ${HTTP_CODE}" + cat /tmp/comment-response.json + case "$HTTP_CODE" in + 200|201) echo "Review comment posted." ;; + *) echo "::error::Failed to post review comment (HTTP ${HTTP_CODE}) - check PR_GITEA_TOKEN scope and expiry" ;; + esac