fix(worker): iCCP-bomb proof asserts the content-rejection property (either content code); docs(docs): RUST.md worker and release workflow wording after the second security pass

This commit is contained in:
bchanot committed 2026-10-13 00:37:33 +02:00
1 parent a8b644a515
commit 3af2861be7
3 files changed
+46 -25

No files matched your search

+12 -4
View File
@@ -86,10 +86,18 @@ fn oversized_headers_are_refused_before_decoding() {
#[test]
fn an_iccp_bomb_is_a_content_rejection_not_a_broken_environment() {
expect_rejected(
&fixtures::png_iccp_bomb(300 << 20),
exit_codes::RESOURCE_LIMIT,
);
// The png crate reports the inflated profile as a decoding error; the property proven
// here is that content can only ever be rejected, never classified as a broken
// environment (the outcome R1 alerts on).
let run = spawner().decode(&fixtures::png_iccp_bomb(300 << 20));
match run.outcome {
ChildOutcome::Rejected { code, .. }
if code == exit_codes::DECODE_FAILED || code == exit_codes::RESOURCE_LIMIT => {}
other => panic!(
"expected a content rejection, got {other:?} ({})",
run.stderr
),
}
}
#[test]