Skip to content

[pull] master from google:master#101

Merged
pull[bot] merged 2 commits into
threatcode:masterfrom
google:master
May 19, 2026
Merged

[pull] master from google:master#101
pull[bot] merged 2 commits into
threatcode:masterfrom
google:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 19, 2026

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 : )

awelzel and others added 2 commits May 18, 2026 22:21
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.
@pull pull Bot locked and limited conversation to collaborators May 19, 2026
@pull pull Bot added the ⤵️ pull label May 19, 2026
@pull pull Bot merged commit 93d61b1 into threatcode:master May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants