Skip to content

Commit 2c201ee

Browse files
committed
docs(safegres): use PG* env var convention; drop stale Authz/MIT sections
- README quickstart now uses PGHOST/PGUSER/PGPASSWORD/PGDATABASE env vars (matching the rest of the ecosystem) instead of a connection URL. - Library example uses getPgEnvOptions() from pg-env. - Drop orphaned 'Authz* type re-exports' section (re-exports were already removed in the previous commit). - Drop trailing 'License: MIT' section.
1 parent edbe571 commit 2c201ee

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

packages/safegres/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ Pure-PostgreSQL Row-Level-Security auditor. Zero application dependencies — dr
88

99
```bash
1010
npm install -g safegres
11-
safegres pg --connection postgresql://localhost/mydb
11+
12+
# Standard libpq env vars (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE)
13+
export PGHOST=localhost PGUSER=postgres PGPASSWORD=password PGDATABASE=mydb
14+
safegres pg
1215
```
1316

17+
Per-field overrides (`--host`, `--port`, `--user`, `--password`, `--database`) and a full `--connection <url>` flag are also supported. See `safegres pg --help`.
18+
1419
## What it checks
1520

1621
| Code | Severity | Category | Check |
@@ -31,9 +36,10 @@ Coverage is aggregated `(table, role) → { hasUsing, hasWithCheck }` across eve
3136

3237
```ts
3338
import { Client } from 'pg';
39+
import { getPgEnvOptions } from 'pg-env';
3440
import { auditPg, renderPretty } from 'safegres';
3541

36-
const client = new Client({ connectionString: process.env.DATABASE_URL });
42+
const client = new Client(getPgEnvOptions());
3743
await client.connect();
3844

3945
const report = await auditPg(client, {
@@ -44,14 +50,4 @@ console.log(renderPretty(report));
4450
console.log(`${report.findings.length} findings`);
4551
```
4652

47-
## Authz* type re-exports
48-
49-
`safegres` re-exports the [`node-type-registry`](../node-type-registry) Authz* / Data* / Relation* / View* type registry so consumers building auditors on top of Constructive's type system can stay on a single dependency:
50-
51-
```ts
52-
import { AuthzDirectOwner, type NodeTypeDefinition } from 'safegres';
53-
```
54-
55-
## License
5653

57-
MIT.

0 commit comments

Comments
 (0)