Skip to content

Commit c72c80f

Browse files
Jonathan D.A. Jewellclaude
andcommitted
feat: add ClusterFuzzLite fuzzing configuration
- Add .clusterfuzzlite/ directory with project config - Add fuzz/ directory with initial fuzz target - Add CI workflows for PR and batch fuzzing - Improves OpenSSF Scorecard FuzzingID check Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c8ff0f3 commit c72c80f

9 files changed

Lines changed: 148 additions & 0 deletions

File tree

.clusterfuzzlite/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM gcr.io/oss-fuzz-base/base-builder-rust
2+
RUN apt-get update && apt-get install -y make autoconf automake libtool
3+
COPY . $SRC/anvomidav
4+
WORKDIR $SRC/anvomidav
5+
COPY .clusterfuzzlite/build.sh $SRC/

.clusterfuzzlite/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash -eu
2+
cd $SRC/*/fuzz
3+
cargo +nightly fuzz build
4+
for target in fuzz_targets/*; do
5+
target_name=$(basename ${target%.rs})
6+
cp target/x86_64-unknown-linux-gnu/release/$target_name $OUT/
7+
done

.clusterfuzzlite/project.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
homepage: "https://github.com/hyperpolymath/anvomidav"
2+
language: rust
3+
main_repo: "https://github.com/hyperpolymath/anvomidav"
4+
sanitizers:
5+
- address
6+
- undefined

.github/workflows/cflite_batch.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: ClusterFuzzLite Batch Fuzzing
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Weekly
6+
permissions: read-all
7+
jobs:
8+
fuzz:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
12+
- uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
13+
with:
14+
language: rust
15+
- uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
fuzz-seconds: 1800

.github/workflows/cflite_pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: ClusterFuzzLite PR Fuzzing
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.rs'
7+
- 'Cargo.toml'
8+
- 'Cargo.lock'
9+
permissions: read-all
10+
jobs:
11+
fuzz:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
15+
- uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
16+
with:
17+
language: rust
18+
- uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
fuzz-seconds: 300

META.scm

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
;; META.scm - Meta-level project information
3+
4+
(define meta
5+
'((architecture-decisions
6+
((adr-001
7+
(status "accepted")
8+
(date "2026-02-04")
9+
(context "Initial project setup")
10+
(decision "Use standard hyperpolymath structure")
11+
(consequences "Consistent with other hyperpolymath projects"))))
12+
13+
(development-practices
14+
(code-style "Follow language-specific conventions")
15+
(security "SPDX headers, OpenSSF Scorecard compliance")
16+
(testing "Required for critical functionality")
17+
(versioning "Semantic versioning")
18+
(documentation "README.adoc, inline comments")
19+
(branching "main branch, feature branches, PRs required"))
20+
21+
(design-rationale
22+
())))

STATE.scm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
;; STATE.scm - Current project state
3+
4+
(define state
5+
'((metadata
6+
(version "1.0")
7+
(schema-version "1.0")
8+
(created "2026-02-04")
9+
(updated "2026-02-04")
10+
(project "anvomidav")
11+
(repo "hyperpolymath/anvomidav"))
12+
13+
(project-context
14+
(name "anvomidav")
15+
(tagline "TODO: Add project description")
16+
(tech-stack ()))
17+
18+
(current-position
19+
(phase "development")
20+
(overall-completion 0)
21+
(components ())
22+
(working-features ()))
23+
24+
(route-to-mvp
25+
(milestones
26+
((milestone-id "m1")
27+
(name "Initial Setup")
28+
(items ("Add project description"
29+
"Define tech stack"
30+
"Set up initial features")))))
31+
32+
(blockers-and-issues
33+
(critical ())
34+
(high ())
35+
(medium ())
36+
(low ()))
37+
38+
(critical-next-actions
39+
(immediate ("Update STATE.scm with project details"))
40+
(this-week ())
41+
(this-month ()))))

fuzz/Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
name = "anvomidav-fuzz"
3+
version = "0.0.0"
4+
publish = false
5+
edition = "2021"
6+
7+
[package.metadata]
8+
cargo-fuzz = true
9+
10+
[dependencies]
11+
libfuzzer-sys = "0.4"
12+
13+
[dependencies.anvomidav]
14+
path = ".."
15+
16+
[[bin]]
17+
name = "fuzz_main"
18+
path = "fuzz_targets/fuzz_main.rs"
19+
test = false
20+
doc = false

fuzz/fuzz_targets/fuzz_main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#![no_main]
2+
use libfuzzer_sys::fuzz_target;
3+
4+
fuzz_target!(|data: &[u8]| {
5+
// TODO: Customize fuzzing logic for this repo
6+
// Example: parse input, test crypto functions, etc.
7+
let _ = std::str::from_utf8(data);
8+
});

0 commit comments

Comments
 (0)