test(tests): R4.5 export-side security cases; ledger rows of the writer cases point at cargo (only the R4.7 compare rows pending)
This commit is contained in:
1 parent
50c8fe0b33
commit
ba6ac078be
3 files changed
+132
-66
No files matched your search
@@ -12,8 +12,8 @@ apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports
|
||||
apps/app/tests/unit/n-1.reader.test.ts archives exported from core-built reports > the attachment of report-v2.full.json reads back through the N-1 reader kept vitest (same case) - reader switched to the frozen O11 scanner at R4.8
|
||||
apps/app/tests/unit/pdf.browserRasterizer.test.ts browserRasterizer > returns PNG bytes for a valid SVG, sized by the engine kept vitest (same case) - -
|
||||
apps/app/tests/unit/pdf.browserRasterizer.test.ts browserRasterizer > falls back to toDataURL when toBlob returns null kept vitest (same case) - -
|
||||
apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > T2 catalog changed: the envelope re-exports the archived sheet, not the revised one ported R4.5 cargo from_envelope (pending) - -
|
||||
apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > scenario 3 branding changed: the envelope re-exports the archived branding and never fetches ported R4.5 cargo from_envelope (pending) - -
|
||||
apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > T2 catalog changed: the envelope re-exports the archived sheet, not the revised one ported cargo pdf_serialize::restoration_round_trip_loses_nothing - export_from_envelope
|
||||
apps/app/tests/unit/pdf.export.app.test.ts the archive survives its resources > scenario 3 branding changed: the envelope re-exports the archived branding and never fetches ported cargo pdf_serialize::restoration_round_trip_loses_nothing - export_from_envelope
|
||||
apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 replaced R4.4/R4.5 cargo goldens (pending) O6 pdf-lib embedPng check of the golden rasters
|
||||
apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the demo report covers the sheet features the goldens must freeze kept vitest (same case) - inputs of the kept views cases
|
||||
apps/app/tests/unit/pdf.goldens.test.ts golden inputs > the v2unresolved report really carries unresolved findings kept vitest (same case) - inputs of the kept views cases
|
||||
@@ -152,17 +152,17 @@ packages/core-wasm/tests/n-1.scanner.test.ts the frozen scanner reads the archiv
|
||||
packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > stamp written as UTF-16BE hex (the export): attachment_stripped kept vitest (same case) O11 -
|
||||
packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > stamp written as literal: attachment_stripped kept vitest (same case) O11 -
|
||||
packages/core-wasm/tests/n-1.scanner.test.ts a stamped archive whose attachment was removed > the same file without the stamp: no_attachment kept vitest (same case) O11 -
|
||||
packages/pdf/tests/goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts golden inputs > the v2unresolved report carries the unresolved findings of the freeze ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > highlighted views: same facts but titles and data attributes ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > highlighted views: same facts but titles and data attributes ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > highlighted views: same facts but titles and data attributes ported R4.4/R4.5 cargo (pending) O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts golden inputs > the 2×1 PNG decodes as 2×1 and the 1×1 as 1×1 ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts golden inputs > the v2unresolved report carries the unresolved findings of the freeze ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2full > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of demo > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > nologos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > logos > text, images and links per locale; same pagination across locales ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/goldens.test.ts goldens of v2unresolved > highlighted views: same facts but titles and data attributes ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O1/O2 -
|
||||
packages/pdf/tests/inflate.test.ts inflateFlate > round-trips a payload spanning several slices ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 -
|
||||
packages/pdf/tests/inflate.test.ts inflateFlate > feeds the inflater in 16 KiB slices, each awaited ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 -
|
||||
packages/pdf/tests/inflate.test.ts inflateFlate > an output exactly at the limit passes, one byte more is null ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7/O9 -
|
||||
@@ -181,8 +181,8 @@ packages/pdf/tests/r4.png-oracles.test.ts R4 PNG oracles (TypeScript freeze) > m
|
||||
packages/pdf/tests/r4.reader-oracles.test.ts R4 reader oracles O7 (TypeScript freeze) > matches the frozen inputs and reader outcomes deleted - O7 generator; oracle files kept (R4.8)
|
||||
packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen AFM metrics and WinAnsi table deleted - O4 generator; oracle files kept (R4.8)
|
||||
packages/pdf/tests/r4.text-oracles.test.ts R4 text oracles (TypeScript freeze) > matches the frozen text and number rules deleted - O4 generator; oracle files kept (R4.8)
|
||||
packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > main (haloed) and head views: 1200 px wide, highlight present, sane coverage ported R4.4/R4.5 cargo (pending) O2/O4 -
|
||||
packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > a rasterizer that throws: page without image, one view_raster_failed warning ported R4.4/R4.5 cargo (pending) O2/O4 -
|
||||
packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > main (haloed) and head views: 1200 px wide, highlight present, sane coverage ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 -
|
||||
packages/pdf/tests/raster.test.ts resvg rasterisation of the demo views > a rasterizer that throws: page without image, one view_raster_failed warning ported cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build O2/O4 -
|
||||
packages/pdf/tests/read.test.ts T4 roundtrip > reads back the exported envelope whole ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.full.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
packages/pdf/tests/read.test.ts T5 v2 archives and the bare v3 fixture > report-v2.minimal.pdf: migrated, re-exported, imported again equal ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
@@ -196,7 +196,7 @@ packages/pdf/tests/read.test.ts attachment presence and selection > a stamped PD
|
||||
packages/pdf/tests/read.test.ts attachment presence and selection > a foreign PDF: no_attachment ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
packages/pdf/tests/read.test.ts attachment presence and selection > the Filespec named osteo-report.json wins over an earlier EmbeddedFile ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
packages/pdf/tests/read.test.ts attachment presence and selection > refuses an oversized file or one without a %PDF- header as invalid_pdf ported cargo pdf_import::o7_locate_and_read_match_the_typescript O7 -
|
||||
packages/pdf/tests/reexport.test.ts re-export from the envelope alone > reproduces text, images, views and the envelope minus exportedAt ported R4.4/R4.5 cargo (pending) O2 -
|
||||
packages/pdf/tests/reexport.test.ts re-export from the envelope alone > reproduces text, images, views and the envelope minus exportedAt ported cargo pdf_serialize::restoration_round_trip_loses_nothing O2 -
|
||||
packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > finds the one Flate stream, named through its visible Filespec ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 -
|
||||
packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the length is the declared /Length and the data ends on endstream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 -
|
||||
packages/pdf/tests/scan.test.ts findEmbeddedFiles on a fresh export (no object streams) > the export keeps the Filespec, its name and the stamp in clear, no object stream ported cargo pdf_scan::every_pdf_input_scans_as_the_typescript_did O7 -
|
||||
@@ -249,50 +249,50 @@ packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with
|
||||
packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > a dangling svg_asset_id → snapshot_invalid ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file
|
||||
packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > another sheet → sheet_mismatch ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file
|
||||
packages/pdf/tests/security.test.ts export: a snapshot over the caps fails with a typed error and no file > too many observations or views per observation → too_many_pages ported cargo pdf_layout::the_checks_refuse_what_export_ts_refused - typed export errors, no oracle file
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > <script>, on*, javascript: href, external <image>, <style> are gone from what is rasterised ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > the sanitiser names what it removed and clamps stdDeviation ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > CSS escapes, image-set and function calls in style or presentation attributes are removed ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > a non-finite or empty viewBox falls back to the 0.6 ratio, never NaN ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > <!ENTITY> and 257 <use> are refused: the export fails as snapshot_invalid ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > a huge root viewBox is clamped to a 1200×2400 raster ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > horse.svg and paws-in-harmony.svg pass with nothing removed and an identical serialisation ported R4.4/R4.5 cargo (pending) - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > <script>, on*, javascript: href, external <image>, <style> are gone from what is rasterised ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > the sanitiser names what it removed and clamps stdDeviation ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > CSS escapes, image-set and function calls in style or presentation attributes are removed ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > a non-finite or empty viewBox falls back to the 0.6 ratio, never NaN ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > <!ENTITY> and 257 <use> are refused: the export fails as snapshot_invalid ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > a huge root viewBox is clamped to a 1200×2400 raster ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts hostile SVG assets > horse.svg and paws-in-harmony.svg pass with nothing removed and an identical serialisation ported cargo pdf_serialize::export_side_security_cases_hold - export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)
|
||||
packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > report ids named __proto__ print raw and pollute nothing ported cargo pdf_layout::o1_draw_logs_match_the_typescript_at_full_precision O1 -
|
||||
packages/pdf/tests/security.test.ts __proto__ ids and the inflate bomb > inflates a normal payload and returns null for a 24 MB bomb ported cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node O7 -
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > writes /URI as the hex of the ASCII bytes, no UTF-16 BOM, and reloads to the URL ported R4.4/R4.5 cargo (pending) O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a URL with a code point above 0x7e or below 0x21 throws branding_invalid at the sink ported R4.4/R4.5 cargo (pending) O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > the link sink alone keeps the whole URL inside the /URI string ported R4.4/R4.5 cargo (pending) O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > exportFromEnvelope refuses the URL before drawing anything: branding_invalid ported R4.4/R4.5 cargo (pending) O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a credit URL with a parenthesis and a broken label set are refused the same way ported R4.4/R4.5 cargo (pending) O2 link sink
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8193 × 1 → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 8193 → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 4097 × 4096 (over 4096²) → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 12000 × 12000 (144 Mpx) → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 0 × 0 → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 0 → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8192 × 0 → dimensions ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the raw-size budget: 16 MiB of scanlines at most, whatever the pixel count ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 255 → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > colour type 5 → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > interlace 1 (Adam7) → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > filter method 1 → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > compression method 1 → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 4 for RGBA → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 16 for a palette → ihdr ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > every colour type and depth the spec allows passes with a matching IDAT ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an IDAT stream that is truncated, empty, not zlib or off by one raw byte → idat ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the IDAT stream may span several chunks ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a wrong signature or a truncated header is refused; the real logos pass ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the chunk walk refuses a second IHDR, an APNG acTL and a length past the buffer ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a chunk UPNG reads with nextZero, or any type outside the allowlist, is refused ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the list must end on an empty IEND that closes the buffer; ancillary chunks pass ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an oversized header logo fails alone with logo_failed and never reaches embedPng ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a doubled-IHDR header logo fails alone with logo_failed and never reaches embedPng ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a tEXt-without-NUL header logo (UPNG would spin) fails alone with logo_failed and never reaches embedPng ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a truncated-IDAT header logo (UPNG inflateRaw would read past the buffer) fails alone with logo_failed and never reaches embedPng ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a 1 × 0 header logo fails alone with logo_failed and never reaches embedPng ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the real logos reach embedPng when the gate passes them ported R4.4/R4.5 cargo (pending) O6 -
|
||||
packages/pdf/tests/size.test.ts demo envelope size > nologos: stored attachment under 250,000 bytes ported R4.4/R4.5 cargo (pending) O2 E2 budget
|
||||
packages/pdf/tests/size.test.ts demo envelope size > logos: stored attachment under 250,000 bytes ported R4.4/R4.5 cargo (pending) O2 E2 budget
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > writes /URI as the hex of the ASCII bytes, no UTF-16 BOM, and reloads to the URL ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a URL with a code point above 0x7e or below 0x21 throws branding_invalid at the sink ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > the link sink alone keeps the whole URL inside the /URI string ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > exportFromEnvelope refuses the URL before drawing anything: branding_invalid ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink
|
||||
packages/pdf/tests/security.test.ts branding URL injection (HIGH) > a credit URL with a parenthesis and a broken label set are refused the same way ported cargo pdf_serialize::export_side_security_cases_hold O2 link sink
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8193 × 1 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 8193 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 4097 × 4096 (over 4096²) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 12000 × 12000 (144 Mpx) → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 0 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 1 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > 8192 × 0 → dimensions ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the raw-size budget: 16 MiB of scanlines at most, whatever the pixel count ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 255 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > colour type 5 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > interlace 1 (Adam7) → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > filter method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > compression method 1 → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 4 for RGBA → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > depth 16 for a palette → ihdr ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > every colour type and depth the spec allows passes with a matching IDAT ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an IDAT stream that is truncated, empty, not zlib or off by one raw byte → idat ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the IDAT stream may span several chunks ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a wrong signature or a truncated header is refused; the real logos pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the chunk walk refuses a second IHDR, an APNG acTL and a length past the buffer ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a chunk UPNG reads with nextZero, or any type outside the allowlist, is refused ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the list must end on an empty IEND that closes the buffer; ancillary chunks pass ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > an oversized header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a doubled-IHDR header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a tEXt-without-NUL header logo (UPNG would spin) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a truncated-IDAT header logo (UPNG inflateRaw would read past the buffer) fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > a 1 × 0 header logo fails alone with logo_failed and never reaches embedPng ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/security.test.ts PNG budget (MEDIUM) > the real logos reach embedPng when the gate passes them ported cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib O6 -
|
||||
packages/pdf/tests/size.test.ts demo envelope size > nologos: stored attachment under 250,000 bytes ported cargo pdf_serialize::external_tools_accept_the_files_and_render_them_like_the_r3_build O2 E2 budget
|
||||
packages/pdf/tests/size.test.ts demo envelope size > logos: stored attachment under 250,000 bytes ported cargo pdf_serialize::external_tools_accept_the_files_and_render_them_like_the_r3_build O2 E2 budget
|
||||
packages/pdf/tests/text.test.ts safeText > keeps the WinAnsi glyphs the pages use ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 -
|
||||
packages/pdf/tests/text.test.ts safeText > replaces unencodable glyphs by ? and strips control characters ported cargo pdf_text::safe_text_reproduces_every_oracle_range, pdf_text::safe_text_works_on_whole_strings O4 -
|
||||
packages/pdf/tests/text.test.ts safeText > wrapLines splits on any whitespace first, then makes each word safe ported cargo pdf_text::wrap_lines_reproduces_every_case O4 -
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 44 and column 158.
|
@@ -751,3 +751,56 @@ fn restoration_round_trip_loses_nothing() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The export-side security cases of the TypeScript suite: a hostile SVG asset in the
|
||||
/// snapshot is `snapshot_invalid` before any page; a URL that would close a literal string
|
||||
/// never reaches the file (the schema refuses it, and the link sink writes hex ASCII only);
|
||||
/// a PNG logo the gate refuses fails alone with `logo_failed`.
|
||||
#[test]
|
||||
fn export_side_security_cases_hold() {
|
||||
use faunosteo_core::pdf::write::input::{ExportWarning, LogoSlot, check_input};
|
||||
let r3 = fixture("pdf/r3/demo.fr.logos.pdf");
|
||||
let envelope = envelope_of(&r3);
|
||||
// Hostile asset: an SVG with a doctype (the reader refuses it; the TS sanitiser did too).
|
||||
let mut hostile = envelope.clone();
|
||||
let doctype = std::fs::read_to_string(
|
||||
repo_root().join("crates/core/tests/fixtures/svg/hostile/doctype-entities.svg"),
|
||||
)
|
||||
.unwrap();
|
||||
hostile["sheetSnapshot"]["assets"][0]["svg"] = Value::String(doctype);
|
||||
let err = check_input(input_from(&hostile)).err().unwrap();
|
||||
assert_eq!(err.kind.as_str(), "snapshot_invalid");
|
||||
assert!(err.detail.starts_with("asset "), "{}", err.detail);
|
||||
// URL injection: refused by the schema; the sink is hex ASCII for the accepted ones.
|
||||
let mut injected = envelope.clone();
|
||||
injected["branding"]["siteUrl"] =
|
||||
Value::String("https://a.b/) /Next << /S /JavaScript >>".to_owned());
|
||||
assert_eq!(
|
||||
check_input(input_from(&injected)).err().unwrap().detail,
|
||||
"branding"
|
||||
);
|
||||
let text = String::from_utf8_lossy(&stub_run("demo", "fr", "logos").r4).into_owned();
|
||||
assert!(!text.contains("/URI ("), "URIs are written as hex strings");
|
||||
assert!(
|
||||
text.contains(&format!(
|
||||
"/URI <{}>",
|
||||
"https://faunosteo.com"
|
||||
.bytes()
|
||||
.map(|b| format!("{b:02x}"))
|
||||
.collect::<String>()
|
||||
))
|
||||
);
|
||||
// A refused PNG logo: the slot fails alone, the export completes with the warning.
|
||||
let mut bad_logo = envelope.clone();
|
||||
bad_logo["branding"]["headerLogo"] = json!({ "kind": "png", "base64": "iVBORw0KGgo=" });
|
||||
let input = input_from(&bad_logo);
|
||||
let rasters = stub_rasters(&input, &base64(TWO_BY_ONE_PNG));
|
||||
let result = export_pdf(input, &rasters).unwrap();
|
||||
assert_eq!(
|
||||
result.warnings,
|
||||
vec![ExportWarning::LogoFailed {
|
||||
slot: LogoSlot::HeaderLogo
|
||||
}]
|
||||
);
|
||||
assert!(read_attached_document(&result.pdf, ProbeLimits::PRODUCTION).is_ok());
|
||||
}
|
||||
+21
-8
@@ -70,6 +70,15 @@ const LOCATE = 'cargo pdf_import::o7_locate_and_read_match_the_typescript'
|
||||
const INFLATE =
|
||||
'cargo pdf_inflate::every_o9_row_matches_node, pdf_inflate::every_o7_flate_input_matches_node'
|
||||
const WRITER = 'R4.4/R4.5 cargo (pending)'
|
||||
// R4.5 targets: the serialiser suite against the O2 PDFs and the PNG suite against O6.
|
||||
const O2 =
|
||||
'cargo pdf_serialize::o2_streams_images_links_info_and_attachment_match_the_r3_build'
|
||||
const EXTERNAL =
|
||||
'cargo pdf_serialize::external_tools_accept_the_files_and_render_them_like_the_r3_build'
|
||||
const ROUND_TRIP = 'cargo pdf_serialize::restoration_round_trip_loses_nothing'
|
||||
const SECURITY_EXPORT = 'cargo pdf_serialize::export_side_security_cases_hold'
|
||||
const PNG_GATE =
|
||||
'cargo pdf_png::every_o6_gate_verdict_matches_png_issue, pdf_png::every_o6_decode_matches_pdf_lib'
|
||||
// R4.4 targets: the layout and text suites (one cargo test checks every frozen row).
|
||||
const LAYOUT =
|
||||
'cargo pdf_layout::o1_draw_logs_match_the_typescript_at_full_precision'
|
||||
@@ -157,7 +166,7 @@ const RULES = [
|
||||
file: SECURITY,
|
||||
title: 'hostile SVG assets > ',
|
||||
...ported(
|
||||
WRITER,
|
||||
SECURITY_EXPORT,
|
||||
NONE,
|
||||
'export SVG path; R4 refuses where the TS sanitised (A.3, RUST.md §9.4)',
|
||||
),
|
||||
@@ -165,10 +174,14 @@ const RULES = [
|
||||
{
|
||||
file: SECURITY,
|
||||
title: 'branding URL injection (HIGH) > ',
|
||||
...ported(WRITER, 'O2', 'link sink'),
|
||||
...ported(SECURITY_EXPORT, 'O2', 'link sink'),
|
||||
},
|
||||
{ file: SECURITY, title: 'PNG budget (MEDIUM) > ', ...ported(WRITER, 'O6') },
|
||||
{ file: `${PDF}goldens.test.ts`, ...ported(WRITER, 'O1/O2') },
|
||||
{
|
||||
file: SECURITY,
|
||||
title: 'PNG budget (MEDIUM) > ',
|
||||
...ported(PNG_GATE, 'O6'),
|
||||
},
|
||||
{ file: `${PDF}goldens.test.ts`, ...ported(O2, 'O1/O2') },
|
||||
{
|
||||
file: `${PDF}text.test.ts`,
|
||||
title: 'formatDate > ',
|
||||
@@ -185,9 +198,9 @@ const RULES = [
|
||||
...ported(LAYOUT, 'O4', 'the layout draws the safe text'),
|
||||
},
|
||||
{ file: `${PDF}text.test.ts`, ...ported(SAFE_TEXT, 'O4') },
|
||||
{ file: `${PDF}size.test.ts`, ...ported(WRITER, 'O2', 'E2 budget') },
|
||||
{ file: `${PDF}raster.test.ts`, ...ported(WRITER, 'O2/O4') },
|
||||
{ file: `${PDF}reexport.test.ts`, ...ported(WRITER, 'O2') },
|
||||
{ file: `${PDF}size.test.ts`, ...ported(EXTERNAL, 'O2', 'E2 budget') },
|
||||
{ file: `${PDF}raster.test.ts`, ...ported(O2, 'O2/O4') },
|
||||
{ file: `${PDF}reexport.test.ts`, ...ported(ROUND_TRIP, 'O2') },
|
||||
// Oracle generators, deleted with the TS they freeze; the oracle files stay
|
||||
...[
|
||||
[`${PDF}r3.highlight-oracles.test.ts`, 'R3 highlight'],
|
||||
@@ -247,7 +260,7 @@ const RULES = [
|
||||
{ file: `${APP}n-1.reader.test.ts`, ...kept(NONE, N1_SWITCH) },
|
||||
{
|
||||
file: `${APP}pdf.export.app.test.ts`,
|
||||
...ported('R4.5 cargo from_envelope (pending)', NONE),
|
||||
...ported(ROUND_TRIP, NONE, 'export_from_envelope'),
|
||||
},
|
||||
{ file: `${APP}migration.leaves.test.ts`, ...kept(NONE) },
|
||||
{ file: `${APP}pdf.browserRasterizer.test.ts`, ...kept(NONE) },
|
||||
|
||||
Reference in new issue
Block a user