Cross builds, packaging split, CI, fuzzing, supply-chain policy
build.sh builds the Rust targets with the Go-era names, refuses an OUT that is /, $HOME or the tree, checks static linking and names the Go targets Rust cannot build. packaging/package.sh builds and inspects packages without signing or publishing; repo.sh reuses it. Seven fuzz targets (one found a URL-parser panic, fixed here with a regression test), cargo-deny policy, CI for lint, tests on Linux/macOS/Windows, cross builds with qemu runs, supply chain and fuzzing. Compatibility specification and security notes. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//! Walking arbitrary tar input as absorb does never panics, and every name
|
||||
//! it would store is confined.
|
||||
#![no_main]
|
||||
use std::io::Read;
|
||||
|
||||
libfuzzer_sys::fuzz_target!(|data: &[u8]| {
|
||||
let mut a = tar::Archive::new(data);
|
||||
let Ok(entries) = a.entries() else { return };
|
||||
for e in entries.take(64) {
|
||||
let Ok(mut e) = e else { return };
|
||||
let name = e.path_bytes().into_owned();
|
||||
if let Some(n) = std::str::from_utf8(&name).ok().and_then(vault::absorb::safe_name) {
|
||||
assert!(!n.split('/').any(|c| c == ".."));
|
||||
}
|
||||
let mut sink = Vec::new();
|
||||
let _ = e.by_ref().take(1 << 20).read_to_end(&mut sink);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user