ci: disable Snyk (free plan quota), log comment-post errors
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / AI code review (opencode) (pull_request) Successful in 7s

- Snyk job disabled via 'if: false': free plan only has ~100 test
  credits/month and the job runs 2 tests per PR push
- PR comment step no longer fails silently: curl prints the HTTP
  status and response body, making token/URL errors visible
This commit is contained in:
Noel Sabia committed 2026-10-18 16:12:05 +02:00
1 parent a061fad9b1
commit 3204fab323
1 file changed
+15 -2
+15 -2
View File
@@ -129,9 +129,15 @@ jobs:
droast --no-roast --min-severity warning . droast --no-roast --min-severity warning .
# ------------------------------------------------------- snyk security ---- # ------------------------------------------------------- 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: snyk:
name: Security scan (Snyk) name: Security scan (Snyk)
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: false
# snyk/snyk:node is amd64-only ("no matching manifest for linux/arm64"), # 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 # so install the CLI via npm in the multi-arch node image instead
container: node:22-bookworm container: node:22-bookworm
@@ -221,8 +227,15 @@ jobs:
run: | run: |
# jq is not in the node image - use node for JSON encoding # 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")))') 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 "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"body\": ${BODY}}" \ -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