Sign inSign up

decathlon/dblinter

By decathlon

•Updated 4 months ago

A static analysis tool for postgresql databases

Image
Developer tools
Databases & storage
0

2.6K

decathlon/dblinter repository overview

⁠dblinter

Static conformity is largely used in the dev world but there is no such tool for databases schemas. This tool connect to a postgres database to check good practices in schema design and output a file in Sarif⁠ format. A configuration file describe the rule to enforce and acceptable threshold

⁠GitHub repository

The tools is available on GitHub: https://github.com/decathlon/dblinter⁠

⁠Launch dblinter

⁠Docker

Launch the docker image

docker run --rm  decathlon/dblinter:latest  --dbname $PGDATABASE --host $PGHOST --user $PGUSER --password $PGPASSWORD --port $PGPORT

⁠Usage


 Usage: dblinter [OPTIONS]

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *  --user      -U      TEXT                                                 pg username [env var: PGUSER] [default: None]         │
│                                                                             [required]                                            │
│ *  --password  -W      TEXT                                                 pg pwd     [env var: PGPASSWORD] [default: None]      │
│                                                                             [required]                                            │
│ *  --host      -h      TEXT                                                 pg hostname [env var: PGHOST] [default: None]         │
│                                                                             [required]                                            │
│    --port      -p      TEXT                                                 pg port [env var: PGPORT] [default: 5432]             │
│ *  --dbname    -d      TEXT                                                 pg dbname  [env var: PGDATABASE] [default: None]      │
│                                                                             [required]                                            │
│    --sslmode   -s      [allow|prefer|require|verify-ca|verify-full|simple|  pg sslmode                 [env var: PGSSLMODE]       │
│                        disable]                                             [default: SslMode.disable]                            │
│    --describe  -b      TEXT                                                 describe is added in sarif invocation field           │
│                                                                             [default: None]                                       │
│    --filename  -f      TEXT                                                 rules configuration file                              │
│    --append    -a                                                           sarif report is append to output file [default: True] │
│    --output    -o      TEXT                                                 report output file [default: None]                    │
│    --loglevel  -l      [DEBUG|INFO|WARNING|ERROR|CRITICAL]                  log level [default: LogLevels.warning]                │
│    --schema    -n      TEXT                                                 tables in schema only filter                          │
│    --exclude   -x      TEXT                                                 Exclude table filter                                  │
│    --include   -i      TEXT                                                 Include table filter                                  │
│    --quiet     -q                                                           Quiet mode [env var:QUIET]                            │
│    --help                                                                   Show this message and exit.                           │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Tag summary

Content type

Image

Digest

sha256:5f9b05a16…

Size

119.8 MB

Last updated

10 months ago

docker pull decathlon/dblinter