Skip to content

Feat: Add google/oss-fuzz integration templates#422

Open
Krivoblotsky wants to merge 1 commit into
claude/issue-241-fuzz-testing-scaffoldfrom
claude/issue-241-oss-fuzz-integration-templates
Open

Feat: Add google/oss-fuzz integration templates#422
Krivoblotsky wants to merge 1 commit into
claude/issue-241-fuzz-testing-scaffoldfrom
claude/issue-241-oss-fuzz-integration-templates

Conversation

@Krivoblotsky
Copy link
Copy Markdown
Contributor

What

Adds FuzzTesting/oss-fuzz-integration/ — the upstream OSS-Fuzz project descriptor as in-repo templates:

  • project.yamllanguage: swift, sanitizers address + undefined, libfuzzer engine, TODO placeholders for primary_contact and auto_ccs.
  • DockerfileFROM gcr.io/oss-fuzz-base/base-builder-swift, clones the repo, copies build.sh.
  • build.sh — iterates the harnesses declared in FuzzTesting/Package.swift, builds with -sanitize=fuzzer,address -parse-as-library -DFUZZING_ENABLED, copies each binary plus a zipped seed corpus into $OUT.
  • README.md — submission walkthrough: fork google/oss-fuzz, copy these files into projects/macpaw-openai/, fill in the maintainer's contact emails, smoke-test with infra/helper.py, open the upstream PR.

Why

Stacked on top of #421 — that PR adds the harnesses, this one adds the integration descriptor so the upstream submission becomes a copy-paste-and-edit-emails exercise rather than a from-scratch reverse-engineering of the OSS-Fuzz Swift build flow.

Refs #241. Does not close it — the actual google/oss-fuzz PR is intentionally left to you because it needs your email under primary_contact (must be tied to a Google account so OSS-Fuzz can grant private-dashboard access) and a project owner-level decision on whether OSS-Fuzz Swift support is mature enough to commit to for this repo.

Affected Areas

More Info

What's NOT in this PR (deliberately):

  • The upstream google/oss-fuzz fork + PR. That's a maintainer action; doing it from my session would commit your email and tie OSS-Fuzz access to whoever's authenticated to gh here.
  • A live OSS-Fuzz dry-run. Requires Docker + infra/helper.py from the google/oss-fuzz repo; the README documents the four helper.py commands you'd run.

Sanity-check before submitting upstream: OSS-Fuzz Swift support is real but lighter than C/C++/Rust/Go. The maintainer-facing guide is Setting up a new project — Swift. Worth reading once to confirm the build flow assumptions in build.sh still hold.

🤖 Generated with Claude Code

In-repo templates for the upstream OSS-Fuzz project descriptor — the
files the maintainer copies into projects/macpaw-openai/ on a fork of
google/oss-fuzz when they want to register the project.

- project.yaml — declares language: swift, sanitizers (address,
  undefined), and TODO placeholders for the maintainer's primary
  contact / auto_ccs.
- Dockerfile — based on gcr.io/oss-fuzz-base/base-builder-swift.
- build.sh — iterates the harnesses in FuzzTesting/Package.swift,
  builds with -sanitize=fuzzer,address -DFUZZING_ENABLED, copies each
  binary plus a zipped seed corpus into $OUT.
- README — step-by-step submission instructions (fork google/oss-fuzz,
  fill contact emails, smoke-test with infra/helper.py, open PR).

Refs #241. The actual upstream PR to google/oss-fuzz is left to the
maintainer because it requires contact emails I shouldn't fill in for
them and a check that OSS-Fuzz Swift support is acceptable for the
project.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants