Chisle
코딩 에이전트 플러그인, 20개 실시간 작업에서 기본 모델 52% 활용, 간결한 페르소나와 출력 압축 제공
BareSQL Audit은 로그인별 컬럼·경로와 개인 데이터를 표시하고, Portable는 오류·다른 결과 SQL을 찾습니다
BareSQL Audit lists every column each PostgreSQL login can read, with the route that gets it there, and marks the personal data. BareSQL Portable finds the SQL that fails or answers differently on SQL
개발 도구Go · HTMLGitHub @softdevstudio온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
BareSQL Audit lists every column each PostgreSQL login can read, with the route that gets it there, and marks the personal data. BareSQL Portable finds the SQL that fails or answers differently on SQLite, PostgreSQL, MySQL and MariaDB. Free and open source.
README 전체를 불러오는 중입니다.
README 전문 보기 ↗BareSQL is one small program with two tools for SQL databases.
BareSQL Audit logs in to a PostgreSQL database and lists, for every login, each column it can read, how it gets there (a grant, a role, a view, a function, ownership) and whether the column holds personal data. It reads the system catalogs and a small sample of values inside a read-only transaction, and it never calls a function you wrote.
BareSQL Portable checks SQL that has to run on SQLite, PostgreSQL,
MySQL and MariaDB. baresql lint points out constructs that answer
differently on different engines, with a form that answers the same
everywhere. baresql compare runs the same script on real engines and
reports every statement whose answers differ. baresql rules lists the
differences BareSQL knows, each with a minimal example and the answer every
engine gave.
The program is a single file with no dependencies. It is written in Go with
the standard library only, and it talks to PostgreSQL, MySQL and MariaDB
over their own network protocols. SQLite runs through the sqlite3
program you have installed.
Download the archive for your system from the latest release, unpack it
and put baresql (or baresql.exe) on your PATH:
| System | Archive |
|---|---|
| Linux, x86-64 | baresql_linux_amd64.tar.gz |
| Linux, ARM64 | baresql_linux_arm64.tar.gz |
| macOS, Apple silicon | baresql_darwin_arm64.tar.gz |
| macOS, Intel | baresql_darwin_amd64.tar.gz |
| Windows, x86-64 | baresql_windows_amd64.zip |
SHA256SUMS holds the checksums of all five, and the releases page has every version.
Or build it yourself with Go 1.24 or later (the release archives are built with the current stable Go):
go install github.com/softdevstudio/baresql/cmd/baresql@latest
baresql version prints the version, and baresql help <command> the
flags of a command.
baresql audit [flags] [connection]
baresql diff old.json new.json
baresql audit answers one question for a PostgreSQL database: which login
can read which column, and how. For each login it lists every column it can
read and every way it gets there, marks the columns that hold personal data,
and adds findings for the setups that usually lead to leaks. It writes two
files:
report.html, a page to read and share: findings first, then one table
per login with the personal data it reaches and the route to each column.audit.json, the same facts for scripts and for baresql diff.It also prints a short summary. Values read while looking for personal
data are never written anywhere: the report says which category a column
looks like (an email address, a card number) and why, never what it holds.
JSON keys can be data too (a map keyed by email address), so evidence names
a key only when it is a word the column-name rules know, such as email
or contact, and shows any other key as *: JSON key *.email.
The connection is a postgres:// URL or a key=value string, as for
psql:
baresql audit "postgres://[email protected]/shop?sslmode=verify-full"
baresql audit "host=db.example.com dbname=shop user=auditor"
Whatever the connection leaves out comes from the usual PG* variables
(PGHOST, PGUSER, PGPASSWORD ...) and from ~/.pgpass, so the password
never has to be on the command line. TLS follows sslmode (disable,
prefer by default, require, verify-ca, verify-full) with
sslrootcert; sslrootcert=system uses the system's certificates and
implies verify-full. Unix sockets work as with psql
(host=/var/run/postgresql). Logins use SCRAM-SHA-256 (with channel
binding over TLS), MD5 or a cleartext password, whichever the server asks
for.
Any login can run the audit: the catalogs it reads are visible to every
role, and the server's own has_*_privilege functions answer for every
role. Two things need more:
email column from one named notes that
holds email addresses) needs read access to the tables. A superuser can
sample everything. A member of pg_read_all_data samples every table
except those where row security applies to it, and another login samples
what it may read.pg_authid.Whatever the audit could not see is listed under "Not seen" in the report and the summary, so a partial audit says what it left out.
It opens one connection, starts a read-only transaction (BEGIN ISOLATION LEVEL REPEATABLE READ, READ ONLY), sets statement_timeout, lock_timeout,
search_path and DateStyle for that transaction only, and turns row
security off for its own sampling queries (a non-superuser then sees an
error instead of silently filtered rows, and the table is left out of
sampling). It never writes and rolls the transaction back at the end.
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗