Skip to content

Small fixes for fuzzing CI and uploading results - #1175

Merged
urunc-bot[bot] merged 5 commits into
mainfrom
fix/fuzzing_upload
Oct 29, 2026
Merged

urunc-bot[bot] merged 5 commits into
mainfrom
fix/fuzzing_upload

Conversation

@cmainas

@cmainas cmainas commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is a follow up of #1128. It performs the following fixes:

  • The nightly fuzzing could not build because the root .dockerignore only allows a fixed list of paths and did not include .clusterfuzzlite/, so COPY .clusterfuzzlite/build.sh failed.
  • A missing fuzz target was reported as successful, which would lead to a successful workflow after a function rename. This will also get addressed from future improvements in fuzzing, but adding it here as well.
  • Upload the SARIF from batch fuzzing action, since output-sarif only writes cifuzz-sarif/results.sarif. The batch workflow now saves it as an artifact and a separate upload-sarif job uploads it. The ClusterFuzzLite actions run mutable :v1 images, so the job running them only gets read access, and only the upload job gets security-events: write.
  • Rename fuzz_nightly.yml to fuzz_batch.yml (daily at 00:00 UTC, 30 minutes of fuzzing). and make fuzz_prune.yml to run weekly (Sundays 13:30 UTC) instead of daily, since each run rebuilds the fuzzers and the corpus of a single target grows slowly. Both share the clusterfuzzlite-corpus concurrency group, because each run downloads the corpus, changes it and uploads it again.
  • Track the base-builder-go image digest through dependabot.

Related issues

How was this tested?

In a separate repository. Workflow runs:

LLM usage

Opus 5.5

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit bb6c65c
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6ae33ff7792567af3f826425

@cmainas
cmainas force-pushed the fix/fuzzing_upload branch 2 times, most recently from bcff0bc to 89e5225 Compare October 28, 2026 18:59
@cmainas
cmainas marked this pull request as ready for review October 28, 2026 19:09
@cmainas

cmainas commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Hello @pocopepe can you also review this?

@cmainas
cmainas requested a review from ananos October 28, 2026 19:14
@ananos

ananos commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

thanks @cmainas! This fixes the actual reason the scheduled fuzz runs fail on main (eg. run 40791889402):

COPY .clusterfuzzlite/build.sh /src/: "/.clusterfuzzlite/build.sh": not found

The allowlist .dockerignore from eba28d3 dropped .clusterfuzzlite/, and !/.clusterfuzzlite brings it back. The rest looks good too: the fuzz job is down to contents: read / actions: read with security-events: write only on the upload job, there is no pull_request_target, action SHAs match the rest of the repo, and actionlint + shellcheck are clean. The build.sh guard now fails on a missing target, which was a false green on main.

The fuzz workflows only run on schedule/dispatch, so the files in this PR have not run here (the urunc_test runs use a shared fuzz.yml). We should trigger batch and prune manually once after merge.

Nits:

  • fuzz_batch.yml:48-57: upstream batch mode writes the SARIF from the last fuzz target only (TODO: Handle multiple crashes). Fine with one target today. Once we add a second one, a crash in an earlier target would leave the SARIF empty and close the alert, although the job still fails. Maybe a one-line comment next to output-sarif: true?
  • the concurrency group keeps one pending run, so a queued manual dispatch could be cancelled by the next scheduled run. Unlikely with these schedules.
  • a03bc8a has a double space in the subject (ci: upload SARIF ...).

I intend to approve -- let me know if you want to touch any of the nits first.

@cmainas

cmainas commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @ananos for the review. Let;s wait @pocopepe as well.

@pocopepe

Copy link
Copy Markdown
Contributor

Hi @cmainas, thanks for the fixes! looked through it, LGTM. Agree with the SARIF note above, we'll need to handle it before a second target.

@ananos ananos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @cmainas & @pocopepe! LGTM.

The root `.dockerignore` excludes everything not on its allowlist, and
ClusterFuzzLite builds `.clusterfuzzlite/Dockerfile` with the repository
root as context. `COPY .clusterfuzzlite/build.sh` therefore fails and the
fuzzing workflows cannot build. Add the directory to the allowlist.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
`compile_native_go_fuzzer_v2` only prints a message and exits 0 when it
cannot find the fuzz function. After a rename the build would pass, no
target would run and the workflow would stay green. To avoid that, check
that the binary was produced.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
- Upload `cifuzz-sarif/results.sarif` after batch runs. `output-sarif`
  only writes the file, so crashes never reached code scanning.
- Upload it from a separate job. The ClusterFuzzLite actions run mutable
  `:v1` images, so the job running them keeps a read-only token, and only
  the upload job gets `security-events: write`.
- Put batch and prune in one concurrency group. Each run downloads the
  corpus, changes it and uploads it again, so overlapping runs would
  overwrite each other's corpus.
- Prune the corpus weekly instead of daily. Each run rebuilds the fuzzers,
  and the corpus of a single target grows slowly.
- Rename `fuzz_nightly.yml` to `fuzz_batch.yml` to match `fuzz_prune.yml`.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
The `base-builder-go` image is pinned by digest and ships its own Go
toolchain. Without updates it would eventually fall behind `go.mod`.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
The pinned SHA is the `v4.39.1` tag, as in `codeql.yml`, not `v3.29.5`.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@urunc-bot
urunc-bot Bot merged commit 2a0d8fc into main Oct 29, 2026
2 of 3 checks passed
urunc-bot Bot pushed a commit that referenced this pull request Oct 29, 2026
The root `.dockerignore` excludes everything not on its allowlist, and
ClusterFuzzLite builds `.clusterfuzzlite/Dockerfile` with the repository
root as context. `COPY .clusterfuzzlite/build.sh` therefore fails and the
fuzzing workflows cannot build. Add the directory to the allowlist.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request Oct 29, 2026
`compile_native_go_fuzzer_v2` only prints a message and exits 0 when it
cannot find the fuzz function. After a rename the build would pass, no
target would run and the workflow would stay green. To avoid that, check
that the binary was produced.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request Oct 29, 2026
- Upload `cifuzz-sarif/results.sarif` after batch runs. `output-sarif`
  only writes the file, so crashes never reached code scanning.
- Upload it from a separate job. The ClusterFuzzLite actions run mutable
  `:v1` images, so the job running them keeps a read-only token, and only
  the upload job gets `security-events: write`.
- Put batch and prune in one concurrency group. Each run downloads the
  corpus, changes it and uploads it again, so overlapping runs would
  overwrite each other's corpus.
- Prune the corpus weekly instead of daily. Each run rebuilds the fuzzers,
  and the corpus of a single target grows slowly.
- Rename `fuzz_nightly.yml` to `fuzz_batch.yml` to match `fuzz_prune.yml`.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request Oct 29, 2026
The `base-builder-go` image is pinned by digest and ships its own Go
toolchain. Without updates it would eventually fall behind `go.mod`.

PR: #1175
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@cmainas
cmainas deleted the fix/fuzzing_upload branch October 29, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants