Skip to content

Commit

Permalink
Merge pull request #1 from dylanjwolff/renaming
Browse files Browse the repository at this point in the history
renaming and updating README.md
  • Loading branch information
dylanjwolff committed May 26, 2024
2 parents 3634c3d + ab46667 commit 652eeac
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
tags: student-fuzzer:latest
tags: competition-fuzzer:latest
push: false
load: true
- uses: addnab/docker-run-action@v3
with:
image: student-fuzzer:latest
image: competition-fuzzer:latest
run: |
cp examples/0/bug.py .; timeout 10s python student_fuzzer.py; test $? -eq 219
cp examples/0/bug.py .; timeout 10s python fuzzer.py; test $? -eq 219
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM python:3.10-slim-bookworm
RUN apt update -y
RUN apt install -y git pkg-config libcairo-dev gcc

RUN useradd student
RUN useradd participant

WORKDIR /home/student
WORKDIR /home/participant

COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
Expand Down
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Student Fuzzer
Template repository for CS5219
# Participant Fuzzer
Template repository for the Fuzzing Competition

## CI Job

Please make sure to enable the CI job to check that your fuzzer is working properly:

1. On the forked repo Github web interface, navigate to:
```Settings → Actions → General → Workflow Permissions```
2. Select “Read and write permissions”, then click “Save”
3. Verify CI job is enabled by making a small commit (such as changing the team name in the README.md file)


## Setup
Install all dependencies needed by the Fuzzing Book baseline fuzzer with:
Expand All @@ -12,13 +22,18 @@ You may want to do this in a Python **virtual environment** to avoid global depe

## Usage

The fuzzer expects a file named `bug.py` to be *in the same directory as the fuzzer file* (`student-fuzzer.py`).
This `bug.py` file should have two functions: an `entrypoint` that is fuzzed by the fuzzer and `get_initial_corpus` function which returns a list of initial inputs for the fuzzer.
To execute the fuzzer on the bug in `bug.py`, just run:
The fuzzer expects a file named `bug.py` to be *in the same directory as the fuzzer file* (`fuzzer.py`).
**DO NOT RENAME THE FUZZER FILE** -- the competition infrastructure will run `python fuzzer.py` to start your fuzzer.
The `bug.py` file will have two functions: an `entrypoint` that is fuzzed by the fuzzer and `get_initial_corpus` function which returns a list of initial inputs for the fuzzer.
Several example bugs are included in the `examples` directory.
To run the fuzzer on an example bug, copy e.g. `examples/0/bug.py` to the base directory of this repository before running the fuzzer with the command above.
I.e.:

```
python student_fuzzer.py
cp examples/0/bug.py .
python fuzzer.py
```

Several example bugs are included in the `examples` directory.
To run the fuzzer on an example bug, copy e.g. `examples/0/bug.py` to the base directory of this repository before running the fuzzer with the command above.
Whether or not the bug has been triggered will be detected by the competition infrastructure; no need to implement a special exception handler or detection mechanism yourself.
In these examples, finding the bug is indicated by the fuzzer exiting with a particular exit code (219).
The detection method *will* be different in the competition, so don't search the program for a particular exit code etc. to find the bug location.
File renamed without changes.

0 comments on commit 652eeac

Please sign in to comment.