docs(safegres): rebrand as a two-axis security + performance auditor - #1598
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Every user-facing surface still called safegres a "pure-PostgreSQL Row-Level Security auditor" — the npm description, both CLI usage headers, and the README's first line. That is now roughly half the product: 11 of 29 rules are performance, they have their own score, their own baseline ratchet, and their own planner-proof mode, and
constructive-dbgates on the perf ratchet more meaningfully than on the security grade.This changes the positioning to one auditor, two independently-scored dimensions and restructures the README around how the analysis actually works (catalog → policy ASTs → effective-access lattice) rather than around RLS.
README: 519 → ~370 lines, reordered so a reader hits the product before the reference material:
npm i -D safegres→doctor→audit --perf. No config file, no flags.rails db:schema:load/manage.py migrate/prisma migrate deploy/ …), and collapses the old example that ran the audit twice under the heading "Audit RLS".doctor: a non-superuser/non-BYPASSRLSrole gets a silently partial audit;--explainneeds PG16+;--statsis meaningless on a fresh CI database; security has no baseline (only perf and the call graph do).graphile-searchexposing a filter for everytsvectorcolumn; now framed as "wherever anything searches the column", with the codegen case as the example.The deep-dive prose is preserved verbatim, moved into
packages/safegres/docs/:rules.md(lattice truth table, access-path signals behind X1, X7/X8/X9 arguments, extension objects, declared public reads),reporting.md(SARIF,--compare, snapshots),advanced.md(--stats,--explain, library use, pgpm),call-graph.md. README links to them by absolute URL, sincedocs/is not copied into the publisheddist/.Metadata and CLI:
Keywords drop
constructive(an org term, not a search term) and add the ones the category is actually searched by:linter,static-analysis,query-performance,explain,grants,sarif,ci,devsecops,dba.No behavior change — the only source edits are the two usage strings. Sample output in the README was checked against
renderPretty/scoreLinesso the shown format (score: … — model: density,top deductions,by rule … (+payoff),unscored … zero-weight,exposure: N schema(s) via config) matches what the tool prints.Link to Devin session: https://app.devin.ai/sessions/b7874ecee0c7471ea271e6e7193869dc
Requested by: @pyramation