timescale/pgspot
timescale/pgspot has 151 GitHub stars and 12 forks. Star changes are not measured yet. Last checked 2026-11-13 04:07 UTC. Last push 2026-11-09.
Spot vulnerabilities in postgres SQL scripts
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalpgspot
Spot vulnerabilities in PostgreSQL extension scripts.
pgspot checks extension scripts for following PostgreSQL security best practices. In addition to checking extension scripts it can also be used to check security definer functions or any other PostgreSQL SQL code.
pgspot checks for the following vulnerabilities:
- search_path-based attacks
- unsafe object creation
Consult the reference for detailed documentation of the vulnerabilities which pgspot detects, and their potential mitigations.
Useful links
- PostgreSQL security recommendations for extensions
- PostgreSQL security recommendations for SECURITY DEFINER functions
Installation
pip install pgspot
Requirements
- python >= 3.10
- pglast
- libpg_query (through pglast)
To install the runtime requirements, use pip install -r requirements.txt.
Usage
> pgspot -h
usage: pgspot [-h] [-a] [--proc-without-search-path PROC] [--summary-only] [--plpgsql | --no-plpgsql] [--explain EXPLAIN] [--ignore IGNORE] [--sql-accepting SQL_FN] [FILE ...]
Spot vulnerabilities in PostgreSQL SQL scripts
positional arguments:
FILE file to check for vulnerabilities
options:
-h, --help show this help message and exit
-a, --append append files before checking
--proc-without-search-path PROC
whitelist functions without explicit search_path
--summary-only only print number of errors, warnings and unknowns
--plpgsql, --no-plpgsql
Analyze PLpgSQL code (default: True)
--explain EXPLAIN Describe an error/warning code
--ignore IGNORE Ignore error or warning code
--ignore-lang LANG Ignore unknown procedural language
--sql-accepting SQL_FN
Specify one or more sql-accepting functions
> pgspot --ignore PS017 <<<"CREATE TABLE IF NOT EXISTS foo();"
PS012: Unsafe table creation: foo
Errors: 1 Warnings: 0 Unknown: 0
SQL-accepting functions
It is a common pattern that SQL-accepting functions exist, which take a
string-like argument which will be executed as SQL. This can "hide" some SQL
from pgspot, as the string-like argument masks the SQL. With the
--sql-accepting argument, pgspot can be told about such functions.
Assuming a function named execute_sql which takes a SQL string as its first
argument, and executes it. With pgspot --sql-accepting=execute_sql we can
tell pgspot execute_sql may accept SQL. pgspot will attempt to unpack and
evaluate all arguments to that function as SQL.
관련 프로젝트 살펴보기
trimstray/the-book-of-secret-knowledge
영감을 주는 목록, 매뉴얼, 치트시트, 블로그, 팁, 원라이너, CLI/웹 도구 등을 모은 컬렉션.
258,059 스타Hack-with-Github/Awesome-Hacking
해커, 펜테스터, 보안 연구자를 위한 다양한 Awesome 목록 모음.
125,360 스타swisskyrepo/PayloadsAllTheThings
웹 애플리케이션 보안과 모의 침투 테스트/CTF에 유용한 페이로드 및 우회 방법 목록.
82,623 스타caddyserver/caddy
빠르고 확장 가능한 멀티플랫폼 HTTP/1-2-3 웹 서버이며, 자동 HTTPS를 지원합니다
79,020 스타