Skip to the content ForoHackers
Log inJoin

Tabs or spaces in a generated security report: which diff can a reviewer trust?

Security educationTestingVersion control
#22234 · · Quote · Report

My generated vulnerability report looks aligned in a preformatted browser view, but every row changes in the byte diff when somebody changes tabs to spaces. The generator has two little formatter functions with different trailing whitespace, too. This is a local toy export, not customer findings. What do we promise the reviewer: exact bytes, fields, or a picture of a table? I wanted to fix one column. I have apparently founded a standards committee.

#22310 · · Quote · Report

If reviewers only see parsed fields, hidden controls can be missed. Escaping tabs and CR in a review view would make them visible.

#22311 · · Quote · Report

La vista escapada enseña \t y \r; ahí encontré un CR suelto que el terminal normal escondía.

#22312 · · Quote · Report

Escaping every Unicode codepoint would make the report hard to read. I would escape control characters and keep ordinary accents intact.

#22313 · · Quote · Report

I put U+202E in a test label and the JSON-escaped view exposes \u202e. The rendered line depends on its viewer. Flag the control and show its position; don't silently delete it and pretend the source was always innocent.

#22314 · · Quote · Report

Flagging a control is better than silently stripping it. The source may need the character; deletion changes data. No le quitemos la silla al dato por feo que se siente.

#22315 · · Quote · Report

Parser, bytes y controles escapados son demasiado panel para una lista pequeña. El valor por defecto debe ser conciso.

#22316 · · Quote · Report

Default summary: changed fields, changed row order, byte-only differences. Expand a row to see its raw escaped text. The reviewer shouldn't need three windows just to find one missing zero, but none of those differences should disappear.

#22317 · · Quote · Report

y prueba el resumen con tres salidas: idéntica, mismo contenido con otro salto, y una celda distinta. si las tres dicen cambiado, has construido una alarma que confirma que existe el mundo.

#22318 · · Quote · Report

Windows editors can save CRLF. CI should regenerate and report a mismatch instead of editing the working tree during a check.

#22319 · · Quote · Report

A check that rewrites the artifact leaves you reviewing a moving target. Generate to a separate output, compare, report. Let the author run the explicit update command. The cleanup crew should not rearrange the evidence while the reviewer is reading it.

#22320 · · Quote · Report

Editor config can suggest LF, but the generator and check enforce the file contract. An editor that ignores the suggestion still has to produce a valid artifact. This is why my favourite setting is the one that doesn't depend on everybody remembering it.

#22321 · · Quote · Report

two clean temporary directories, same source input, same formatter settings: compare outputs there first. then repeat from a clean project checkout. @Ophuscado ya estará buscando un adaptador entre ambos directorios; el cable imaginario no entra en el hash.

#22322 · · Quote · Report

Also unset the optional environment variables in one run. If the generator secretly reads a timezone or path you forgot to pin, identical settings files won't save it. My best reproducibility test once failed because of the name of my home directory.

#22323 · · Quote · Report

Pin only settings the generator actually reads, and record its version. A second machine is a useful extra test, not a ritual that proves every dependency is controlled. Please include the failing bytes when it disagrees; a red badge is a poor file format.

#22324 · · Quote · Report

we've tested the small byte/CSV cases here. the project checkout and second-machine runs still need doing before that broader claim. I'll bring the second machine when someone returns my table to being a table. lol.

#22325 · · Quote · Report

we have argued over a byte nobody sees until delivery and a field everyone can lose. the empty field wins this round; my soup lost, lol.

#22326 · · Quote · Report

taking away an export contract, reader cases and two diff views. the project's CI comes next; winning an argument about a tab doesn't mean i've shipped it. the soup is settled though: cold, no BOM.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply