Skip to content

v4.23.2

Choose a tag to compare

@github-actions github-actions released this 30 Nov 12:11
· 12 commits to main since this release
3ed2634

A security release. A credential in a connection value is never shown as a host or a database name, evidence masks
the value beside any name that marks a secret, quoted or not, and a token that a finding reports is masked wherever
it stands. Earlier versions could copy a database user name and part or all of a password or a token into map and
passport output, the session-start briefing, an emitted sandbox policy and scan evidence, and the hook command could
run a program named in a scanned folder's git settings; see Security below.
Evidence can still show a secret that no name marks, and some long lines are still slow to scan: "Not covered", at
the end of that section, lists what remains.

Measured before release on the same 1,840 repositories, in locked-down containers, against 4.23.1. The scan reports
the same 269,144 findings in every repository, and every Jank Score is unchanged. The evidence text of 206 findings
differs, and each of them masks more: 142 gain a mask, and in 64 a mask covers more of a value. No evidence line of
this release holds a token in a format this tool knows; one line of 4.23.1's did. The reach map was measured the
same way and differs in 16 repositories. Nine host values that were never hosts are gone (six ... placeholders, a
name ending in -, a fragment of code, and SQL Server's ., now localhost); eight hosts are new (seven
https://host?query URLs that were unresolved targets, and that localhost); eight targets carry the new
unreadable mark; no database name changed.

Map snippets were compared by file and line. 463 of about 232,000 differ, in 102 repositories. In 448 of them
nothing new can be read, except that 102 keep a quote or a bracket that a mask used to take with it. In 12, more
of a long line's end comes into view because a mask made the text before it shorter. In 2 the host of a database
URL is shown where the whole URL used to be hidden; its credentials are not. One is cut at a different place.

The measurement also caught four faults in earlier candidates, corrected before release. The wider masks decided
findings in n8n exports: 137 new critical findings, nearly all of them ordinary code such as
newPassword = $json.password. The unreadable count fired in 116 repositories on wildcards and placeholders that
were never shown as hosts. Two findings showed more of a password in a URL's query than 4.23.1 did. And once the
masks were widened, 40 map snippets in 14 repositories showed a database user name in place of the host: the mask
of a default written into a reference took the @host after it. That one was found only when snippets were
compared by file and line. A snippet's id is made from its text, so the comparison by id used until then had
skipped every snippet that changed.

Changed

  • references/soak.md says which releases were measured on the full 1,840 repositories before they shipped
    (4.22.0, 4.22.1, 4.22.2 and 4.23.1) and which were not: 4.22.4, 4.22.5 and 4.23.0 were compared on 126
    repositories, and 4.22.3 was not measured. It used to say every release since 4.22.0 was.
  • Those four releases are now measured on the 1,840, after the fact (2026-11-29), each against the release before
    it. 4.22.3 and 4.22.4 report the same 269,132 findings as 4.22.2 in every repository. 4.22.5 reports 17 more, in 2
    repositories: MCP servers after the tenth in a config file, which JH705 used to leave out. 4.23.0 reports the
    same 269,149 as 4.22.5; 27 of them, in 3 repositories, are in files whose name holds a tab or a line break and is
    now shown escaped. No release in that range stopped reporting a finding, and no Jank Score changed.
    references/soak.md has the table.
  • SQL Server connection strings: Server=., (local) and (localdb) name this machine (trust domain local), and
    an instance name after a backslash (db.internal\Reports) is no longer part of the host. Before, . was mapped
    as an external host named . and localhost\SQLEXPRESS as an internal host of that name. A port or service
    written after the host (Host=db.internal:5432, Oracle's Data Source=db.internal:1521/ORCL) is no longer part
    of it either. A named-pipe server (np:...) is now an unresolved target counted under
    unreadable-endpoint-values.
  • review --baseline: a finding is matched to a baseline by its rule, its path and its evidence text. A finding
    whose evidence gains a mask in this release is therefore new against a baseline saved by an earlier version, and
    its old entry counts as resolved. Save a new baseline after upgrading (review --save-baseline).
  • map: an evidence item's id and hash are made from its snippet among other things. An item whose snippet is
    masked differently by this release has a new id, and the nodes and edges that refer to it name the new one.

Fixed

  • The map read the wrong host from a URL with an @ in its query or fragment and no path:
    http://localhost:8080?email=a@b.example was mapped to b.example, and scan evidence showed it as
    http://localhost:***REDACTED***@b.example, the port masked as if it were a password. The host is now the text
    before the first /, ? or #, and such a URL is shown as written. A database URL with a query and no path
    (postgres://db.internal?sslmode=require) was an unresolved target and now keeps its host.

Security

Each of these could copy a credential from the scanned project into a report. A map, a passport, a session-start
briefing, an emitted sandbox policy or a scan report made by an earlier version from a project that holds such a
value may contain it.

  • A database user name and part of its password could be shown as a host. A connection value with a ; inside
    its password, such as the libpq string host=db dbname=x user=svc password=abc;... in .env,
    appsettings.json, a compose or Kubernetes environment value or an MCP server's environment, was read as a
    ;-separated string, and everything before the first ; became the host. map and passport output and the
    session-start briefing then named db dbname=x user=svc password=abc as a host. A database name holding other
    settings (Database=x user=svc password=...) was stored the same way. Now a host must be a plain DNS name or IP
    address of at most 253 characters, and a database, bucket or path name at most 128 letters, digits, _, $,
    ., -, %XX escapes and single spaces. A target without a readable host is shown as unresolved, a name that
    cannot be read is left out, the node lists what could not be read (attributes.unreadable), and the new
    unreadable-endpoint-values unknown counts these nodes. Neither value is printed.

  • A database URL with a / in its password could be shown whole. postgres://user:12/rest@host/db was read as
    host user, port 12 and database rest@host; the real host was missing from the map, and an emitted sandbox
    policy listed user among the allowed hosts. Drivers that split at the last @ accept a password with /, ?
    or # written unescaped; the user information of a database or queue URL now ends at that @ too, and so does
    any other URL's when the text before its first / cannot be host:port. In code, a URL in a string literal is
    read to the quote that opened the literal, so a password holding the other kind of quote no longer cuts the URL
    before its host.

  • Evidence could show a password, or the end of one, in scan findings and in map and passport snippets:

    • an unquoted value after a name ending in password (PGPASSWORD=..., DB_PASSWORD=..., sslpassword=...,
      trustStorePassword=...) or after an upper-case environment name holding SECRET, TOKEN, API_KEY,
      ACCESS_KEY, PRIVATE_KEY, PASSWD, PASSPHRASE or CREDENTIALS (API_KEY=..., JWT_SECRET=...) was not
      masked, so a finding on a shell or Dockerfile line printed it;
    • masking stopped at a ; inside the value (password=abc;...), at a space inside a value of a ;-separated
      string (Password=my pass phrase;), at a quote inside the value (PASSWORD=ab'...), at the first @ of a URL
      password (postgres://user:p@ss@host) and, in map snippets, after an escaped quote (password='it\'s ...');
    • a URL password that held a quote, or had no user name before it (redis://:...@cache), and a Go DSN password
      that held a quote or a space (user:ab"...@tcp(...)) were not masked in scan evidence; a map snippet of a URL
      whose password held a ; or a quote showed the user name;
    • an Oracle password in jdbc:oracle:thin:user/password@host was not masked at all (a map snippet hid it only
      when it happened to look like an email address), and a map snippet of a Go DSN or an Oracle connection showed
      the user name.

    These values are now masked whole. Where an unquoted value ends is read from what separates the settings around
    it (references/connectivity.md, "Redaction and safety"). The two wider masks, after a longer name ending in
    password and after an upper-case environment name, hide text in evidence and decide no finding: what counts as
    a credential for a finding is as in 4.23.1.

  • Evidence showed the value beside most names that mark a secret. Only a short list of names was read
    (password, token, secret, api_key and a few more), most of them only with a quoted value. A finding on a
    line such as DB_PASS=..., POSTGRES_PASSWORD: ..., $db_pass = '...', define('DB_PASSWORD', '...'),
    app.config['SECRET_KEY'] = '...', dataSource.setPassword("..."), curl -u deploy:... or sshpass -p ...
    printed the value. A name is now read part by part (DB_PASS, smtpPass, x-api-key,
    spring.datasource.password, APP_KEY), and the value beside it is masked:

    • after =, : or =>, quoted or not, also behind a subscript (config["db_pass"] = ...), a type
      (password: str = "...", Go's var dbPass string = "..."), a conversion ([]byte("...")) or escaped quotes
      ({\"api_key\": \"...\"});
    • as the string after a quoted name (setenv("DB_PASS", "..."), ["--password", "..."]), the string given to
      a call named for a secret (setPassword("..."), .password("...")), and a default written after the variable
      it stands in for (getenv('DB_PASS') ?: '...', process.env.JWT_SECRET || '...');
    • in an XML element or attribute pair named for a secret (<password>...</password>,
      <add key="DbPassword" value="..." />), and where a name and its value are two settings
      (name: DB_PASS value: ...; in a Kubernetes manifest a value: line is read with the name: line above it);
    • after a flag named for a secret (--api-key ..., PowerShell's -Password '...'), in a URL's query
      (?client_secret=...), and as a long token used as a URL's user name (https://TOKEN@host);
    • where a keyword or a well-known call marks it: SQL's IDENTIFIED BY '...' and PASSWORD '...', what follows
      Bearer or Basic, the password argument of mysqli_connect, PDO, getConnection, login, jwt.sign
      and similar calls, a .netrc line, ConvertTo-SecureString '...', and the password flags of curl, http,
      sshpass, mysql, docker login, mongosh, redis-cli, sqlcmd, ldapsearch, smbclient, unzip and
      openssl;
    • as a setting written NAME value (a Dockerfile's ENV NAME value, requirepass ... in redis.conf,
      ssl_certificate_password ...;).

    In a data file (YAML, .env, a Dockerfile, a shell script, a Makefile, .ini, .properties) every unquoted
    value beside such a name is masked. In code and prose an unquoted value is masked unless it reads as code or a
    word: token: userToken and password: must be longer stay readable, password: hunter2 does not. Beside a
    bare key or auth, and beside a key that is no secret by its name (cache_key, storage_key), a value is
    masked only when it reads as a secret. A reference ($TOKEN, ${{ secrets.X }}, '${key}', "%s"), a switch,
    a short number and a name about a secret (token_url, secret_name, hasKey) are left alone, so what a finding
    points at stays readable. These masks hide text and decide no finding.

    Tried on 2,647 invented lines that each hold a made-up credential, written for this purpose in 36 kinds of
    file: 4.23.1 shows the credential in 1,943 of them, this release in 603. What is still shown is described under
    "Not covered" below.

  • A finding could print the token it reported. JH101 reports a token in a known format wherever it stands
    on a line; evidence masked a token only at the edge of a word. Where an AWS access key id or a GitHub, Slack or
    Stripe token stood directly against another letter, a digit or an underscore (fooAKIA..., xghp_...,
    ghp_..._old), or a GitLab token ended in -, the finding's evidence showed it: whole, or for a Slack token
    followed by _, from its second group on. Map and passport snippets showed the AWS, Slack, Stripe and GitLab
    ones too. This is in every earlier version. Evidence and snippets now mask every token format the rule reports,
    as the rule reports it. These masks hide text and decide no finding.

  • A default written into a reference was shown. In a Compose file or a shell script,
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-...} and ${ADMIN_TOKEN:=...} hold a literal password as the default,
    and evidence and snippets showed it. It is now masked, as far as its closing brace; ${NAME:?message} and
    ${NAME:+other} hold no value of the name's and are left alone. A URL whose password is a reference with white
    space in it (user:${DB_PASSWORD:?set it}@host) was not read as a URL with a password, so a map snippet showed
    its user name; such a reference is now read whole. And a map snippet shows no host for a URL when a mask has
    taken the rest of its authority, because what stands before the mask may be a user name.

  • A long line of joined words could take minutes to scan. Two patterns of JH101, and the evidence mask's copy
    of them, read a line of parts joined by - or _ (a-b-c-...) again from every part: a file with one such line
    of 150,000 characters took more than two minutes to scan, and a longer line took time that grew with the square
    of its length. This is in every earlier version. A name now has at most 16 parts before the word that marks it.
    Other readers that cost the same were corrected with them: a credential in a URL's query, repeated; an email
    address in a map snippet of a long dotted line; a Power Fx name holding password many times; and a long run of
    blanks before image:, uses: or name: in a YAML file. Masking a line now takes time in step with its length:
    a line of a million characters takes seconds. What is still slow is under "Not covered".

  • A line of repeated names could take minutes to mask. A change made earlier in this release let a quoted
    value be read again from every name inside it: 20,000 repetitions of pwd = ' on one line took 49 seconds. It
    never shipped. A quoted value is now read once, and no value is read further than 65,536 characters.

  • The hook command let a scanned folder's git settings run a program. In 4.23.0 and 4.23.1, jankhunt42 hook start and hook stop started git four times without the settings every other git call applies, so a program
    named in the folder's own .git/config (core.fsmonitor, hooks) ran with the user's rights. A repository
    cloned with git does not carry its .git/config; a folder unpacked from an archive, copied from elsewhere or
    shared with others can. Every git call now goes through one helper that switches those settings off, and a test
    checks that no module starts git any other way.

  • Control characters and oversized values. A host with a control or bidi character
    (Server=odbc<U+202E>x.example) reached map JSON and HTML unchanged, and a 1.4 MB Server= value made a 2.8 MB
    report. Both are now refused as hosts. Text stored on a node, and allowlist entries from a repository's own
    sandbox settings shown in the map's egress section, have control and bidi characters neutralized; allowlist
    entries are shown at most 300 characters long.

  • Masking could take minutes on a hostile line. Masking a Go DSN password took time that grew with the square
    of the line length: one 160,000-character line of a: pairs took about 36 seconds. That reader now takes time
    in step with the length of the line.

Not covered, and stated in references/connectivity.md. Evidence is the source line with the values this tool
recognises masked: a name, a flag, a command or a token format has to mark a value. It still shows:

  • database user names, in scan evidence (map and passport snippets hide them);
  • a secret that nothing marks: an argument of a call or a command that is not one of those above
    (connect(host, user, "..."), htpasswd -b file user ..., echo ... | docker login --password-stdin,
    tool -p ...), and a value alone on its line with no name on the line above;
  • an unquoted value of letters only beside a lower-case or mixed-case name, in code or prose (smtp_pass: hunter
    in a .md or .py file; a data file masks it);
  • beside a bare key or auth, or a key that is no secret by its name, a value that does not read as a secret
    (fewer than twelve characters, or no digit);
  • a quoted value that starts like a reference ('$x', "{{ x }}", "%s", "<token>"): it is read as one even
    where the file's own rules make it a literal (single quotes in a shell script);
  • a value beside a name written as several words (pass phrase: ...);
  • the rest of an unquoted value that has a space in it, outside a ;-separated string;
  • a value that continues on the next line (a YAML block, the body of a key);
  • in map and passport snippets: a Kubernetes value: line (it is not read with the line above it there);
  • a token written directly against another letter, digit or underscore when its format is one that is reported
    only at the edge of a word (npm, Hugging Face, Groq, SendGrid, DigitalOcean, Shopify, Sentry, CircleCI, Doppler,
    Shippo, Brevo and Postman tokens, a JSON web token), or when it is too short to be reported.

Map and passport snippets are read as source lines, like scan evidence. A label or a name the tool writes itself
(a host, a credential's name) is not: what follows its colon is what the thing is called.

A value in one of these places is still masked when it has a known token format. A connection string that is
invalid under its own format can still be read in the wrong place. An unquoted secret on a YAML, .env,
Dockerfile or shell line is also not reported as a finding of its own unless it has a known token format: such a
line reaches a report when another finding is on it.

Scan time is not covered either. A line of hundreds of thousands of characters made of one piece repeated can
still take minutes to scan: exec( or SELECT ... FROM in any code file, curl in a shell script, a/ in a
JavaScript or TypeScript file, name.call( in a C# file. Four rule patterns (in JH104, JH105 and JH111) and
two language checks read such a line again from every repeat; one line of 48,000 characters takes 3 to 12 seconds,
and time grows with the square of the length. This is in every earlier version. Give a scan of code you do not
trust a time limit.

What's Changed

  • Docs: say which releases were measured on the full 1,840 repositories by @cloudbustinguk in #56
  • Docs: 4.22.3 to 4.23.0 measured on the 1,840 repositories after release by @cloudbustinguk in #57
  • 4.23.2: credentials in connection values are never shown as hosts, and their passwords are masked whole by @cloudbustinguk in #58

Full Changelog: v4.23.1...v4.23.2