Commit Graph
1638 Commits
Author SHA1 Message Date
Cédric VerstraetenandCopilot App 7b95de7c10 Document user-directed retention of recording signing key
Preserve the unresolved release finding without inventing an exception or changing recording trust.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-05 10:28:08 +01:00
Cédric VerstraetenandCopilot App 29537da6e8 Replace obsolete SVG loader with tested maintained SVGR alias
Preserve precompiled shared UI and CRA rendering, explicitly scan the real replacement identity, and guard against unsupported legacy loader calls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-05 08:55:30 +01:00
Cédric VerstraetenandCopilot App 69ac25396d Use consistent API regression test formatting
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-05 08:39:42 +01:00
Cédric VerstraetenandCopilot App 04beb83540 Fix scanner findings and rootfs assembly lint failures
Patch Go and compatible UI dependency paths; verify legacy toolchain integrations without bypassing release gates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-05 08:30:19 +01:00
Cédric VerstraetenandCopilot App 85dcb841e2 Require patched Go floor and update network dependencies
Align source security scanning with the verified Go1.26.10 compiler, disallow older vulnerable patch levels and update x/net. Preserve the remaining untriaged crypto advisory as a blocking finding rather than selecting an unreleased fixed version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 22:30:14 +01:00
Cédric VerstraetenandCopilot App 322ac7d7c9 Support classic Docker exports in native PR checks
Retain full Buildx metadata provenance without exporting an attested index to the classic Docker store. Strengthen healthcheck assertions for redirect rejection and deadline errors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 22:15:25 +01:00
Cédric VerstraetenandCopilot App e6f0c068da Install pinned scanner without release API credentials
Collect native runtime evidence before scanner setup and retain explicit setup failures while keeping security gates fail-closed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 22:09:22 +01:00
Cédric VerstraetenandCopilot App e3acd64a57 Align scratch runtime and releases with image hardening baseline
Move container HTTP to8080, remove capabilities/curl, preserve demo UI without mutating assets, patch vulnerable Go dependencies and document migration/runtime contracts. Gate releases on source/final-image security evidence and unresolved policy exceptions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 22:03:04 +01:00
Cédric VerstraetenandCopilot App 9553b1b4b9 Assemble a media-compatible scratch runtime image
Build an explicit architecture-aware runtime filesystem from installed Debian package dependency manifests, preserving dynamic loaders, codecs and plugins, generated library alternatives/caches, trust data, non-root ownership and port binding. Keep shell/PTY and common runtime utilities while omitting package-management and privilege tools. Expand image smoke checks for H264/H265, font rendering, shell/PTY, package provenance, writable caches and existing startup/volume behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 21:15:54 +01:00
Cédric VerstraetenandCopilot App f6ce5e0846 Pin Go 1.26 toolchain and verified multi-platform image bases
Use Go 1.26.10 locally without automatic toolchain switching, verify downloaded modules, and build with read-only module metadata and trimmed source/VCS paths. Pin Go, Node, and Debian multi-platform manifests while retaining the compatible CGO/FFmpeg runtime and existing architecture selection. Align Go CI and document pin-refresh and ARMv6 limitations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 20:53:40 +01:00
Cédric VerstraetenandCopilot App 024bb0abf9 Harden production Docker image and verify runtime permissions
Exclude local secrets and mutable data from image builds, restore Go checksum verification, remove runtime capability tooling and setuid/setgid permissions, and preserve non-root media and demo startup behavior. Add native image smoke checks and document runtime constraints.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 20:42:21 +01:00
Cédric Verstraeten 8016b3ba93 Merge pull request #349 from kerberos-io/cedricve-fix-v3-13-2-recording-regression
fix: prevent realtime-processing panic without MQTT credentials
v3.14.1
2026-11-04 16:25:24 +01:00
Cédric VerstraetenandCopilot App 4dc6fe7e18 fix: skip realtime processing without MQTT client
Avoid dereferencing the nil client returned when Hub credentials are absent. Log the disabled worker and cover enabled, disabled, and offline configurations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 16:20:30 +01:00
Cédric Verstraeten 553fd8e065 Merge pull request #347 from EpicMouse123/feature/onvif-channel
Add ONVIF channel selection for multi-channel devices
v3.14.0
2026-11-04 15:39:59 +01:00
adam.witwickiandClaude Opus 5.5 e1b886edd8 Add ONVIF channel selection for multi-channel devices
Encoders and NVRs expose several media profiles per video input, so
always using the first profile drives the camera on channel 1. Add a
1-based onvif_channel setting (config file, configmap, MongoDB, env var
AGENT_CAPTURE_IPCAMERA_ONVIF_CHANNEL, and onvif_credentials in the HTTP
API). The channel is resolved by grouping GetProfiles results by video
source; 0/unset keeps the existing first-profile behaviour.

PTZ, zoom, presets, position and focus now use the configured channel,
and the Hub heartbeat reads presets from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 10:11:50 +00:00
Cédric Verstraeten 24bcc296f1 Merge pull request #345 from kerberos-io/fix/preserve-tus-failures
fix/preserve-tus-failures
2026-10-21 21:45:05 +02:00
Cédric Verstraeten 42e67599ab Preserve TUS sessions and latest retry errors
Keep successful upload creation sessions usable when the optional response body is interrupted, while still requiring Location. Preserve the latest failure across retries and add regression coverage and documentation.
2026-10-21 21:34:25 +02:00
Cédric Verstraeten f64b762eee Merge pull request #344 from kerberos-io/fix/tus-minio-upload-empty-region
fix/tus-minio-upload-empty-region?expand=1
v3.13.2
2026-10-21 21:24:03 +02:00
Cédric Verstraeten 9c754b9b91 Preserve resumable upload failure details
Include up to 4 KiB of server error responses and retain the latest failure cause when retries are exhausted. Add coverage for Hub and Vault creation failures and document provider troubleshooting and the temporary ordinary-upload workaround.
2026-10-21 21:19:20 +02:00
Cédric Verstraeten 2f13af62ef Merge pull request #343 from kerberos-io/fix/add-walk-dir
fix/add-walk-dir
v3.13.1
2026-10-21 19:39:40 +02:00
Cédric Verstraeten 64e6901574 Fix legacy metadata and recording scan races
Backfill missing S3 checkpoint descriptions from validated legacy filenames while preserving checkpoint values, timestamp, and device key. Skip recordings deleted during directory scans while continuing to report other errors. Add regression coverage and document the metadata fallback.
2026-10-21 19:34:52 +02:00
Cédric Verstraeten c70253ddef Merge pull request #342 from kerberos-io/feature/update-file-format-user-yyyy-mm-dd-filemp4
feature/update-file-format-user-yyyy-mm-dd-filemp4
v3.13.0
2026-10-21 19:24:53 +02:00
Cédric Verstraeten 04497dd877 Adopt dated, millisecond-based recording paths
Store new recordings in UTC date directories with stable timestamp-device filenames, moving recording attributes into upload checkpoints. Use checkpoint metadata for S3 keys and HTTP/tus uploads, rejecting invalid S3 checkpoints instead of silently falling back.

Support flat and dated layouts across listing, playback, uploads, cleanup, and decryption while retaining legacy filename compatibility.
2026-10-21 19:18:26 +02:00
Cédric Verstraeten 3bd195834b Organize direct S3 recordings by UTC date
Use the filename's recording timestamp to build username/yyyy/mm/dd object keys, keeping retries consistent across midnight. Reject malformed filenames and timestamps, add date-layout coverage, and document compatibility with historical objects.
2026-10-21 16:19:52 +02:00
adam.witwicki 1445789694 Add ONVIF focus control over MQTT and HTTP
Add "focus" and "autofocus" ONVIF actions, sent through navigate-ptz in
the same shape as zoom:

  {"action":"focus","payload":{"focus":0.5}}   positive = near, -1..1
  {"action":"autofocus","payload":{}}

Focus goes through the ONVIF imaging service and is handled before the
PTZ configuration lookup, so it also works on fixed cameras with a
motorised lens. A focus nudge switches the camera to MANUAL focus;
autofocus hands control back.

Cameras differ in which focus moves they support, so the move type is
picked from GetMoveOptions: a continuous move for 500 ms then stop (as
ContinuousZoom), else a relative step, else an absolute step from the
current lens position (Axis only supports absolute moves).

Autofocus toggles MANUAL -> AUTO to force a fresh focus cycle. It
reports an error when the camera does not advertise AUTO, or accepts
AUTO but keeps reporting MANUAL (seen on Dahua).

The imaging requests carry only the focus fields, because the onvif
library's request types serialise every field. Some Axis firmware
rejects a SetImagingSettings that only carries Focus, so that request is
retried once with the current brightness. Rejected requests include the
camera's SOAP fault reason in the error.

Also add POST /api/camera/onvif/focus, mirroring /api/camera/onvif/zoom.

Hub: needs an adjustable focus step. How far one nudge moves the lens
differs a lot between cameras: one full-speed nudge crossed the whole
focus range on an Avigilon, while three barely moved another camera.
The agent uses the focus value (-1..1) as the speed / step size, so Hub
should let users set it (e.g. a focus step or speed control) instead of
sending a fixed value.

Tested against Axis, Dahua, Avigilon and two other ONVIF cameras.
2026-10-19 12:52:32 +01:00
Cédric Verstraeten 949762c91b Merge pull request #340 from kerberos-io/fix/hub-failed-error-messages
fix/hub-failed-error-messages
v3.12.9
2026-10-10 18:47:05 +02:00
Cédric Verstraeten b805b84d0a Align development API port to 8082
Use port 8082 for UI development endpoints, VS Code debugging, and devcontainer forwarding. Allow overriding the UI API port with REACT_APP_AGENT_API_PORT and document the matching backend setup.
2026-10-10 18:18:35 +02:00
Cédric Verstraeten a57b6310b2 Restrict Hub verification to saved endpoints
Require Hub and persistence verification URIs to match the saved configuration and reject redirects to prevent credential leakage. Add regression tests for unsaved URIs and cross-host redirects.
2026-10-10 18:09:53 +02:00
Cédric Verstraeten 2ec6faffe1 Update cloud_test.go 2026-10-10 18:01:17 +02:00
Cédric Verstraeten d40c544584 Verify Hub persistence with HEAD requests
Check upload authorization without uploading a test video. Guard against missing S3 configuration, strip credentials on cross-host redirects, and clarify rejection errors. Add coverage for HEAD requests and status-specific messages.
2026-10-10 17:52:52 +02:00
Cédric Verstraeten 02ed31da1f Merge pull request #339 from kerberos-io/fix/idr-loss-recovery
fix/idr-loss-recovery
v3.12.8
2026-10-08 21:06:58 +02:00
cedricveandCopilot 1db00728c9 fix(capture): honor permitted H264 frame gaps
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-08 18:33:57 +00:00
Cédric Verstraeten 58095365a9 Preserve video reference chains after packet loss
Drop dependent H264/H265 frames after RTP gaps or decode errors until random access restores the reference chain. Detect H264 frame_num gaps and evict complete GOPs so lagging queue readers resume at keyframes. Add regression coverage.
2026-10-08 20:00:23 +02:00
Cédric Verstraeten 7a00398952 Remove DockerHub login from PR builds
Reduce the build job's contents permission to read and remove DockerHub authentication, since pull request builds only need to build the image locally.
2026-10-07 16:00:09 +02:00
Cédric Verstraeten 71decc0edb Merge pull request #338 from EpicMouse123/chore/bump-onvif-v1.2.3
chore(deps): bump github.com/kerberos-io/onvif to v1.2.3
v3.12.7
2026-10-02 14:47:54 +02:00
adam.witwickiandClaude Opus 5.5 e2ed932aab chore(deps): bump github.com/kerberos-io/onvif to v1.2.3
v1.2.3 includes:
- kerberos-io/onvif#13: send WS-Security first in "both" auth mode, so
  authenticated calls work again on WS-Security-only cameras.
- kerberos-io/onvif#14: register DeviceIO endpoints listed only in
  GetServices, declare the tmd namespace, and marshal Unsubscribe as
  wsnt:Unsubscribe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:43:17 +01:00
Cédric Verstraeten 30b6f46bfb Merge pull request #337 from EpicMouse123/fix/onvif-pullpoint-addressing-and-io-fallback
fix(onvif): address pull-point requests and fall back to direct I/O queries
2026-10-02 14:12:32 +02:00
adam.witwickiandClaude Opus 5.5 3c5abf89bc fix(onvif): address pull-point requests and fall back to direct I/O queries
Digital inputs and relay outputs were never reported for cameras that
accept the pull-point subscription but reject the pulls:

- PullMessages and Unsubscribe are now sent with WS-Addressing Action and
  To headers. Some devices identify the subscription from wsa:To rather
  than the request URL, and reject requests without it as NotAuthorized.
- The heartbeat now queries the relay outputs and digital inputs directly
  whenever the subscriptions produce no I/O events, not only when no
  subscription could be created. Pulls that fail, and devices that never
  publish the initial I/O state, previously left the I/O list empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:05:55 +01:00
Cédric Verstraeten a91d06c3bc Merge pull request #336 from 4alvit/fix/snapshot-closed-queue
fix(capture): stop snapshot readers when the packet queue closes
v3.12.6
2026-10-02 08:00:56 +02:00
alvit 022881d707 fix(capture): stop snapshot readers when the packet queue closes 2026-09-29 11:55:38 -07:00
Cédric Verstraeten 15088e5b70 Merge pull request #335 from kerberos-io/feature/improve-custom-ptz-preset
feature/improve-custom-ptz-preset
v3.12.5
2026-09-27 22:11:04 +02:00
Cédric Verstraeten be933a4b7c Rework ONVIF absolute move with verified fallback
Replace the old AbsolutePanTiltMoveFake logic, which zoomed out and then moved one axis at a time with fixed speeds, with a new MoveToPosition implementation.

The new flow:
- Tries a native AbsoluteMove when the camera advertises absolute position spaces.
- Polls the position to confirm the move, with overall and no-progress timeouts.
- Falls back to a closed-loop ContinuousMove that drives pan, tilt and zoom at the same time. Velocity is proportional to the remaining error, clamped between min and max limits.
- Always stops the camera after a failed or finished move and returns combined errors instead of dropping them.
- Validates the target (NaN/Inf) and rejects incomplete position responses.

AbsolutePanTiltMoveFake is kept as a continuous-only wrapper. AbsolutePanTiltMove and GetPTZFunctionsFromDevice now guard against an empty PTZConfiguration. Movement failures are now logged at error level.

Adds unit tests that use a fake PTZ client to cover the native path, the fallback paths, timeouts, stop cleanup and XML encoding of combined ContinuousMove velocities.
2026-09-27 22:00:52 +02:00
Cédric Verstraeten e242882f24 Merge pull request #334 from kerberos-io/feature/custom-headers-integrations
feature/custom-headers-integrations
v3.12.4
2026-09-24 19:24:52 +02:00
Cédric VerstraetenandCopilot ebbde1e722 Harden custom Vault header validation and redirects
- Reject JSON null values and every Upload-* header.
- Reject tabs and all other control characters in values.
- Preserve configured header name casing on the wire.
- Strip custom headers, their manifest, Upload-Metadata and Vault
  credentials on cross-host redirects for legacy and tus uploads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-24 16:28:55 +00:00
Cédric VerstraetenandCopilot 12db58439a Document custom Vault header environment variables
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-24 16:18:26 +00:00
Cédric VerstraetenandCopilot 5dd3a85e50 Add custom metadata headers to Vault uploads
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-24 15:48:21 +00:00
Cédric Verstraeten c9dc1f783d Merge pull request #333 from kerberos-io/fix/deployment-name-to-friendly-name
fix/deployment-name-to-friendly-name
v3.12.3
2026-09-22 12:08:42 +02:00
cedricve 6866524274 feat: add deployment name fallback to friendly name in environment variable configuration 2026-09-22 10:04:03 +00:00
Cédric Verstraeten c2a07672d9 Merge pull request #331 from kerberos-io/feature/add-encrypted-metadata-field
feature/add-encrypted-metadata-field
v3.12.2
2026-09-14 22:10:20 +02:00
cedricve f64cdfd605 feat: add encrypted metadata field to recording uploads 2026-09-14 19:20:24 +00:00