Repository navigation
fix(security): harden files on the host, packaging and CI - #278
Merged
Merged
Conversation
- zmcontrol.pl's stderr went back to whoever sent a PTZ command. A control module's errors quote the camera URL, password included. - `GET /storage` showed view-only System users the S3 secret key in `Storage.Url`. - A recording that could not be probed returned its full path on the server. - A reqwest error names the URL it was sent to; `HttpClientError` now returns a generic message, as database errors do. - `auth_middleware` logged the whole URI at debug, query-string token included. - The login handler logged the username before validating it, so a line break in it forged log lines. Same for the server control action. - `DatabaseConfig`, `TurnConfig` and `SentryConfig` printed their password or DSN through `Debug`. Nothing prints them today. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Unauthenticated: - No listener limited how long a client could take to send request headers, so stalled connections were held open (Slowloris). All listeners now drop them after 30 seconds; a test with a control shows the difference. The plain HTTP listener moves from `axum::serve` to `axum_server`, which is what lets the timeout be set. - A request body that stalls ends after 30 idle seconds. - The rate limiter never dropped per-client entries, and counted every address in an IPv6 /64 separately. - RTSP: one address could hold every connection slot; now 16. - ONVIF discovery: a host could answer a probe with unlimited devices; now 256. Outbound: - The ONVIF client refuses this server and cloud metadata addresses, no longer follows redirects in the event listener, caps response size, and connects to the addresses it checked (DNS rebinding). - A capture path may not point at a cloud metadata service. - The client for the search models and telemetry had no timeout. Limits for logged-in users: - Frame decodes and synopsis stills: one per core. VOD packaging: two. Exports: four. On-demand worker commands: two per monitor. - WebRTC: 64 ICE candidates per session, SDP up to 64 KiB, WebSocket messages up to 256 KiB. - Generated videos: 7680 a side. Page numbers: clamped so the offset cannot overflow. The synopsis still cache and the probe cache are bounded. - The request log span records the path, not the query string, which can carry `?token=` or `?st=`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sers - Users: an administrator could set a password of any length (now six characters, as `/me/password` requires) and a username of any characters (now what login accepts). `language`, `home_view` and `max_bandwidth` took `/` and `..`; ZoneMinder's PHP builds include paths from them. - Snapshots: `created_by` came from the request. It now comes from the token; only a System editor may change it. - Menu items: `javascript:` and `data:` links were accepted and shown to every user. - Filters: line breaks in `email_to`, `email_subject` and `email_server` allowed mail header injection through zmfilter.pl. - X10 triggers: the length rules were declared and never run. - Push registrations: `monitor_list` is now ids and commas. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Host: - HLS segments were written under `/tmp/hls` at 0755. Any local user could read live video, or create the path first as a symlink and choose where segments went. The directory is now 0700 and a symlink or another user's directory is refused. - `/tmp/mysql.sock` was picked automatically when no standard socket existed, so a local user could stand in for the database. It now has to be named in `db.socket`. - Startup warns when a signing key is readable by other users. - `prod.toml` and `zm-api.env` were installed 0644; setup-instance.sh makes them 0640 root:<service group>. - generate-jwt-keys.sh left the private key world-readable until its chmod. deploy-dev.sh uploaded to a fixed name in /tmp and installed it as root. The test databases were published on every interface. CI: - The release .deb was built without `--locked`. - Workflow tokens are read-only except in the jobs that publish. - The two third-party actions that run with a write token are pinned to commits. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SteveGilvarry
force-pushed
the
security/4-input-validation
branch
from
November 17, 2026 22:03
303afb9 to
8ec8e44
Compare
SteveGilvarry
force-pushed
the
security/5-host-ci
branch
from
November 17, 2026 22:03
667d44b to
1fb0e11
Compare
SteveGilvarry
changed the base branch from
security/4-input-validation
to
master
November 17, 2026 23:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Host:
/tmp/hlsat 0755. Any local usercould read live video, or create the path first as a symlink and choose
where segments went. The directory is now 0700 and a symlink or
another user's directory is refused.
/tmp/mysql.sockwas picked automatically when no standard socketexisted, so a local user could stand in for the database. It now has to
be named in
db.socket.prod.tomlandzm-api.envwere installed 0644; setup-instance.shmakes them 0640 root:.
chmod. deploy-dev.sh uploaded to a fixed name in /tmp and installed it
as root. The test databases were published on every interface.
CI:
--locked.commits.
Notes for review
/tmp/mysql.sockmust setdb.socket, and an HLS storage path that is a symlink is refused.🤖 Generated with Claude Code