Skip to content

Commit

Permalink
Dockerfile & Github Action fix for AFL
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Aug 30, 2024
1 parent 01ee802 commit 9a269fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
cargo install --force ziggy cargo-afl honggfuzz grcov cargo-contract
- name: Run afl-system-config
run: sudo cargo-afl afl system-config
run: |
curl https://raw.githubusercontent.com/AFLplusplus/AFLplusplus/stable/afl-system-config > afl-system-config.sh
chmod +x afl-system-config.sh && bash afl-system-config.sh
- name: Run rustfmt checks
run: cargo fmt -- --check
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ RUN rustup default nightly-2024-08-13 \
WORKDIR /phink
RUN git clone https://github.com/srlabs/phink . \
&& cargo update \
&& cargo afl config --build --plugins --verbose --force \
&& cargo build --release

RUN cargo afl system-config
RUN cargo afl config --build --plugins --verbose --force

RUN curl https://raw.githubusercontent.com/AFLplusplus/AFLplusplus/stable/afl-system-config > afl-system-config.sh
RUN chmod +x afl-system-config.sh && bash afl-system-config.sh

ENTRYPOINT ["phink"]

Expand Down
1 change: 1 addition & 0 deletions tests/cli_fuzz_integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ mod tests {
afl_log_didnt_fail(&config),
"'logs/afl.log' didn't return a successfull backlog "
);

// We don't use allowlist for macos
if cfg!(not(target_os = "macos")) {
ensure!(
Expand Down
1 change: 0 additions & 1 deletion tests/shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::{
collections::HashSet,
ffi::OsStr,
fs,
io,
io::Read,
path::{
Path,
Expand Down

0 comments on commit 9a269fa

Please sign in to comment.