Skip to content

Releases

sprawl-guard v0.7.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 00:44
Immutable release. Only release title and notes can be modified.

Changed

  • file_sizes in the ratchet file is now a table keyed by path, such as "assets/hero.png" = 2000000. A file in Git LFS has { max_bytes = 50000000, storage = "lfs" }. Ratchet files from 0.6.0 still work, and the next update --write or tighten --write rewrites them. Sprawl Guard 0.6.0 can't read a rewritten file, so upgrade every copy that checks the repository, including CI, before you commit it. If a file moved into or out of Git LFS, 0.6.0 may have recorded two ceilings for it, which this release rejects: delete the entry whose storage the file no longer uses.
  • JSON output reports a file that isn't in Git LFS with "storage": "regular" instead of "git".

sprawl-guard v0.6.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 21:51
Immutable release. Only release title and notes can be modified.

This release adds byte limits on file sizes and publishes Sprawl Guard on PyPI. Before upgrading, check your configuration globs: * no longer crosses directories.

Added

  • [limits].max_bytes_per_file limits the size of every file that check visits, source or not, such as images and archives. [limits].max_bytes_per_lfs_object limits files that .gitattributes assigns to Git LFS instead, at their full size whether or not Git LFS has downloaded them. Both are unlimited by default, accept a size with a unit, such as "10 MB" or "1.5 GiB", and can be set in [[overrides]].
    • Files over a limit are reported in every output format, as file_bytes and lfs_object_bytes violations in JSON output.
    • The ratchet file's new [[file_sizes]] table records the accepted size of a file over its limit. update adds entries and tighten lowers or removes them. Sprawl Guard 0.5 and earlier can't read a ratchet file with this table, so upgrade every copy that checks the repository together.
    • explain reports a file's size, its byte limit, and the overrides that set the limit.
    • check doesn't count the lines of a source file that is a Git LFS pointer, and reports it as a warning instead.
  • Sprawl Guard is on PyPI as sprawl-guard, so Python projects can install it with uv, pip, or pipx and pin it in their lockfile.
  • check lists at most 50 findings in human and GitHub output, so a large first run keeps its summary on screen. Change the cap with --max-findings <N|unlimited> or [output].max_findings. The exit status still reflects every violation, and JSON and SARIF output list every finding.
  • check warns when it skips a path given on the command line because the path is hidden or ignored.

Changed

  • In configuration globs, * and ? no longer match /. src/*.rs matched src/a/b.rs before and now matches only files directly in src. Use ** to cross directories: write vendor/** where vendor/* was meant to cover a whole tree, and **/*.generated.ts where *.generated.ts was meant to match at any depth. ** crosses directories only as a whole path component, so write src/**/*.rs where src/**.rs was used. The bundled patterns already use **.
  • check no longer stops at the first file it can't analyze, such as a source file too large to count or one it can't read. It reports every such gap along with every violation. Under [traversal].unreadable_paths = "fail", gaps make check exit 2; under "warn", they are warnings. In JSON output, status is error in that case, coverage lists the gaps, and the error object is gone.
  • [traversal].max_file_bytes is now [traversal].max_parsed_code_file_bytes. The old name still loads; sprawl-guard config upgrade --write renames it.
  • Human output headings show their group's total, as in Files over the line limit (3):.

Fixed

  • check with a file path no longer passes a directory over its direct-file limit, or reports its ratchet entry as stale, because only some of its files were selected.
  • Rust test-code exclusion no longer miscounts a file when non-ASCII text precedes the end of an excluded item on the same line.
  • A Rust file that starts with a byte order mark counts the same as one without it.
  • A configuration that sets one language under two spellings, such as [languages.rust] and [languages.Rust], is rejected. Before, one of the two tables was dropped without a message.
  • Configuration errors for a zero or negative count name the rule it breaks instead of an internal type.
  • With [ignore].skip_hidden = false, the scan now leaves out .git.
  • SARIF output gives valid file locations for paths with spaces or special characters, and for repositories checked with --root inside a GitHub Actions workspace.
  • The npm package runs on older Linux releases, such as Red Hat Enterprise Linux 9, by falling back to its WebAssembly build. Before, it failed to start there.
  • The npm package's WebAssembly build places GitHub annotations and SARIF paths in the workspace as the native builds do.

sprawl-guard v0.6.0-beta.3

Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Nov 19:56
Immutable release. Only release title and notes can be modified.

Added

  • [limits].max_bytes_per_lfs_object limits the content size of files that .gitattributes assigns to Git LFS with filter=lfs: the size a pointer declares when Git LFS hasn't downloaded the file, and the size on disk when it has, so results match either way unless a Git LFS extension transforms the file. It is unlimited by default, accepts a size with a unit, and is available in [[overrides]]. Human output lists these files under Git LFS objects over the byte limit. JSON output reports them as lfs_object_bytes violations, SARIF output under the sprawl-guard/lfs-object-bytes rule, and GitHub output as annotations on the file. explain reports the file's storage, and fails when a .gitattributes that decides it can't be read.
  • check reads .gitattributes in the root, its subdirectories, and the directories above it up to the top of the Git work tree, and reports one it can't read as a read_git_attributes_failed gap covering its directory.

Changed

  • [limits].max_bytes_per_file limits only files that Git stores. Files that .gitattributes assigns to Git LFS are exempt from it, so assets moved to Git LFS on purpose are no longer flagged.
  • [[file_sizes]] ratchet entries require the file's storage: git or lfs. Stale Git LFS entries are reported as lfs_object_bytes_stale. A ratchet file from 0.6.0-beta.2 with [[file_sizes]] entries no longer loads. Back it up, delete those entries, and run update. update records current sizes rather than the old ceilings, so review the new byte ceilings before committing them.
  • check finds Git LFS files through .gitattributes instead of by reading every small file, so a small file that Git stores and that can't be opened is no longer reported as an unreadable path. A Git LFS pointer that .gitattributes doesn't assign to Git LFS is measured at its size on disk.
  • In configuration globs, * and ? no longer match /. src/*.rs matched src/a/b.rs before and now matches only files directly in src. Use ** to cross directories: write vendor/** where vendor/* was meant to cover a whole tree, and **/*.generated.ts where *.generated.ts was meant to match at any depth. ** crosses directories only as a whole path component, so write src/**/*.rs where src/**.rs was used. The bundled patterns already use **.

Removed

  • JSON output no longer reports measured_from and pointer_bytes for file sizes.

Fixed

  • check with a file path no longer judges that file's directory by a count of the selected files alone. Before, a directory over its direct-file limit passed, and a directory with a ratchet entry was reported stale. A directory's direct files are now checked only when the directory itself is selected.
  • Rust cfg(test) exclusion removes exactly the excluded item when non-ASCII text precedes the item's end on the same line. Before, leftover bytes could turn the rest of the file into one string literal and miscount it.
  • A production Rust file that starts with a UTF-8 byte order mark counts the same as one without it.
  • A zero or negative max_direct_files_per_directory or [output].max_findings is rejected with the rule it breaks, such as direct-file count must be greater than zero. Before, the error named an internal type.
  • A configuration that sets one language under two spellings, such as [languages.rust] and [languages.Rust], is rejected. Before, one of the two tables was dropped without a message.
  • check warns when the scan skips a path given on the command line because the path is hidden or an ignore file excludes it. Before, check .github/script.py passed without checking the file and without saying so. JSON output reports a selected_path_skipped warning, and SARIF output a warning notification.
  • With [ignore].skip_hidden = false, the scan leaves out .git. Before, it checked Git's own objects against byte limits and counted them toward traversal.max_entries.
  • SARIF output percent-encodes file paths, so a path with a space, # or % is a valid URI. When GITHUB_WORKSPACE is set and the root is inside it, each path starts with the root's place in the workspace, as --format github paths do, so code scanning finds files checked with --root. When the root is outside the workspace, or the workspace does not exist, results carry no file location, as GitHub annotations already did. A result about a directory no longer names line 1.
  • The npm package runs its WebAssembly build on Linux with glibc older than 2.35. Before, it started the native binary, which failed to load with version 'GLIBC_2.35' not found.
  • The npm package's WebAssembly build reads GITHUB_WORKSPACE, so --format github annotations and SARIF paths include the root's place in the workspace, as the native builds do.

sprawl-guard v0.6.0-beta.2

Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Nov 13:43
Immutable release. Only release title and notes can be modified.

Added

  • check lists at most 50 findings in human and GitHub output, so a large first run keeps its summary on screen. Set the cap with --max-findings <N|unlimited> or [output].max_findings. Analysis gaps that fail the check take the listed slots first, then violations, then warnings. Group headings show their totals, a group cut short ends with … and N more, and a footer gives how many findings were shown out of the total. The cap also bounds the files a directory finding names. GitHub annotations cover only the listed findings. The exit status still reflects every violation, and JSON and SARIF output list every finding.
  • [limits].max_bytes_per_file limits the size of every file that check visits, source or not, such as images and archives. It is unlimited by default, and [[overrides]] can set it for particular paths. Human output lists files over the limit under Files over the byte limit. JSON output reports them as file_bytes violations, SARIF output under the sprawl-guard/file-bytes rule, and GitHub output as annotations on the file.
  • The ratchet file has a [[file_sizes]] table that records the accepted size of a file over its byte limit. update adds entries and tighten lowers or removes them. Stale entries are reported as file_bytes_stale. Earlier versions reject a ratchet file with this table. update --import doesn't add byte entries and keeps the existing ones.
  • Byte limits in configuration accept a size with a unit, such as "10 MB" or "1.5 GiB", as well as a number of bytes. This applies to max_bytes_per_file in [limits] and [[overrides]] and to [traversal].max_parsed_code_file_bytes. kB, MB, GB, and TB are powers of 1000, and KiB, MiB, GiB, and TiB are powers of 1024. Units are case-sensitive, so "10M" and "10 mb" are errors that list the accepted units.
  • explain reports the size and byte limit of a file, with the overrides that set the limit, as file_bytes in JSON output. For a source file too large to count, it reports why its lines are not counted instead of failing.
  • Byte limits, [[file_sizes]] ceilings, and explain measure a file that Git LFS stores by the size its pointer declares, so results don't depend on whether Git LFS has downloaded the file. JSON output marks such a size with "measured_from": "lfs_pointer" and the pointer's own size in pointer_bytes; other sizes have "measured_from": "on_disk". Human, SARIF, and GitHub messages name the pointer. Pointers with the current or the legacy hawser.github.com version URL are recognized. check doesn't count the lines of a source file that is a pointer: it reports an lfs_pointer_source warning with the file's role and declared_bytes, and keeps the line ceiling for that role. A file smaller than 1 KiB that can't be opened is now reported as an unreadable path, since check can't tell whether it is a pointer.

Changed

  • Human output headings show their group's total, as in Files over the line limit (3):.
  • SARIF and GitHub messages for a stale ratchet entry whose path is gone or no longer checked end with and it is no longer measured instead of and it was not found.
  • [traversal].max_file_bytes is now [traversal].max_parsed_code_file_bytes, since it limits only the files whose code lines are counted. The old name still loads; config upgrade --check reports it and config upgrade --write renames it.
  • check no longer stops at a source file too large to count, at a source file that fails to read (now an unreadable path of kind read_file_failed), or at another unreadable path. It reports every such gap along with every violation, in every output format. Under [traversal].unreadable_paths = "fail" the gaps make the check exit 2; under "warn" they are warnings, so a file too large to count no longer exits 2 there.
    • The JSON report's status is error in that case, coverage lists uncounted_files next to unreadable_paths, and the error object is gone.
    • SARIF output reports gaps as tool execution notifications and sets executionSuccessful.
    • GitHub output annotates gaps with ::error or ::warning, and prints the report on stdout.
    • A file too large to count, or one inside an unreadable directory, keeps its ratchet ceiling: check doesn't report it as stale and tighten doesn't remove it.
    • update and tighten still refuse to write after an unreadable path.

sprawl-guard v0.6.0-beta.1

Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Nov 00:48
Immutable release. Only release title and notes can be modified.

Added

  • Sprawl Guard is on PyPI as sprawl-guard, so Python projects can install it with uv, pip, or pipx and pin it in their lockfile. Each wheel holds only the native binary, for macOS, Windows on x64, Linux on x64 and Arm with glibc 2.35 or newer, and Linux on x64 with musl. The release workflow publishes the wheels through PyPI trusted publishing, with attestations.

sprawl-guard v0.5.3

Choose a tag to compare

@github-actions github-actions released this 18 Nov 22:58
Immutable release. Only release title and notes can be modified.

Fixed

  • The Linux musl binary, which npm installs on Alpine, no longer slows down when it checks files on several threads. Before, it could be many times slower than on one thread.

sprawl-guard v0.5.2

Choose a tag to compare

@github-actions github-actions released this 18 Nov 21:04
Immutable release. Only release title and notes can be modified.

Fixed

  • The prebuilt Linux glibc binaries, in the npm packages and the release archives, now run on glibc 2.35 and newer, as in Ubuntu 22.04 and Debian 12. Before, the Arm binary needed glibc 2.39 and didn't start on older systems, and the x64 binary printed a glibc warning on every run.
  • On Node.js 22, the npm package no longer prints Node's "WASI is an experimental feature" warning on every run when it falls back to the WebAssembly build.

Known issues

  • The Linux musl binary, which npm installs on Alpine, is many times slower than the glibc binary when it checks files on several threads.

sprawl-guard v0.5.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 19:09
Immutable release. Only release title and notes can be modified.

Full Changelog: v0.4.1...v0.5.0

sprawl-guard v0.4.1

Choose a tag to compare

@github-actions github-actions released this 16 Nov 21:47
Immutable release. Only release title and notes can be modified.

Full Changelog: v0.4.0...v0.4.1

sprawl-guard v0.4.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 14:08
Immutable release. Only release title and notes can be modified.

Full Changelog: v0.3.2...v0.4.0