google / google/oss-fuzz

[CIFuzz] JavaScript projects are unrunnable: config_utils.py rejects `none` but compile requires it

Open
#15,907 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
12.6k
Forks
2.9k
Avg merge
2d 2h
Merged PRs (30d)
62

Description

## Summary

CIFuzz is in a dead-lock for JavaScript projects. The config validator and the
compile script impose mutually exclusive constraints on `SANITIZER`, so there is
no value that produces a green fuzzing run.

## The contradiction

**Side A — `infra/cifuzz/config_utils.py` (line 32 + lines 153–155)**

```python
SANITIZERS = ['address', 'memory', 'undefined', 'coverage']

if self.sanitizer not in SANITIZERS:
logging.error('Invalid SANITIZER: %s. Must be one of: %s.',
self.sanitizer, SANITIZERS)
```

`none` is not in the list → ConfigError at config-validation time.

**Side B — `infra/base-images/base-builder/compile` (lines 47–57)**

```bash
if [ "$FUZZING_LANGUAGE" = "javascript" ]; then
if [ "$SANITIZER" != "coverage" ] && [ "$SANITIZER" != "none" ]; then
echo "ERROR: JavaScript projects cannot be fuzzed with sanitizers."
exit 1
fi
```

For a JavaScript project, any sanitizer except `none` or `coverage` → build
exits 1.

**The pincer:** `coverage` passes both checks, but a `coverage` build is not a
fuzzing run — it is a coverage-instrumented build used for corpus coverage
reporting. There is no sanitizer value that passes Side A **and** produces a
real fuzzing run for JS projects.

## Observed error

Setting `sanitizer: address` (the only valid fuzzing sanitizer from Side A's
list) produces this error at compile time:

ERROR: JavaScript projects cannot be fuzzed with sanitizers.
Building fuzzers failed.

Setting `sanitizer: none` produces a ConfigError at config-validation time
(Side A) and the job never reaches compile.

## History confirming it is not a project config mistake

In [Fmarzochi/EGC](https://github.com/Fmarzochi/EGC):

- [PR #377](https://github.com/Fmarzochi/EGC/pull/377) switched `none` →
`address` trying to fix the ConfigError. That fixed config-validation but
broke compile.
- Neither value has ever produced a green batch run. Five consecutive weekly
failures on `main`:
- [Run #5 — 2026-07-19](https://github.com/Fmarzochi/EGC/actions/runs/29679173741) ← latest, use as live repro
- [Run #4 — 2026-07-12](https://github.com/Fmarzochi/EGC/actions/runs/29185256296)
- [Run #3 — 2026-07-05](https://github.com/Fmarzochi/EGC/actions/runs/28735168279)

## Expected behavior

`none` should be a valid `SANITIZER` value in `config_utils.py` for projects
whose language requires it (JavaScript, and potentially others). Alternatively,
the compile script's language-specific check should be relaxed in CIFuzz's
validation path, or CIFuzz should auto-select `none` for JS projects.

## Workaround (applied in EGC)

Disabled the `schedule:` triggers on all three ClusterFuzzLite workflows (see
[EGC#910](https://github.com/Fmarzochi/EGC/issues/910)) so the weekly red run
stops masking real CI failures. `workflow_dispatch` remains for manual runs.
The scheduled jobs will be re-enabled once this upstream contradiction is
resolved.

## Relevant files

- `infra/cifuzz/config_utils.py` — line 32 (`SANITIZERS` list), lines 153–155
(validation)
- `infra/base-images/base-builder/compile` — lines 47–57 (JS language check)

Contributor guide

Open the contributing guide

Research direction

Read infra/cifuzz/config_utils.py around the SANITIZERS list and validation, then compare it with infra/base-images/base-builder/compile lines 47–57. Reproduce the JavaScript sanitizer contradiction with the linked EGC workflow run. Done means the chosen validation and compile behavior permit a real JavaScript fuzzing run without breaking the existing coverage path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python, shell
Domain
build-system, ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.