Repository navigation
v0.10.1
Security
- A private key replaced in place in a text file is found. The secret scan reads the uncommitted diff, which
shows only changed lines: a key whose body changed while its BEGIN line stayed the same never showed its BEGIN line,
so it was not recognised (files git shows as binary already got this in 0.9.2). Now lanq greps the snapshot's changed
text files for-----BEGIN(git grep --cached, only those files), and for each modified or renamed one compares its
old and new blobs (read by object id, no filters or textconv): an unchanged BEGIN line is scanned again only for a key
block: a line holding-----END(any case) within 8192 lines, every line strictly between them key material (after
stripping whitespace, runs of the characters" ' + . & , ; # * > | - /at the start and" ' + . & , ; _ \ |at
the end (quotes, concatenation, comment and quote markers, a YAML-, a\continuation), one-letter string
prefixes and short suffixes (b","u8),\nand\r\nescapes and XML CR/LF character references: blank, base64 or an armor header such asProc-Type: ...), at least one a base64 line of 16 or more
characters with a digit,+or/(lines over 16 KB are never key material), and the new line strictly between BEGIN and END (an edit to the END line alone does not count). Code
that handles PEM (header and footer constants, adjacent or with parser code between them) never refuses an edit; a
key in a string concatenation, a comment or a YAML block is still found. A key with no END line, longer than 8192
lines or written in a form not stripped (see SECURITY.md) is not found when replaced in place, and neither is a
UTF-16 text file adiffattribute forces to text. A changed text file (modified or renamed, with added lines) whose
path git gives in bytes that are not UTF-8 refuses the job (scan-incomplete); other files with such names pass as
before. The finding readsprivate-key-block in uncommitted file <path> (key block changed in place)and never shows the key. A file lanq cannot look up or read refuses the job
(scan-incomplete, with agit fsckhint). Such a file is read up to 32 MB per version and 256 MB in all; one over
that is listed inscanSkippedwith the new reasontext_over_cap(the larger version's size) and on stderr, not
refused. Added files are not read (every line is already in the diff), nor files without a BEGIN line. - Colliding file names fail closed. Two changed paths that git gives in bytes that are not UTF-8 and that decode
to the same name now refuse the job (scan-incomplete), whatever the files are. Before, one of them could hide the
other from the content scans, the binary scan included. - One rename mode for the text scan. The diff, its file list and the new comparison now always use
-M,
whateverdiff.renamessays, so a renamed file is compared with its old version everywhere. The pathspec variables (GIT_LITERAL_PATHSPECS,
GIT_GLOB_PATHSPECS,GIT_NOGLOB_PATHSPECS,GIT_ICASE_PATHSPECS) are removed from lanq's local git calls. The binary scan
keeps--no-renames(a moved binary is read whole).
Added
-
A Linux worker in Docker on your own PC.
scripts/docker-linux-worker/holds aDockerfile, an entrypoint, an
sshd drop-in andsetup.ps1. The image is the .NET 10 SDK on Ubuntu 24.04, pinned by digest (runtime 10.0.15), plus
sshd and git, with key-only login aslanq.setup.ps1:- makes the key, the host key and a private ssh config entry with an
Includeat the top of~/.ssh/config; - runs the container on
127.0.0.1only, withrestricton the key, 8 GB, 4 CPUs (with a matching cpuset),
--cap-drop ALLplus the six capabilities sshd needs,--initand--restart unless-stopped; - mounts the host key under
/root, so job code cannot read it; - checks the result with
ssh -Gand one login.
A separate
-Registerstep, run by the owner, adds the machine (size: medium,max_jobs: 1) tomachines.yml
andmachines.smoke.yml. It keeps the change only whenlanq doctor --remotepasses for the machine in every
file, and restores them all otherwise. See
docs/WORKERS.md, "A Linux worker in Docker on your own PC", for what it proves and what it does not. - makes the key, the host key and a private ssh config entry with an
-
A test checks that the Docker worker's base image is pinned by digest.
Behaviour changes
- Edits to sample keys kept in tracked text files are now refused: changing the body of a committed private key (a
test fixture, a doc sample) under the same BEGIN line refuses the run like a new key. Generate test keys when the
tests run, or keep such samples out of the files you edit. - A user whose
diff.renamesisfalsenow gets rename-aware file lists and diffs for the scan: a renamed file's
old name is no longer listed among the changed files (its new name is).
Documentation
- SECURITY.md and the README now say that the uncommitted diff is scanned with its removed lines too (so removing a
secret from a tracked file is refused until that removal is committed), and describe the text key-block comparison
and its limits;scanSkippeddocumentstext_over_cap.
Full changelog: https://github.com/jangolath/lanqueue/blob/main/CHANGELOG.md
What's Changed
- v0.10.1: catch private keys replaced in place in text files; Docker Linux worker by @jangolath in #21
- CHANGELOG: date the 0.10.1 section by @jangolath in #22
Full Changelog: v0.10.0...v0.10.1