You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
security: add ClusterFuzzLite fuzzing for the SQL-safety kernel
Closes Scorecard Fuzzing alert #55. Scorecard's Fuzzing check does not
recognize Python source patterns at all (only Go/Haskell/JS-TS/Erlang);
the only path to real credit for a Python project is OSS-Fuzz or
ClusterFuzzLite deployment. Confirmed via the alert's own rule.help text
before building this, per the standard OSS-Fuzz Python integration
(https://google.github.io/oss-fuzz/getting-started/new-project-guide/python-lang/).
Harness (.clusterfuzzlite/sql_safety_fuzzer.py) targets
SafeSqlDriver._validate — the pglast parse + AST-walker in
mcpg.sql.safety — feeding it arbitrary bytes via Atheris and treating
anything but the documented ValueError as a bug. This is the project's
actual security-critical surface (see CLAUDE.md's "SQL-safety kernel"
section); the existing tests/unit/test_sql_kernel_fuzz.py property tests
cover known-shape adversarial inputs, this harness covers unknown-shape
ones.
Two workflows: cflite_pr.yml (5-minute fuzz run on PRs touching
src/mcpg/sql/** or .clusterfuzzlite/**, address+undefined sanitizers)
and cflite_batch.yml (1-hour daily batch run to build corpus depth over
time).
Also adds .gitattributes rules forcing LF for *.sh and .clusterfuzzlite/**
— these scripts run inside a Linux container and a CRLF-mangled shebang
would break the interpreter on a Windows checkout.
Verified: Atheris 3.1.0 ships wheels for cp312/cp313/cp314, matching
this project's requires-python >=3.12 — no version-compatibility gap on
the fuzzing library itself. Full build/run validated by this PR's own
cflite_pr.yml workflow run (Docker-in-Docker local validation wasn't
available in this session — see PR checks for the real signal).
Entire-Checkpoint: 9d5df8697fd3
0 commit comments