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>
This commit is contained in:
1 parent
0d4fe01baf
commit
b70f36da09
16 files changed
+2918
-4
No files matched your search
@@ -22,6 +22,18 @@ scripts/check.sh
|
||||
|
||||
The interface source text is Portuguese. English translations reside in `apps/gui/ui/i18n-en.js` and are applied at runtime by `i18n.js`. When adding or updating visible text, run `node scripts/check-ui-i18n.mjs` and supply the English translation pair.
|
||||
|
||||
## Untrusted input and fuzzing
|
||||
|
||||
Everything Xexéu reads from the network, from feeds or from the group form is hostile until parsed: it must come back as an error, never a panic. `crates/xexeu-core/tests/untrusted_input.rs` checks this with property tests on every `cargo test`, and the diff engine's guarantees (no removal from a partial sweep, no closed port that was not scanned, disappearance exactly at the threshold) are properties in `diff.rs`. A new parser gets an entry in both places plus a target in `fuzz/`.
|
||||
|
||||
For longer runs (nightly toolchain and `cargo install cargo-fuzz`):
|
||||
|
||||
```bash
|
||||
cargo +nightly fuzz run der_certificate -- -max_total_time=300
|
||||
```
|
||||
|
||||
The `Weekly` workflow fuzzes every target for ten minutes on a persistent corpus and runs `cargo audit`. A crash becomes a regression test before the fix.
|
||||
|
||||
## Documentation
|
||||
|
||||
Always maintain document pairs: every `*.md` and `docs/*` file has an English version and a Portuguese version (`*.pt-BR.md`, `docs/pt-BR/`). File names are translated only when the word changes (e.g. `architecture.md` → `arquitetura.md`).
|
||||
|
||||
Reference in new issue
Block a user