Repository navigation
feat(docker): stricter request validation and bind mount rules - #123
Draft
oleksandr-nc wants to merge 1 commit into
Draft
oleksandr-nc wants to merge 1 commit into
oleksandr-nc wants to merge 1 commit into
Conversation
oleksandr-nc
force-pushed
the
feat/stricter-payload-validation
branch
4 times, most recently
from
October 7, 2026 11:47
96a896e to
f9c22a7
Compare
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
oleksandr-nc
force-pushed
the
feat/stricter-payload-validation
branch
from
October 8, 2026 06:40
f9c22a7 to
6e67a7a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
HaRP passed the Docker create payload to the Engine mostly as it arrived, so a typo in a mount mode silently produced a read-write mount and bad values only failed later with an opaque Docker error. The agent now validates the payload up front and answers 400 with the reason before anything is created. New
HP_EXAPP_BIND_MOUNTS_DISABLED,HP_EXAPP_BIND_MOUNTS_ALLOWED,HP_EXAPP_BIND_MOUNTS_DENIEDandHP_EXAPP_BIND_MOUNTS_ENFORCE_ALLsettings restrict which host paths ExApps may bind mount, with a default list of system paths (see the README).docker-engine-portis limited toHP_DOCKER_ENGINE_PORTS, credentials and app secrets are masked in the log, and the unit tests run inside the built image in a new workflow.Visible changes for administrators:
/docker/exapp/*and/k8s/exapp/*endpoint answers 400 with afield: messagereason for: names, instance ids and role suffixes that do not start with a letter or digit, contain anything outside[A-Za-z0-9_.-]or are longer than 63 characters; on create, anetwork_modethat is empty or contains:, blanks or control characters, an unknown restart policy, negative or non-integer resource limits, mount paths that are relative or contain:,..or control characters, and a mount mode other thanro/rw(such stored mounts used to become read-write)./dev,/run,/var/run,/root) and its read-write entries (/etc,/usr,/bin,/sbin,/lib,/lib64,/var/spool) only log a warning in this release, because AppAPI re-sends stored mounts on every ExApp update after removing the old container;HP_EXAPP_BIND_MOUNTS_ENFORCE_ALL=truerefuses them now. See "Upgrading" in the README.docker-engine-portmust be inHP_DOCKER_ENGINE_PORTS(default 24000-24099, the Docker Engine ports of the FRP server); other values get 400, or 403 on the Docker API passthrough. This includes remote engines on 23000-23999.harp-shared-keyno longer reaches ExApps, and neither it nor AppAPI'sAuthorizationheader reaches the Docker Engine.X-Forwarded-For, not against the proxy.