v1.0 · MIT · published on npm

harvest-scan

Fast, plugin-driven security & code-quality scanner. One command. One score. Ten plugins. Zero config.

Live output

Actionable feedback, not a wall of noise

Grouped by file, colour-coded by severity, with a score bar and a trend since your last run.

harvest src/ --complete
B+0/100
good
1 error · 2 warning · 1 info · 4 total · 210ms
src/payments.js
ERROR42:10Use of eval()(critical)
WARN42:10Use of eval()(heuristic)
WARN7:3Possible hard-coded credential(heuristic)
INFO15:1console.log left in code(no-console)
▲ +5 since last run (was 82)
Why harvest-scan

Three tools' worth of signal, one number.

Most teams juggle a linter, a dependency auditor, and a SAST scanner. harvest-scan runs them together and answers one question: is this code better or worse than last time?

🎯

One number to watch

Every scan yields a single 0–100 score and letter grade, so quality trends are obvious across commits and PRs.

⚡

Fast & parallel

Plugins run concurrently with read-once file caching; binaries and huge files are skipped automatically.

🔌

10 plugins built in

Critical patterns, heuristics, ESLint, complexity, AST security, Semgrep, npm audit, OSV CVEs, Dockerfile, and NLP.

🧩

Auto-discovered plugins

Drop a file in plugins/ (or run harvest plugin create) — it is picked up automatically, no wiring.

🛠️

Autofix

--fix applies safe ESLint fixes before scanning, so you ship cleaner code without manual edits.

🧾

SARIF + JSON

Findings show up inline on GitHub PRs via SARIF; JSON output plugs into any tooling.

🪜

Baseline / ratchet

Adopt on legacy code and fail CI only on new issues — never drown in the existing backlog.

🤖

CI-native

Real exit codes and a ready-made GitHub Action. Gate merges on quality with one step.

How it works

A small orchestrator around composable plugins

01

Discover

Globs the target respecting .gitignore, skipping node_modules, binaries, and files over 512 KB.

02

Load plugins

Every plugin in the plugins directory is auto-discovered and filtered by scan mode (fast / default / complete).

03

Run in parallel

Active plugins run concurrently with per-plugin error isolation — one failure never aborts the scan.

04

Score

Issues are weighted into a 0–100 score. Any critical finding fails the scan outright.

Scoring model

Start at 100, subtract a weight per issue. A single critical finding fails outright.

ScoreRatingGradeExit code
90–100excellentA0
75–89goodB0
50–74fairC0
25–49poorD1
0–24badF2
Plugin catalog

Ten checks, one score

Each plugin decides which files it applies to and returns structured issues. Add your own by dropping a file in plugins/.

critical

Destructive / RCE patterns — rm -rf /, eval(), child_process.exec, curl | sh, fork bombs. Any hit fails the scan.

applies to: all files

heuristic

Risky calls & secrets — eval, execSync, shell_exec, base64_decode, hard-coded credentials.

applies to: all files

eslint

Runs ESLint against your project and counts errors.

applies to: JS / TS

complexity

Functions exceeding the cyclomatic complexity threshold.

applies to: JS / TS

xray

AST-level security analysis via @nodesecure/js-x-ray.

applies to: JS / TS

dockerfile

Image hygiene — non-root USER, pinned tags, leaked secrets, exec-form CMD.

applies to: Dockerfile*

semgrep

OWASP Top Ten rules across 30+ languages.

applies to: many langs

audit

npm audit severity rolled into the score.

applies to: package.json

osv

Known CVEs for your dependencies via the OSV.dev API.

applies to: package.json

ai

NLP pass flagging dangerous security terms in any text.

applies to: all files

Install

Running in ten seconds

Requires Node.js 18+. Zero config to start.

Common commands
harvest -ffast scan (critical + heuristics + lint)
harvest src/ -ccomplete scan (every plugin)
harvest . --fixautofix, then scan
harvest . --sarif -o harvest.sarifSARIF for GitHub Code Scanning
harvest baseline .accept current issues; fail only on new ones

GitHub Action

- uses: actions/checkout@v4
- uses: Aditya060806/Harvest@v1
  with:
    target: '.'
    mode: 'complete'
- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: harvest.sarif