Preserve the unresolved release finding without inventing an exception or changing recording trust.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Reduce the build job's contents permission to read and remove DockerHub authentication, since pull request builds only need to build the image locally.
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>
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>
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.
- 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>