Skip to content

pull existing entries and push new entries in fuzz corpus in fuzzing workflow #190

pull existing entries and push new entries in fuzz corpus in fuzzing workflow

pull existing entries and push new entries in fuzz corpus in fuzzing workflow #190

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- "*"
workflow_dispatch: {}
jobs:
race-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: WillAbides/[email protected]
with:
go-version-file: go.mod
- name: Cache Go files
uses: capnspacehook/cache-go@v1
# the test is compiled and run as root so that egress eddie can
# open nfqueues, which is a privileged operation
- run: |
go test -c -race -o egress-eddie.test
sudo ./egress-eddie.test -enable-ipv6=false -test.timeout 5m -test.v
binary-test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: WillAbides/[email protected]
with:
go-version-file: go.mod
- name: Cache Go files
uses: capnspacehook/cache-go@v1
# run the same tests as above but use a binary to process packets
# to test with landlock and seccomp filters active
- run: |
cd cmd/egress-eddie
CGO_ENABLED=0 go build -o ../../egress-eddie
cd ../../
go test -c -o egress-eddie.test
sudo ./egress-eddie.test -binary-tests -enable-ipv6=false -test.timeout 5m -test.v
fuzz:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install Go
uses: WillAbides/[email protected]
with:
go-version-file: go.mod
- name: Cache Go files
uses: capnspacehook/cache-go@v1
- name: Fuzz
run: |
cd testdata/fuzz
git switch master
git pull
git status
cd ../../
go test -fuzz Fuzz -run Config -fuzztime 10m
# add new interesting inputs to corpus
cd testdata/fuzz
./update-corpus.sh
git config user.name "Github Actions Bot"
git config user.email "<>"
git remote set-url origin https://capnspacehook:${{ secrets.FUZZ_GITHUB_TOKEN }}@github.com/capnspacehook/egress-eddie-corpus.git
git config --unset-all http.https://github.com/.extraheader
if ! git diff-files --quiet; then
git add -- *
git commit -m "Add new inputs to corpus"
git push
fi