github Dicklesworthstone/slb v0.5.1

4 hours ago

Safety patch release. It closes classifier bypasses reported in #22. Thanks to @JYeswak for the report. Full details and commit links are in CHANGELOG.md.

Fixed

  • TRUNCATE without TABLE is CRITICAL in a SQL context: a client's command line (psql -c 'TRUNCATE users', glued -c'...', psql.exe), input fed to a client (here-strings, pipes, heredocs), a bare TRUNCATE statement, or a ;-terminated statement. The coreutil truncate -s 0 f and searches like rg truncate src stay unclassified. The exported Python hook has the same rules.
  • Quoted shell operators no longer hide the rest of a command. For example, psql -c 'SELECT 1; DROP DATABASE prod' is now classified on its full text.
  • Redirections no longer hide arguments. git push >/dev/null --force origin main, </dev/null git push --force ..., psql 2>&1 -c 'DROP DATABASE prod', >| and named fds ({fd}>f) are classified by the command's real argv.
  • Here-string words are no longer spliced into argv. kubectl delete <<<'pod x' namespace prod and rm <<<'-f a.log' -rf /etc can no longer pass as allowlisted commands.
  • A number glued to &>/&>> stays an argument. rm -f 1&>/dev/null a.log is no longer read as the log-only rm -f a.log.
  • Redirection stripping now runs in linear time (a 1 MB command took ~4 min, now 0.1 s). The bare TRUNCATE rule no longer backtracks quadratically in the Python hook.

Upgrade note

A config file (user or project) that sets patterns.critical.patterns replaces the built-in CRITICAL list rather than extending it. If yours does, copy the new TRUNCATE rules from internal/config/defaults.go into your list, or those commands will stay unclassified.

Assets

slb_0.5.1_<os>_<arch>.tar.gz (.zip on Windows) for linux/darwin amd64+arm64 and windows amd64. Each has a .sha256 sidecar. SHA256SUMS and checksums.txt cover all archives, and SHA256SUMS.minisig is the minisign signature (key 1BBD79B28BF718D0, same as v0.5.0). Version, commit and build date are embedded (slb version).

Don't miss a new slb release

NewReleases is sending notifications on new releases.