Provide a dependency scanning auto-remediation execution path that does not require Docker-in-Docker or privileged mode
Release notes
Dependency scanning auto-remediation generates a job with a hard-coded docker:28-dind service, which requires a runner that permits privileged mode. This proposal adds an execution path that does not require Docker-in-Docker or privileged mode, so that the feature can be used in hardened environments where privileged containers are not permitted.
Problem to solve
DependencyManagement::SecurityUpdate::UpdateService sets SERVICES = %w[docker:28-dind] on the generated workload definition, along with the job variables DOCKER_HOST=tcp://docker:2376 and DOCKER_TLS_CERTDIR=/certs. This is hard-coded, with no opt-out.
Running a docker:28-dind service requires a runner configured with privileged = true. In hardened, regulated and government environments, privileged mode is commonly prohibited by policy, and that policy is not something the customer can waive for a single feature. The result is that dependency scanning auto-remediation cannot be used at all in those environments, even though it is an Ultimate feature they are entitled to.
There is also no way to substitute an alternative container runtime, so environments standardized on a rootless or daemonless builder cannot participate either.
Intended users
User experience goal
The user should be able to run dependency scanning auto-remediation on a runner that does not permit privileged mode, without weakening their runner security posture and without maintaining a separate exception for this one feature.
Proposal
Provide an execution path for the auto-remediation orchestrator that does not depend on a Docker daemon. Possible directions, for the team to evaluate:
- Remove the Docker dependency from the orchestrator itself, so the update runs directly in the job container. If Docker is only used to run per-ecosystem package manager images, an alternative is to run those steps in the orchestrator image or in sequential job steps.
- Support a daemonless or rootless builder as an alternative to
docker:28-dind. - As an interim step, make the
servicesand the associated Docker variables configurable, so that customers who have a non-privileged alternative available can supply it. This is less desirable than removing the requirement, because it moves the burden to the customer, but it would unblock affected environments sooner.
Note on scope: unlike the runner tags request in #627504 (closed), the first two options here likely require changes to the orchestrator image (registry.gitlab.com/security-products/dependency-management/orchestrator), which is not built from this repository. Only the interim option is contained in gitlab-org/gitlab.
Further details
Verified against the 19-2-stable-ee branch and cross-checked against master, in ee/app/services/dependency_management/security_update/update_service.rb.
This is intentionally filed separately from #627504 (closed), the request to allow runner tags to be set on the same job, because the two would be solved independently.
Note also that this is not a GitLab Duo Agent Platform flow, so the guidance that privileged mode is only needed for the agent sandbox does not apply. The dependency version bump path is non-agentic and runs the orchestrator container.
Permissions and Security
This proposal reduces the privilege required to run the feature. Removing the need for privileged = true removes a well known container escape surface from the runners that execute auto-remediation, and lets customers keep privileged mode disabled fleet-wide.
Documentation
The privileged mode requirement is currently undocumented. It is being added as a prerequisite in !253354 (merged), which would need updating when this proposal is implemented.
Availability & Testing
Needs verification on a runner with privileged = false for each supported package manager, since the Docker dependency may be per-ecosystem.
Available Tier
Ultimate.
Feature Usage Metrics
Adoption of auto-remediation on GitLab Self-Managed and GitLab Dedicated instances, which is where privileged mode restrictions are most common, and the rate of support tickets about the Docker-in-Docker requirement.
What does success look like, and how can we measure that?
A customer with a policy prohibiting privileged containers can enable dependency scanning auto-remediation and have it complete successfully, without an exception to their runner security posture.
Links / references
Raised by a customer through GitLab Support on GitLab Self-Managed 19.2.1 Ultimate (internal: ZD 16198), where privileged mode is a blocker.