[V2.0.0] - November 2026
Security
- ๐ No more hard-coded session secret - The Flask secret key used to default to a fixed value, which allowed
forging a logged-in session cookie. A random key is now generated on first start and stored in/config/secret_key
(or setPRUNEMATE_SECRETyourself) - ๐ก๏ธ CSRF protection - All state-changing requests (save, run, preview, hosts, test notification, login, logout)
require a per-session token. Logout is now a POST request - ๐งฑ Content-Security-Policy & security headers -
script-src 'self',style-src 'self',frame-ancestors 'none',
X-Frame-Options: DENY,nosniff,Referrer-Policy, HSTS over HTTPS. All inline scripts and styles were moved to
static/, and the Google Fonts dependency was replaced by self-hosted fonts - ๐งผ XSS fixes - The prune preview no longer inserts container/image/network/volume/host names or error messages as HTML
- โ Login brute-force protection - Temporary lockout per IP after repeated failed logins (form + Basic Auth),
constant-time username check, sessions expire (PRUNEMATE_SESSION_HOURS), fresh session on login,
optionalSecurecookies (PRUNEMATE_COOKIE_SECURE) and reverse-proxy support (PRUNEMATE_TRUSTED_PROXIES) - ๐ Secrets stay server-side - Notification tokens and webhook URLs are no longer rendered into the page;
ntfy URL passwords are masked. Leave a field empty to keep the stored value, or click Remove - ๐ Log redaction - The Telegram bot token and Discord webhook URL were written to the log in plain text on every
config save; all token/secret/webhook fields are now redacted. The log viewer redacts old log lines too - ๐ Gotify token sent as header (
X-Gotify-Key) instead of in the URL query string - ๐ Optional API key for
/statsand/api/stats(PRUNEMATE_API_KEY,X-API-Keyheader) - โ
Stricter input validation - Notification URLs must be http(s) (no
file://), schedule values are whitelisted,
host names/URLs are validated, Telegram messages are HTML-escaped, open redirect via?next=/\evilfixed - ๐ณ Least privilege - New compose file uses a docker-socket-proxy on an internal network, a read-only root
filesystem,no-new-privilegesandcap_drop: ALL. NewPRUNEMATE_DOCKER_HOSTvariable - ๐ TLS for remote hosts - Mutual TLS with certificate + host name verification (
/certs/<folder>/{ca,cert,key}.pem) - ๐ฆ Pinned dependencies (
requirements.txt), DockerHEALTHCHECK(/healthz), gunicorn control socket disabled
Added
- ๐ Dashboard - Next-run countdown, last-run status (with failed hosts), total reclaimed
- ๐ Run history - Bar chart of space reclaimed per run (last 30, with tooltips) and a recent-runs table;
stored in/config/history.json(last 100 runs, per host). On the first start after upgrading, earlier runs
are reconstructed once from the existing V1.x log files (marked "from V1 logs"; space values are rounded) - ๐ท๏ธ Protection rules - Skip resources with a keep label (default
prunemate.keep) and/or younger than N hours.
Applied to scheduled runs, manual runs and the preview - ๐ Log viewer in the UI with filter, line count and "hide heartbeats"
- โ ๏ธ Volume safety - Red warning when volume pruning is enabled; manual runs only delete volumes after typing
DELETEin the preview (otherwise volumes are skipped for that run). Scheduled runs are unchanged - ๐ฉบ Write check - Red banner and log error when
/configis not writable; saves report an error instead of
silently losing settings - ๐ Warning banner when authentication is disabled
Changed
- ๐จ Redesigned UI - Same dark theme, SVG icons instead of emojis, sticky save bar with
unsaved-changes indicator, toasts, native dialogs instead ofalert()/confirm()/prompt(), collapsible sections
via<details>, improved mobile layout - โก No page reloads - Saving settings and managing hosts happen in the background
- ๐ Network preview now matches Docker's behavior (networks used by stopped containers are not pruned)
- ๐งต Gunicorn threads increased from 2 to 4 so the UI stays responsive during a manual prune
- ๐ Shorter README - The README now covers install, login and data protection; details moved to
docs/
(configuration, notifications, multiple hosts, Homepage widget, troubleshooting)
Fixed
- ๐๏ธ Build cache preview listed cache entries shared with existing images, which
docker builder prune
keeps. The preview now matches what is actually removed (bug existed since build cache support) - ๐ Lost config changes - Concurrent requests (dashboard refresh, heartbeat) could replace the in-memory config
between "change" and "save", silently dropping a change. All config writes are now atomic - ๐ Startup crash on invalid numbers - Invalid values such as
PRUNEMATE_SESSION_HOURS=12hnow fall back to the
default with a warning instead of preventing startup - ๐
PRUNEMATE_LOG_FILEis now honored by the logger as well as the log viewer
Removed
POST /run-now(unused by the UI; use Preview & run)
Upgrading from V1.4.0
Upgrading is a drop-in image update: docker compose pull && docker compose up -d. Your existing
docker-compose.yaml keeps working unchanged (direct socket mount is still supported).
Kept automatically: schedule, cleanup options, external hosts, notification settings including stored
tokens, all-time statistics (stats.json) and the login (same PRUNEMATE_AUTH_PASSWORD_HASH).
Downgrading back to V1.4.0 also works; it ignores the new settings.
Run history: V1.4.0 only stored totals. On the first V2.0.0 start, PruneMate reads the existing log files
(./logs/prunemate.log and its rotated copies) once and rebuilds the per-run history from them: date, manual or
scheduled, per-host counts, failed hosts and space reclaimed (rounded, as logged). Only runs that are still in the
logs (up to ~20 MB) can be imported; the all-time totals are always complete.
What changes for you:
- Everyone is logged out once (new session secret, stored in
/config/secret_key). - Resources labelled
prunemate.keepare now skipped by default. Disable this under Cleanup options โ Protection. - Scripts that POST to PruneMate (e.g. the removed
/run-now) need a CSRF token; read-only APIs such as
/api/statsare unchanged and stay public unless you setPRUNEMATE_API_KEY.
Optional: switch to the new hardened docker-compose.yaml (socket proxy, read-only, cap_drop: ALL).
With cap_drop: ALL, ./config and ./logs must be writable for root; if not, PruneMate shows a red banner,
logs an ERROR with the fix, and refuses to report unsaved settings as saved.
Recommended: V1.4.0 wrote the Telegram bot token and Discord webhook URL in plain text to
./logs/prunemate.log. Start V2.0.0 once first (so the run history is imported), then delete the old log files
(./logs/prunemate.log*) and consider rotating those tokens.