postcss: initial integration#15468
Conversation
|
rootvector2 is integrating a new project: |
|
LGTM as PostCSS maintainer |
|
@DavidKorczynski Could you please help with the final review/merge when you get a moment? |
DavidKorczynski
left a comment
There was a problem hiding this comment.
Project looks good.
Can we store the fuzzing harness and dictionary in the upstream repository?
|
@rootvector2 you can put them in |
Sure |
…d utilize upstream resources
@DavidKorczynski Done |
|
@DavidKorczynski we got LGTM From PostCSS maintainer Can you Review It Please |
The CI is failing, can you adjust please |
Done Now its Green |
Initial OSS-Fuzz integration for PostCSS,
the JavaScript-based CSS parser/transformer.
What this adds
A new
projects/postcss/directory with the standard four files:project.yaml—language: javascript,libfuzzer,nonesanitizer,primary_contact: andrey@sitnik.es(PostCSS author/maintainer).Dockerfile—FROM gcr.io/oss-fuzz-base/base-builder-javascript,shallow-clones
https://github.com/postcss/postcss, copies the fuzz target.build.sh— installs runtime dependencies with--omit=dev --legacy-peer-deps(PostCSS's devDependencies have an unrelated TypeScript peer-dep conflict that
doesn't affect the library's runtime behavior), then installs
@jazzer.js/coreand runs
compile_javascript_fuzzer.fuzz_parse.js— single fuzz target that usesFuzzedDataProvidertorandomize parser options (
from,map), then exercises:postcss.parse()with the generated CSSwalk()and per-nodetoString()/error()(touches input/source-mapmachinery)
parse → toString → re-parseround-triptoJSON()/postcss.fromJSON()round-trippostcss.list.comma/space/split(CSS value list helpers withindependent quoting/escape logic)
Only
CssSyntaxErroris treated as expected; everything else propagates soreal bugs surface.
Why PostCSS
PostCSS is a high-impact dependency in the JavaScript ecosystem (used by
Tailwind, Autoprefixer, modern CSS Modules, Next.js, Vite, etc.). Any parser or
stringifier bug has a wide blast radius across the front-end build chain.
Local verification
Built and ran via Docker on
linux/amd64:compile_javascript_fuzzerproduces/out/fuzz_parsecleanly.cov 189 → 771,ft 189 → 1414, corpus 106 entries,~5,000 exec/s, no crashes.