Skip to content

Releases

v0.5.1

Choose a tag to compare

@f-klement f-klement released this 22 Nov 18:33

Changes

  • errata plugin install makes the cache directory when it is missing, as when a CI job sets XDG_CACHE_HOME to a directory of a fresh checkout, where it stopped with "no such file or directory".

All commits since v0.5.0: https://github.com/f-klement/errata/compare/v0.5.0..v0.5.1

errata-ext-hcl 0.1.0

Choose a tag to compare

@f-klement f-klement released this 22 Nov 12:10

errata-ext-hcl 0.1.0, a plugin of errata, built from the source at this tag.

Install it with errata plugin install hcl, which checks the download against errata-ext-hcl_checksums.txt and pins every platform's sha256 in errata.lock.

errata-ext-csv 0.1.0

Choose a tag to compare

@f-klement f-klement released this 22 Nov 11:28

errata-ext-csv 0.1.0, a plugin of errata, built from the source at this tag.

Install it with errata plugin install csv, which checks the download against errata-ext-csv_checksums.txt and pins every platform's sha256 in errata.lock.

v0.5.0

Choose a tag to compare

@f-klement f-klement released this 21 Nov 22:52

Breaking changes

  • errata check runs program and generated checks that last took a second or more in copies of the repository in the user's cache, ignored files included up to 32 MiB
  • a program check that writes a file a later check reads needs in_place: true
  • SIGTERM and SIGHUP stop errata check as an interrupt does

Changes

  • errata --version prints the version, the same line as errata version, and exits 0.
  • In a container on cgroup v2 whose CPU limit is not a whole number of cores, or is one core, errata check runs as many rules at once as the limit's whole cores, at least one, where it ran one more and was throttled; set GOMAXPROCS to choose the number yourself.
  • A PHP array() with one element, such as array('x'), now reads as a list of one, as the short form does; it read as the bare value before, so a path that takes each member of it selected nothing.
  • New: an extractor kind errata does not build in is a plugin, an executable named errata-ext-NAME that provides the kind NAME under extract:. Its entry takes file, files and max_bytes as any kind does, plus the keys the plugin declares, and errata decodes it as strictly as a built in kind's. The first two plugins are csv and hcl, released on tags of their own; the README's Plugins section shows how to install one. A plugin's release is tagged errata-ext-NAME/vX.Y.Z, holds an executable for each platform and a checksums file, and is never marked latest, so errata's own release stays the latest.
  • New: errata plugin install NAME downloads errata-ext-NAME for your system from errata's GitHub releases, checks it against the checksums file of its release, sends it the describe request, keeps it in the user's cache under its sha256, and writes its version and the sha256 of every platform's build into errata.lock. Commit the lock. Without a version it installs the version the lock pins, else the newest release that is neither a draft nor a prerelease. With no name it installs every plugin the lock pins, which is what a CI job runs before errata check.
  • errata plugin install --vendor also writes every platform's build the lock pins, the release's notices file and errata's LICENSE into .errata/plugins, so CI with no network runs from the commit. Once .errata/plugins exists, a run looks there alone, so every install vendors as --vendor does and says so.
  • errata plugin install refuses a release or a mirror that serves other bytes than the lock pins, and never rewrites a pin: delete the plugin's lines from errata.lock to pin it anew. It writes the lock last, only when every plugin installed, and otherwise exits 2 with the lock unchanged. A download is at most 256 MiB, and fails when the server sends no answer within 30 s or nothing for 60 s.
  • To install from a mirror of the releases, set ERRATA_PLUGIN_SOURCE or pass --source, an https URL with no user name or password, or a file:/// directory. A mirror holds each release's files in a directory named by its tag, such as errata-ext-csv/v0.1.0/. It installs only versions the lock already pins; pass --trust-source to let it choose a new pin, or pin each version once from GitHub. GITHUB_TOKEN is sent to api.github.com alone, when errata looks up the newest release.
  • A plugin from elsewhere installs from a file with errata plugin install --file ./errata-ext-NAME, or from an https URL with --url and the --sha256 you give, which errata checks before it keeps the file. --platform adds another platform's build of a URL pin, and --replace lets either take the place of a release the lock pins. Such a plugin speaks plugin protocol 1, which docs/plugin-protocol.md specifies.
  • errata.lock, at the top of the repository, pins one plugin build a line: name, version, platform and sha256, then source=file or source=url: for a plugin from elsewhere. errata reads it whenever the config loads. A repository without one uses no plugin and loads as before; a line errata cannot read, or a file over 1 MiB, makes the config fail to load, naming the line. errata plugin install keeps the comment lines at the top of the file and drops every other comment.
  • A run never downloads a plugin and never looks on PATH. It runs the build the lock pins from .errata/plugins when the repository has that directory, else from errata/plugins in the user's cache directory, and checks its sha256 against the lock first. errata does not start a build that is missing, is a symbolic link or lies below one, has another sha256 (the message names both), or is not pinned for the platform errata runs on; every rule with an entry of its kind is then unknown, naming the plugin, the path and the errata plugin install command to run.
  • errata starts a plugin once for each request, in an empty directory of its own, with an environment that holds only GOMAXPROCS, GOMEMLIMIT and GOGC when errata has them, and SYSTEMROOT on Windows. A CI job's tokens, HOME and PATH do not reach it. On Linux and macOS errata kills the plugin's process group when the request ends.
  • A plugin has 10 s to describe itself and to build its entries, and 30 s for each extract. Its stdout is bounded at 1 MiB for describe, 32 MiB for build and an amount set by max_bytes for extract, and its stderr at 1 MiB, of which a message quotes the last 256 bytes. Past a bound errata stops the plugin and the rule is unknown, naming the bound; for describe and build, every rule with an entry of its kind is.
  • A plugin that fails to describe itself, or speaks no protocol version errata speaks, makes every rule with an entry of its kind unknown; the message names the versions each side speaks. An entry the plugin refuses makes the config fail to load, quoting the plugin. A reply errata refuses makes the rule unknown, and so do more than 100000 values, or values past max_bytes, where a plugin's key and condition count too. Such a rule still loads, and errata refuses none of its extractors as unused.
  • New: the csv plugin, errata-ext-csv, reads a cell of a CSV or TSV file as Go's encoding/csv parses RFC 4180. column names the column of the value, and where maps columns to the text the row must hold; each matching row gives a value, and with no where every row does. header: false reads the first row as data and names columns by number from 1, written as a string such as column: "2". dialect is csv or tsv, and delimiter takes another single character, such as a semicolon.
  • The csv plugin makes the rule unknown, naming the file and the line, for a row that does not parse, a header that lacks the column or a where key or names one twice, a file with no header row, a value's cell that is not UTF-8, and more than 100000 values. A where that matches no row finds no value, so allow_empty decides. A lone CR does not end a row, so a file saved as Excel for Mac's CSV (Macintosh) is one row: save it with LF or CRLF line ends. A UTF-8 byte order mark is not part of the first cell.
  • New: the hcl plugin, errata-ext-hcl, reads an attribute of a Terraform .tf or .tfvars file, a Packer .pkr.hcl file or a Nomad job file with HashiCorp's hcl/v2 native syntax, and evaluates nothing. Its key path walks dotted names through attributes, block types and each label in turn, as in variable.region.default or resource.aws_instance.web.ami. A quoted name in brackets reads a name with a dot, a number in brackets a list element, and a star in brackets every attribute, label, item or element.
  • The hcl plugin returns a literal as the file writes it: a number as written, true, false, null, or a string with no interpolation, its escapes read. It returns anything else as the file wrote it, marked not literal: a reference, an interpolation, a function call, an operator, a conditional, a for expression, and a value the path goes past, such as a key inside a merge call. With a star in the path, each value's condition is the path it matched. A path that selects nothing finds no value, so allow_empty decides; one that ends at a block, an object or a list makes the rule unknown.
  • The hcl plugin makes the rule unknown, naming the file and the line, for a file HCL cannot parse, and before parsing for a file nested more than 1000 levels deep, a number longer than 1000 bytes, a template that costs more than 128 times max_bytes to join, or more tokens than one for every 16 bytes of max_bytes, 2097152 at the default. An ordinary file of about 4.5 MB or more passes the token limit: raise max_bytes on its entry. More than 100000 values make the rule unknown too.
  • The hcl plugin reads one request's files for at most 20 s, below errata's 30 s for an extract, and past that the rule is unknown with the plugin's message naming the file and the 20 s. This bound depends on the machine, unlike the others, so a file that parses in close to 20 s can pass on a fast runner and fail on a slow or busy one.
  • When an interrupt, SIGTERM or SIGHUP stops errata, each program check, generated check, rule and plugin that had not finished is unknown with a message that starts cancelled: and names the signal. A program check said before that it did not finish within its timeout, which it had not reached. An interrupt while the config loads stops the plugins describing and building in the same way.
  • The html reader, and HTML in Markdown, read a frameset and a frame tag as a browser does. A frameset replaces the page's body only while the body holds nothing but blanks and elements such as a div or a heading; errata then reads nothing after it but comments, so a code, section or table target there finds no value. Anywhere else both tags are ignored and open no element, where errata read them as ordinary elements and took text a browser drops.
  • A regex whose best literal is a single byte, such as the colon of a token pattern of digits, a colon and word characters, now searches only the lines that hold both th...
Read more

v0.4.2

Choose a tag to compare

@f-klement f-klement released this 13 Nov 18:17

Changes

  • Rules that read the same files are faster: a run reads a file once, up to 64 MiB of files, and hands its bytes to every rule that names it.
  • Rules run at once on as many cores as the runner gives errata, so a config of many rules finishes sooner on a runner with more than one core.
  • A marker rule after a program check or a generated check that rewrites the marked file now reads what that check wrote.
  • A regex pattern with no literal prefix, such as a character class or an alternation, searches only near the places that hold a literal every match needs, the line of each place and up to three lines around it: a class of two dashes over a 29 MB tree takes 0.24 s where it took 1.6 s.
  • A regex extractor takes a skip key that lists comments, which searches each file with its comments blanked to spaces by the language its name chooses, so a comment cannot satisfy or break a rule about code; values keep their lines.
  • A false assert that is an all over an extractor prints only its offending values, or over by_file every value in its offending files, each with its file and line; errata check --all-values prints every value.
  • The SARIF result of a false assert that is an all over an extractor points at the first offending value its message shows.

All commits since v0.4.1: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@f-klement f-klement released this 10 Nov 10:53

No change since v0.4.0 that a user would see.

All commits since v0.4.0: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@f-klement f-klement released this 09 Nov 08:51

Changes

  • SARIF puts a result that blames an exists value of false at the check in the config, not at the missing file.
  • package_version and dependency quote a version or range that Cargo or a pyproject.toml build computes as the file wrote its line, such as serde = { workspace = true }, not a canonical spelling.
  • New jsonc and json5 extractors: jsonc reads a path in a JSON file with comments and trailing commas, json5 in a JSON5 file; the kind names the dialect.
  • compare: semver takes syntax: npm, cargo, pep440, go or rubygems, which reads every value as that ecosystem does: requires-python >3.11 admits 3.11.9, a Cargo comparator with no operator is ^, and go 1.21 is the language version 1.21; semver_satisfies takes the syntax as a third argument, and errata list prints the syntax a rule reads with.
  • dependency gives a Go version written short, such as v1, as written and not literal, never as v1.0.0
  • dependency puts a requirements file's value at the line it starts on and joins a backslash's lines as pip does
  • ini reads an extension's constant in php.ini, such as M_PI or SIGTERM, as the literal text PHP keeps at startup
  • ini reads ${ x } in a .coveragerc as the literal text coverage.py leaves it
  • ini reads an ansible host such as fe80::1 or we$b:22, which ansible keeps whole, as literal
  • ini returns an ansible list or dict written as Python's repr writes it as literal
  • ini marks an ansible variable such as x = 1, 2, which ansible reads as a list, not literal
  • ini reads a template such as php.ini.j2 or hosts.j2 in the dialect of the file it renders
  • properties marks a value with a placeholder in a Spring Boot or Log4j file, such as application.properties, not literal
  • ini and properties mark a value inside a template block, such as one between if and endif in a .j2 file, not literal
  • shell, envfile and jenkins mark a value inside a template block, and a value that substitutes it, not literal
  • ini marks an ansible host whose port is written in Unicode digits, which ansible takes off as it takes 22
  • dependency and tool_version report a go.mod or go.work value at its own line when a lone CR splits its directive
  • an etc extractor reads sshd_config, ssh_config, sysctl, resolv.conf, limits, logrotate, nsswitch.conf, modprobe.d, chrony.conf and ntp.conf
  • etc reads limits in any case, ranks sysctl, modprobe and limits drop-ins by the tools' directories, and leaves a Match criterion an earlier User, Hostname or Tag shadows undecided
  • etc refuses a chrony include it could read in two directories, and decides an ssh Match against earlier User, Hostname and Tag lines in linear time
  • the systemd extractor reads a unit or a Podman Quadlet file with its drop-ins, splits Environment= into variables, and reads EnvironmentFile= files
  • ini reads systemd units and Quadlet files in a systemd dialect, chosen by their names
  • env reads Environment= of a systemd .service, .socket, .mount, .swap or Quadlet .container, and an environment file readers: gives systemd
  • assert gains calendar_interval, the time between the runs of a systemd timer's OnCalendar= event
  • ini now reads systemd units and Podman Quadlet files as systemd and Quadlet read them, where it read them as configparser does before; dialect: plain keeps that reading
  • the html kind ends an open button at the next button's start tag, as a browser does, so a heading inside the first button no longer reads the second's text
  • the html kind ends the scope of open elements at a select and closes a select at a nested select or input, as browsers do, so a heading opened in a select no longer reads text a browser shows outside it
  • the html kind ends a list item, a description term or a paragraph at an option, an optgroup or an hr inside a select, and no longer ends an optgroup at the next one, as browsers do
  • the env and envfile kinds read a file in etc/default, marking a value not literal where a shell or systemd may read it otherwise, and etc/environment as pam_env reads it
  • the sudoers kind reads a sudoers file and its includes as sudo does, returning a Defaults setting's values with their scopes, or as records the commands granted to a user or group with their hosts, Runas lists, tags and options, aliases resolved
  • the sudoers kind takes grants: true, which returns every command a sudoers file grants anyone, as records with the user list, hosts, Runas lists, tags and options
  • a table extractor reads one column of fstab, passwd, group, hosts, exports and crypttab, by the column names of their man pages
  • a udev extractor reads udev rules files and rules.d directories, with match keys, GOTO and LABEL
  • a template drop-in such as 60-x.conf.j2 masks the file of the name it renders, in etc, systemd and udev
  • the udev extractor's tests: keeps the rules that test the match keys it names, compared as written
  • the etc kind's refusal of a file name no dialect reads names the table, sudoers and udev kinds
  • The html kind drops the line feed after a pre start tag when tags a browser ignores come between, as a browser does.

All commits since v0.3.0: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@f-klement f-klement released this 05 Nov 22:17

Breaking changes

  • A step under embedded no longer reads a document in an unquoted YAML date or timestamp, a YAML !!binary value or a TOML date or time; the rule is unknown instead. Quote the value, or tag it !!str in YAML, to read it as before.

Changes

  • errata --help and the help of each command now give every flag with its default, the exit codes, the config file errata reads, examples, and the address of the full command line reference.
  • errata help and errata completion now have full help with examples, and the address of the command line reference in the help of a build from source names main.
  • A lone CR, the old Mac line end, now ends a line in every reader, so a value in such a file names the line an editor shows.
  • The html reader reads svg and math as a browser does: a style, title, script or textarea inside them no longer hides the text a browser shows after them.
  • The html reader leaves out svg text a browser does not draw, such as text outside a text element or inside a filter.
  • An HTML file whose misnested formatting tags make the parser rebuild elements over and over now meets the token limit and is refused; it could take seconds for each MiB.
  • In HTML, a caption, col or colgroup start tag inside a table cell now closes the cell as a browser does, so the text after it is no longer read as the cell's.
  • The size guards of split, join and replace now take their bounds from the cost limit the rule runs under.
  • CEL asserts can use charAt, substring, trim, indexOf, lastIndexOf, lowerAscii, upperAscii, reverse, format and strings.quote, each refused before it runs when its read, search or result alone would exceed the cost limit.
  • New literal extractor: reads the values a program writes as literal data (a Django settings.py, a PHP config, a vite.config.ts, a Gradle build, an Elixir config.exs) without running it; a value the file only computes is marked not literal, and a filter refuses to compare it.
  • New dependency extractor: returns one package's version from every manifest and lockfile a check lists (go.mod, package.json and its lockfiles, Python requirements, Poetry, uv, Cargo, Gemfile, Composer), so one agree rule can say they match.
  • tool_version numbers a go.mod's go and toolchain directives as every file's lines are numbered, a lone CR ending a line; the go command reads such a CR as a blank.
  • env no longer reads a code file such as .env.d.ts or .env.py as a dotenv file
  • A TOML date or time where a version or a range goes is refused, as Cargo and the Python tools refuse it.
  • package_version takes tag, a prefix: each git tag on HEAD that starts with it gives the rest of its name as a version, read from the repository's files without running git.
  • New code extractor: reads the value one name a source file declares, a Go const or var through go/parser, or a module level name or class member in the languages literal reads; a value the program computes is marked not literal, and a Go file is held to a token limit and its constants to a work budget.

All commits since v0.2.5: v0.2.5...v0.3.0

v0.2.5

Choose a tag to compare

@f-klement f-klement released this 04 Nov 12:16

Breaking changes

  • An extractor's name must now be a CEL identifier (letters, digits and _, not starting with a digit, not a word CEL reserves) under agree as under assert. A name with a dot, a hyphen or a space, or the empty name, loaded under agree before and no longer loads; rename the extractor and every entry that names it.
  • An agree entry that ends in a dot, such as client., no longer loads; it named the extractor client whole before. Write the name without the dot.

Changes

  • --output now also refuses the config file when the config is given through a symbolic link or the output is a hard link to it; an output that is itself a symbolic link to the config is still replaced, and the config is left alone.
  • A regex that matches the empty text, such as ^(.*)$, no longer returns an empty value on the line after a file's final newline.
  • Under compare: semver, an agree rule whose ranges no one release satisfies now points at the first range at which the ranges before it stop overlapping, instead of at the check in the config.
  • docs/examples.md shows how to record an attested fact, a value no tool can read, in a file with its source, date and lifetime, and a program check that fails once the fact is older than its lifetime.

All commits since v0.2.4: v0.2.4...v0.2.5

v0.2.4

Choose a tag to compare

@f-klement f-klement released this 02 Nov 21:32

Changes

  • An assert that names an undeclared variable close to a declared one now says which one it probably meant, such as undeclared reference to 'treshold' (did you mean 'threshold'?).

All commits since v0.2.3: v0.2.3...v0.2.4