Files
harpia/.gitea/workflows/weekly.yml
T
Lucas RayanandClaude Opus 5.5 b70f36da09 test: property tests and fuzz targets for untrusted input and the diff engine
Every parser of data Xexéu does not control must return an error, never
panic; the diff engine's guarantees (no removal from a partial sweep, no
closed port that was not scanned, disappearance exactly at the threshold)
are now properties. The Weekly workflow runs cargo audit independently of
pushes and fuzzes each target on a persistent corpus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 10:53:26 -03:00

62 lines
1.9 KiB
YAML

name: Weekly
# Checks that do not depend on a push: a new RustSec advisory can land on a
# dependency while the code stands still, and fuzzing finds more the longer
# its corpus grows. The corpus lives on the persistent runner volume, so every
# run starts where the last one stopped.
on:
schedule:
- cron: '17 6 * * 1'
workflow_dispatch:
concurrency:
group: weekly
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
CARGO_HOME: /opt/hostedtoolcache/cargo
RUSTUP_HOME: /opt/hostedtoolcache/rustup
jobs:
audit:
name: Dependency audit
runs-on: linux-arm64
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- name: cargo audit
run: |
command -v cargo-audit >/dev/null || cargo install cargo-audit --locked
cargo audit
fuzz:
name: Fuzz (${{ matrix.target }})
runs-on: linux-arm64
env:
CARGO_TARGET_DIR: /opt/hostedtoolcache/cargo-target/xexeu-fuzz
strategy:
fail-fast: false
max-parallel: 1
matrix:
target: [der_certificate, service_banner, vuln_feeds, operator_input]
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@nightly
- name: cargo-fuzz
run: command -v cargo-fuzz >/dev/null || cargo install cargo-fuzz --locked
- name: Fuzz for 10 minutes
run: |
corpus=/opt/hostedtoolcache/fuzz-corpus/xexeu/${{ matrix.target }}
mkdir -p "$corpus"
cargo +nightly fuzz run "${{ matrix.target }}" "$corpus" -- -max_total_time=600
# A crash fails the job; its input is printed here so it can be replayed
# with `cargo +nightly fuzz run <target> <file>` and turned into a test.
- name: Crash input
if: failure()
run: |
for f in fuzz/artifacts/${{ matrix.target }}/*; do
[ -f "$f" ] || continue
echo "== $f"; base64 -w0 "$f"; echo
done