Skip to content

chore: adopt fallow static analysis CI gate (#15) - #88

Merged
s-annam merged 4 commits into
mainfrom
chore/fallow-ci-gate
Jun 15, 2026
Merged

chore: adopt fallow static analysis CI gate (#15)#88
s-annam merged 4 commits into
mainfrom
chore/fallow-ci-gate

Conversation

@rohithgollapalli

@rohithgollapalli rohithgollapalli commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #15 (CI lane — Steps 1/3/4).

Adopts fallow as resumelint's standing static-analysis tool, wiring up the CI lane only. Step 2 (baseline triage + Stop-hook registration) depends on #36 and is tracked there.

Changes

  • package.jsonfallow ^2.96.0 added to devDependencies (+ lockfile). npx fallow --versionfallow 2.96.0 (signed).
  • .github/workflows/ci.yml — new report-only step fallow audit --format sarif, uploaded to GitHub code scanning via github/codeql-action/upload-sarif@v3. Non-blocking (|| true); a follow-up flips it to a hard gate once the baseline is clean. Added security-events: write to the job so the SARIF upload can publish.

Acceptance criteria

Notes

  • fallow audit returns 0 results locally — audit is the diff/risk gate, not the full dead-code/dupes inventory (that lands in the Add fallow-stop.sh to repo as tracked hook script (prerequisite for #15) #36 baseline), so the gate is green as intended for report-only.
  • Dependency footprint: fallow adds 10 lockfile entries — fallow itself, its one runtime dep detect-libc, and 8 @fallow-cli/* optional per-platform binaries (only the host's installs). All are integrity-pinned. The npm registry lists fallow with a single dependency.
  • npm audit: the 5 advisories on this branch (dompurify, esbuild, protobufjs, vite, vitest) are all pre-existing and unrelated to fallow — they trace to posthog-js and the vite/vitest dev stack, are dev-only, and never reach the shipped client bundle. fallow contributes zero advisories.

🤖 Generated with Claude Code

rohithgollapalli and others added 3 commits June 15, 2026 14:06
Add fallow as a devDependency and a report-only static-analysis step to
the CI verify job: `fallow audit --format sarif` plus a SARIF upload to
GitHub code scanning. The step is non-blocking (`|| true`) for now; a
follow-up flips it to a hard gate once the baseline is clean.

Adds `security-events: write` to the job so upload-sarif can publish.

Covers the CI lane only (Steps 1/3/4). Baseline triage and Stop-hook
registration (Step 2) depend on #36 and are tracked there.

No src/ files modified; build and test pass unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The first run failed at the SARIF upload: `fallow audit` is a diff gate
and could not detect a base branch in CI's shallow/detached checkout, so
it errored to stderr and wrote an empty fallow.sarif that upload-sarif
rejected as invalid JSON.

- checkout with fetch-depth: 0 so audit can resolve a merge-base.
- pass --base origin/main explicitly.
- guard: emit a valid empty SARIF if fallow writes nothing, so the
  upload step never fails on report-only runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
upload-sarif rejected the report: fallow emits one SARIF run per
sub-analysis (dead-code/health/dupes), all with an empty category, and
CodeQL refuses multiple runs sharing a category in one file.

Post-process with node to give each run a distinct automationDetails.id
before upload.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@s-annam
s-annam self-requested a review June 15, 2026 20:39

@s-annam s-annam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: chore: adopt fallow static analysis CI gate (#15)

Summary

Clean, well-scoped CI-only adoption of fallow static analysis. Build/lint/typecheck green, 351 tests pass, no src/ files touched. The package is legit and the CI logic is sound. Approving — with one correction to the PR description before merge.

Verified

Check Result
Build / lint / typecheck green
Tests 351 passed (32 files)
fallow provenance real fallow-rs/fallow (3649★, MIT), published via GitHub Actions OIDC trusted publisher; binaries integrity-pinned
Deps added 10fallow + detect-libc + 8 @fallow-cli/* optional platform binaries
--base flag valid (alias of --changed-since)
SARIF step runs → valid SARIF, distinct automationDetails.id per run (solves CodeQL multi-run/category rejection)
npm ci before npx fallow yes → uses pinned binary, not a fresh fetch
fetch-depth: 0 correct — needed so checkout exposes origin/main for the merge-base

Key Findings

  1. [Suggestion — fix before merge] PR description misattributes dependencies/vulns to fallow. The body states "the fallow dependency tree adds 523 transitive packages; npm audit reports 4 vulnerabilities (1 critical, 2 high, 1 moderate)." Both are inaccurate:

    • fallow adds 10 packages, not 523 (npm registry shows deps: 1detect-libc; the rest are optional per-platform binaries).
    • The audit vulns (now 5: dompurify, esbuild, protobufjs, vite, vitest) are all pre-existing and trace to posthog-js and vite/vitestnone originate from fallow:
      dompurify   ← posthog-js
      protobufjs  ← posthog-js → @opentelemetry/otlp-transformer
      esbuild     ← vite@7
      vite/vitest ← dev test stack
      

    The change itself is clean; the description just shouldn't pin the repo's existing vulns on the new tool (on a public repo this misleads anyone reading merge history). Please correct the Notes section before merge.

  2. [Nit] Stale test count. AC says "342 tests green"; it's 351 now after the merge from main.

Highlights

  • The empty-SARIF fallback + per-run automationDetails.id stamping is a thoughtful touch — keeps the upload step from ever failing on an empty/multi-run file.
  • fetch-depth: 0 + explicit --base origin/main + security-events: write scoped to the job: all the right plumbing for a report-only SARIF lane.
  • Correctly held Step 2 (baseline + Stop-hook) for #36 rather than over-scoping.

Verdict

Action: APPROVE
Rationale: Zero blocking code issues. Implementation is correct, dependencies are legit and integrity-pinned, and the CI gate is non-blocking as intended. The only ask is a factual correction to the PR description's dependency/vuln claims (and the stale test count) — neither is a code defect.

@s-annam
s-annam merged commit 02aa4c4 into main Jun 15, 2026
2 checks passed
@s-annam
s-annam deleted the chore/fallow-ci-gate branch June 15, 2026 23:40
s-annam pushed a commit that referenced this pull request Jun 25, 2026
Closes #15 (CI lane — Steps 1/3/4). Report-only fallow audit → SARIF → code scanning, non-blocking. Adds fallow devDep (10 lockfile entries, integrity-pinned) + ci.yml step with security-events: write.
s-annam pushed a commit that referenced this pull request Jun 28, 2026
Closes #15 (CI lane — Steps 1/3/4). Report-only fallow audit → SARIF → code scanning, non-blocking. Adds fallow devDep (10 lockfile entries, integrity-pinned) + ci.yml step with security-events: write.
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.

Adopt fallow static analysis (dead-code, dupes, complexity gate)

3 participants