M1: engine and the v0.1 check catalog - #3
Merged
Merged
Conversation
Errored checks show in the report, and a scan exits 2 when one errored and no finding reached --fail-on.
…ared privileges Fixtures can now start Postgres with a setting (-- server) and expect a statement to fail (-- expect error). Each fires fixture also runs as a role with only the check's declared privileges.
grant prints SQL for a pg_monitor role that is read-only by default, plus the sequence grants integer-exhaustion needs. A test runs the printed SQL and scans as the new role.
The JSON shape is schema 1, documented in docs/json.md. Its values are the columns a finding's message uses, in raw form.
Object names are text anyone who can create a table controls. Terminal escapes in one could rewrite the report or set the clipboard, and a line break or backticks could break out of Markdown.
ALTER DEFAULT PRIVILEGES only covers sequences its role creates, so grant takes --owner. It also refuses names with control characters, which could end a comment in the printed SQL.
…ind bigint columns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone M1 from ROADMAP.md. The decisions it builds on are recorded there (2026-09-26).
--fail-on, otherwise 2 when a check errored.firesfixture is also tested as a role with only the check's declared privileges.-- server name = valuesets a start-up setting, and-- expect errorlets a statement fail.listshows severity, category and minimum version.explainprints a check's note.grantprints SQL for a read-onlypg_monitorrole, and a test runs that SQL and scans as the new role.--format json(schema 1, documented in docs/json.md) and--format markdownfor pull requests. Values from the database are escaped, so object names can't inject terminal or Markdown control sequences. Messages wrap to the terminal's width.