[pull] master from google:master#101
Merged
Merged
Conversation
The latest version in the master branch requires OpenSSL 3.0 or later which Ubuntu 20.04 doesn't contain. Bump the base_os_image to 24.04 and adapt the Dockerfile.
Initial OSS-Fuzz integration for [PostCSS](https://github.com/postcss/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`, `none` sanitizer, `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/core` and runs `compile_javascript_fuzzer`. - `fuzz_parse.js` — single fuzz target that uses `FuzzedDataProvider` to randomize parser options (`from`, `map`), then exercises: - `postcss.parse()` with the generated CSS - AST `walk()` and per-node `toString()` / `error()` (touches input/source-map machinery) - `parse → toString → re-parse` round-trip - `toJSON()` / `postcss.fromJSON()` round-trip - `postcss.list.comma` / `space` / `split` (CSS value list helpers with independent quoting/escape logic) Only `CssSyntaxError` is treated as expected; everything else propagates so real 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_fuzzer` produces `/out/fuzz_parse` cleanly. - 5,000-run smoke: `cov 189 → 771`, `ft 189 → 1414`, corpus 106 entries, ~5,000 exec/s, no crashes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )