-
This is part of vulnerability fix in 16.8.4. With this, untrusted job may access arbitrary files on host via absolute path mount.
Also your approach of using shared cache can cause concurrent modification issues if multiple jobs using the cache runs.
Use built-in cache instead, although it involves cache upload/download.
-
Previous Value Current Value Open
Closed
| Type |
Enhancement
|
| Priority |
Critical
|
| Assignee | |
| Labels |
No labels
|
Issue Votes (0)
Environment
Problem Description
After upgrading OneDev from 16.7.3 to 16.8.4, our existing CI/CD jobs started failing because Docker volume mounts using
-vare no longer accepted.We have multiple Java and frontend projects, and all projects share the same Maven and npm dependency caches stored on the Docker host.
Previously, we configured the following Docker run options:
This allowed different projects to reuse the same dependency caches without repeatedly downloading dependencies.
Actual Behavior
After upgrading to 16.8.4, the build fails with:
I also tried configuring the same volume mounts in:
Administration → Job Executors → Docker Executor → More Settings → Run Options
However, the configuration form reports:
Therefore, the volume mounts cannot be configured at either the job step level or the executor level through Docker run options.
Why Shared Host Caches Are Important
We use Docker Executors to build multiple projects, and some builds run on remote Docker hosts.
Our requirements are:
OneDev's built-in Job Cache supports sharing caches through a parent project, but this appears to require transferring cache data between the remote executor and the OneDev server.
For large Maven/npm caches, this introduces unnecessary network traffic and build overhead.
Expected Behavior
We would like Docker Executors to support mounting explicitly configured, trusted host directories into build containers.
Ideally, an administrator could configure shared volume mounts at the Docker Executor level, for example:
These mounts would then be available to jobs using that executor, without allowing individual jobs to mount arbitrary host paths.
This could preserve security while allowing efficient dependency caching across multiple projects.
Questions
-voption an intentional restriction in newer versions of OneDev?Thank you!