@profullstack/threatcrush 0.13.78 → 0.13.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,7 +42,7 @@
42
42
 
43
43
  ---
44
44
 
45
- ThreatCrush is a security daemon that runs on your server, **reading your logs and watching inbound connections** for live attacks. It checks every nginx request against 96 OWASP CRS rules (paranoia level 1) + 4 ThreatCrush rules with CRS anomaly scoring, runs 24 detection rules over auth, web and network events, auto-bans attackers, scans your codebase, spot-checks your URLs, and alerts you in real-time.
45
+ ThreatCrush is a security daemon that runs on your server, **reading your logs and watching inbound connections** for live attacks. It checks every nginx request against 96 OWASP CRS rules (paranoia level 1) + 4 ThreatCrush rules with CRS anomaly scoring, runs 25 detection rules over auth, web, network and Postgres (Docker container log) events, auto-bans attackers, scans your codebase, spot-checks your URLs, and alerts you in real-time.
46
46
 
47
47
  ```
48
48
  $ threatcrush monitor
@@ -183,6 +183,20 @@ threatcrush init --offline # Same, without signing in (scripts, CI, con
183
183
 
184
184
  Config lives at `/etc/threatcrush/threatcrushd.conf` with module configs in `/etc/threatcrush/threatcrushd.conf.d/`.
185
185
 
186
+ ### Postgres in Docker (brute-force bans)
187
+
188
+ Docker's default `json-file` log driver keeps container output out of journald and `/var/log`, so a Postgres container with its port published is invisible to log tailing. When `/var/run/docker.sock` exists, the daemon follows matching containers over the Docker Engine API (picking up restarts and recreates) and turns `password authentication failed` and `no pg_hba.conf entry` lines into `postgres-guard` events. The `postgres-auth-bruteforce` rule bans an address after 5 failures in 10 minutes. Private, loopback and Docker-bridge addresses and the `[remediation] protected` list are never counted. The client address is read from the line, so `log_line_prefix` needs `%h` or `%r` (Supabase's images have it); pg_hba rejects always name the host.
189
+
190
+ ```toml
191
+ [docker_logs]
192
+ enabled = true # default: on when the Docker socket exists
193
+ name_pattern = "supabase-db$" # container name regex
194
+ image_pattern = "(^|/)postgres(:|@|$)" # image regex; either match is enough
195
+ poll_seconds = 15 # how soon new or restarted containers are followed
196
+ ```
197
+
198
+ Check a line without touching the firewall: `threatcrush rules test postgres-auth-bruteforce --repeat 5 --line '<log line>'`.
199
+
186
200
  ### Local shell history protection
187
201
 
188
202
  Command-history collection is opt-in because shell histories may contain credentials or private work details: