.gitea/workflows/fuzz.yml runs cargo-fuzz (libFuzzer, nightly Rust) at 03:00 Chiang Mai time on runner02 on cnx01 (runs-on: cnx01; the label comes with cnx-network-clan PR #170), 10 minutes a target, under nice -n 19 (.gitea/scripts/fuzz.sh). Targets, bodies in src/fuzzing.rs: - text: passport zones and OCR output (whatever from_ocr returns must parse), positions, names, dates, Thai numbers, agreement texts and the contract diff. - upload: a file as files::sniff types it, through the pack's image and PDF code to a finished A4 page (pack::pdf::sides), EXIF orientation. - signed_copy: the drawn signature's PNG, or any text as the agreement, in the signed copy's PDF. fuzz/seeds/ holds small real files to start from (JPEG with JFIF and EXIF, PNG with pHYs, palette PNG, WebP lossy and lossless, A4 and landscape PDF, a drawn signature, zone, OCR, map links, Thai names). The grown corpus stays in the runner's cache; a crash fails the job and leaves its input as the artifact fuzz-findings, which goes into tests/fuzz_cases/<target>/ with the fix. tests/fuzz_cases.rs replays those and the seeds on every push, on stable. No sanitizer (safe Rust, about three times the inputs), debug assertions on, 10 s and 2 GB per input count as findings. DRAWING_LIMIT moved to agreements so the target uses the client page's limit. A local run of 60 s each in a Linux container: 635,522 / 9,763 / 4,089 inputs, peak 62 MB, nothing found.
40 lines
735 B
Rust
40 lines
735 B
Rust
//! Lanna Desk (lannadesk.com): immigration records, deadlines and extension packs
|
|
//! for foreigners in Thailand (docs/PLAN.md).
|
|
|
|
pub mod agreements;
|
|
pub mod anchor;
|
|
pub mod audit;
|
|
pub mod companies;
|
|
pub mod config;
|
|
pub mod conflicts;
|
|
pub mod countries;
|
|
pub mod dates;
|
|
pub mod db;
|
|
pub mod deadlines;
|
|
pub mod documents;
|
|
pub mod embedded;
|
|
pub mod files;
|
|
pub mod forms;
|
|
#[doc(hidden)]
|
|
pub mod fuzzing;
|
|
pub mod gps;
|
|
pub mod journal;
|
|
pub mod legal;
|
|
pub mod links;
|
|
pub mod mail;
|
|
pub mod mrz;
|
|
pub mod oidc;
|
|
pub mod pack;
|
|
pub mod papers;
|
|
pub mod people;
|
|
#[cfg(test)]
|
|
mod props;
|
|
pub mod records;
|
|
pub mod s3;
|
|
pub mod seed;
|
|
pub mod session;
|
|
pub mod web;
|
|
|
|
/// The version shown in the footer.
|
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|