Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/contributing/runtime-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,24 @@ Every other pattern has already been applied to the decoded key or value, so a
match on the serialized bytes would be a redaction placeholder plus JSON escape
characters, not a secret (#5705).

A private-key block can also span members or records: one string holds the BEGIN
marker, another the body, a third the END marker. Masking any of them would hide
the marker from every later scan, so such a block is detected on a decoded view
of the document or stream before anything is rewritten, and handled where it
lives. The members the match starts and ends in carry marker text, so they are
always masked — even when a marker is split across two members and neither
fragment looks like one alone. A member in between is masked when it carries a
block marker, a run that looks like body material (16+ base64 characters mixing
upper case, lower case and a digit, and not hex only), or when the joined text of
consecutive members does, which is what catches a body split into short chunks. An
object key keeps its name unless the name itself is block content, so a document
that merely quotes the PEM header in one finding and the footer in another keeps
the shape `review-result.schema.json` accepts, including its enum-valued fields.
A body split so that one-character and longer chunks alternate is a known
residual; uniform chunks and complete body lines are masked. Records that carry
part of a block across a record boundary are replaced with a fail-closed marker
instead, because the framing itself cannot be rewritten.

Some content cannot be redacted in place. A JSON document or JSONL record is
replaced with a valid fail-closed marker instead — never with corrupted
syntax — when a redaction would invalidate the JSON or a match spans record
Expand Down
5 changes: 4 additions & 1 deletion docs/guides/user/run-artifacts-and-private-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ document, or the JSONL record that carries it, with a JSON error marker, and a
file whose redacted content cannot be read, written or computed is replaced by
such a marker and fails the run. If the marker cannot be written and the file
cannot be removed either, the run's error says the unredacted file is still on
disk. When a
disk. A private-key block that spans JSON members is handled in place instead:
object keys keep their names unless a key name is itself a line of the key body,
and each string value — or key name — that carries block text or base64 key
material becomes `[REDACTED PRIVATE KEY]`. When a
replacement happens in a run that still exits 0, the job log says so. On GitHub
Actions this is an error annotation: fullsend writes a `::error::` workflow
command whenever the job sets `GITHUB_ACTIONS=true`, and GitHub Actions renders
Expand Down
Loading
Loading