Skip to content

ci(rampart): honor RAMPART_ENFORCE=warn in scanner steps - #23

Merged
acamarata merged 2 commits into
mainfrom
fix/rampart-warn-mode
Jul 3, 2026
Merged

acamarata merged 2 commits into
mainfrom
fix/rampart-warn-mode

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Summary

Replicates the pattern from ummat PR #88 (https://github.com/ummeco/ummat/pull/88) into islamwiki's .github/workflows/rampart-pr.yml.

Scanner steps (osv-scanner, semgrep) currently fail the GitHub Actions job via their own raw process exit code. This bypasses the intended RAMPART_ENFORCE=warn behavior, where .github/scripts/rampart-gate.js (and the summary job's aggregation logic) is supposed to be the sole decider of pass/fail based on severity.

Fix: add continue-on-error: ${{ env.RAMPART_ENFORCE == 'warn' }} to each scanner step that can fail the job via its own exit code. When RAMPART_ENFORCE=warn, the step is allowed to fail without failing the job, and the downstream gate/summary logic decides the outcome instead.

The secrets job (gitleaks) is intentionally exempt — it stays always-blocking by design and was not touched.

Steps changed

  • deps-osv: google/osv-scanner-action step — added continue-on-error
  • sast: semgrep scan step — added name: Scan + continue-on-error

deps-pnpm's pnpm audit ... || true step was reviewed and left as-is — the || true already absorbs the exit code, so it can't fail the job on its own.

islamwiki has no Go module / govulncheck job and no containers/trivy or schema-audit/hasura job, so those parts of PR #88's diff do not apply here.

DO NOT MERGE — for review only.

Test plan

  • actionlint passes (verified locally, exit 0)
  • YAML parses cleanly (verified locally via python3 yaml.safe_load)
  • Manual review of scanner step behavior under RAMPART_ENFORCE=warn vs strict

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
islamwiki Ready Ready Preview, Comment Jul 3, 2026 9:14pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ummat-islamwiki Ignored Ignored Preview Jul 3, 2026 9:14pm

Request Review

@acamarata

Copy link
Copy Markdown
Contributor Author

Action ref audit (follow-up from ummat investigation): checked for unresolvable uses: refs like the bare google/osv-scanner-action@v2 and un-prefixed aquasecurity/trivy-action@0.36.0 found in ummat/flock. islamwiki already pins google/osv-scanner-action/osv-scanner-action@v2.3.8 (resolvable tag) and has no trivy/containers job. No pinning changes needed here.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🟢 Rampart Security Gate — CLEAN

Tool CRITICAL HIGH MEDIUM LOW
(no findings)

Totals: 0 critical · 0 high · 0 medium · 0 low

Mode: RAMPART_ENFORCE=warn

The scan steps already skipped their own failure in warn mode, but the
gate steps (rampart-gate.js) that run right after them did not — so
sast/deps-osv/deps-pnpm still failed the job even with
RAMPART_ENFORCE=warn. Per-job gates are advisory in warn mode; the
summary job (rampart-summary.js) remains the real enforcement point
and still blocks on CRITICAL findings per the spec's always-blocking
rule.
@acamarata
acamarata merged commit d435288 into main Jul 3, 2026
11 of 14 checks passed
@acamarata
acamarata deleted the fix/rampart-warn-mode branch July 3, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant