Repository navigation
58 lines (54 loc) · 1.88 KB
/
Copy pathfuzz.yml
File metadata and controls
58 lines (54 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Fuzz
# Coverage-guided fuzzing with AFL++ and SharpFuzz. Kept out of ci.yml so releases never wait on it.
on:
schedule:
- cron: '17 3 * * 1' # Mondays, 03:17 UTC
workflow_dispatch:
inputs:
seconds:
description: Seconds to fuzz each target
default: '600'
permissions:
contents: read
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
fuzz:
name: Fuzz (${{ matrix.target }})
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
target: [inflate, roundtrip]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: 8.0.x
- name: Install AFL++ and SharpFuzz
run: |
sudo apt-get update
sudo apt-get install -y afl++
dotnet tool install --global SharpFuzz.CommandLine
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
# AFL++ refuses to run when core dumps are piped to a handler; harmless to ignore if this is not permitted.
echo core | sudo tee /proc/sys/kernel/core_pattern || true
- name: Fuzz ${{ matrix.target }}
run: fuzz/run-afl.sh ${{ matrix.target }} ${{ github.event.inputs.seconds || '600' }}
# AFL++ names its files like "id:000000,src:000023,..."; artifacts cannot contain colons, so archive them first.
- name: Archive findings
if: always()
run: |
if [[ -d fuzz/work/${{ matrix.target }}/findings ]]; then
tar -czf fuzz-findings-${{ matrix.target }}.tar.gz -C fuzz/work/${{ matrix.target }} findings
fi
shell: bash
- name: Upload findings
if: always()
uses: actions/upload-artifact@v7
with:
name: fuzz-findings-${{ matrix.target }}
path: fuzz-findings-${{ matrix.target }}.tar.gz
if-no-files-found: ignore