Repository navigation
fix: copy Rustic secrets through a holder volume - #5201
Merged
Merged
Conversation
- Docker 29 cannot copy files into a container that has a read-only mount, which broke system backups - Create a mount-free holder container, copy the secrets into its volume, and mount that volume into the Rustic container read-only via VolumesFrom - Move container removal into a shared `remove` helper so the holder is removed after the Rustic container - Add `VolumesFrom` to `volumes.HelperHost` and pass it through `HostConfig` Fixes #5194
- Backup passwords and S3 keys sat in plain text where any volume reader could list and read them - Copy Rustic secrets into a per-run volume (arcane-rustic-secrets-<uuid>) instead of a holder's anonymous volume - Mount the secrets volume read-only into the Rustic helper and remove it after the run - Return 403 for arcane-rustic-secrets-* volumes unless the caller is a global admin - Remove the now-unused VolumesFrom field from the helper host config
| "slices" | ||
| "strings" | ||
| "time" | ||
| "uuid" |
There was a problem hiding this comment.
The import "uuid" is not a valid import path. It sits in the standard-library group, but there is no standard-library uuid package. The UUID library lives at a full module path such as github.com/google/uuid. The file will fail to compile with package uuid is not in std, and uuid.New().String() on line 84 will not resolve.
Fix by importing the third-party package in the third-party import group:
import "github.com/google/uuid"Use whichever uuid module the repository already depends on.
Suggested change
| "uuid" | |
| "github.com/google/uuid" |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
- A crash or failed cleanup can leave a Rustic run's plain-text secrets volume behind - Orphan cleanup now lists volumes matching the Rustic secrets prefix and removes them - Removal failures are logged and skipped so the remaining volumes are still cleaned up
- Orphan cleanup removed any volume whose name contained the Rustic secrets prefix, since Docker's name filter matches substrings. - Require Arcane's helper labels on a volume before removing it.
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.
Checklist
mainbranchm.*())What This PR Implements
System backups fail on some Docker 29 releases with
openat data/arcane.db: read-only file system. Since #5085, Arcane copies the Rustic secrets into the Rustic container withdocker cpbefore starting it. A system backup mounts the data directory read-only at/dataand mounts the staged database over/data/arcane.db. The affected Docker releases open existing mount targets for writing duringdocker cp, so the copy fails on the read-only mount. The daemon bug was fixed upstream in September 2026. Docker 29.10.1 is not affected.This change copies the secrets into a mount-free holder container. The Rustic container borrows the holder's volume read-only, so Arcane never copies into a container that has nested mounts.
Fixes #5194
Changes Made
backend/pkg/rustic/run.go: create a holder container from the Rustic image with only an anonymous volume at the secrets directory, copy the secrets into it, and attach that volume to the Rustic container read-only throughVolumesFrom.backend/pkg/rustic/run.go: move container removal into aremovehelper used for both the holder and the Rustic container. The holder is removed last, after Rustic stops using its volume.backend/pkg/volumes/helper.go:HelperHostgains aVolumesFromfield, passed through toHostConfig.Secrets still stay out of the container environment and command.
Testing Done
docker cpinto a container with the system backup's mount layout fails withopenat data/arcane.db: read-only file system.rustic.Runon the same daemon with the system backup's mount layout:initsucceeded.backup /datasucceeded and captured the staged database.dump latest:/data/arcane.dbreturned the staged database.credentials handlingerror.go testpasses forpkg/volumes,internal/backup, andinternal/system/children/backup/....pkg/rustichas no test files.just lint backend: 0 issues.just lint allfails at the frontend svelte-check step with 542 "Cannot find module" errors for generated Paraglide files in this worktree. No frontend files changed.Not verified: a full system backup through the Arcane UI, UGOS, and Podman.
AI Tool Used (if applicable)
Change produced by anthropic/claude-fable-5-2 in harness Pi.
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Confidence Score: 5/5


The PR appears safe to merge; the ownership check addresses the previous data-loss finding.Summary
Moves Rustic secrets into a named, labeled volume populated through a separate holder container.
Reviewed by code inspection; no tests were run during this review.
Reviews (4) · Last reviewed commit: "fix: only remove owned Rustic secrets vo..." · Reviewed by Greptile