Skip to content

fix: prefix networks and volumes with project name#86

Open
Jaro-c wants to merge 1 commit into
developfrom
fix/project-isolate-networks-volumes
Open

fix: prefix networks and volumes with project name#86
Jaro-c wants to merge 1 commit into
developfrom
fix/project-isolate-networks-volumes

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Networks and volumes without an explicit name: now use {project}_{key} instead of the bare compose key, preventing cross-project isolation breaches
  • resolve_network_name and resolve_network_mode accept a project parameter and apply the prefix consistently across create, connect, and down paths
  • External networks/volumes are unaffected (they have fixed names by definition)

Test plan

  • cargo test --lib passes (127 tests)
  • Two projects with networks: default: use distinct host networks (proj1_default, proj2_default)
  • Explicit name: overrides the prefix as before

Closes #75

Bare compose keys (e.g. "default", "db-data") were used as-is for
network and volume names. Two projects sharing the same key would
attach to the same network and write to the same volume, breaking
isolation and risking data corruption.

resolve_network_name/resolve_network_mode now accept a project
parameter and produce "{project}_{key}" when no explicit name: is
configured. External networks/volumes (which carry fixed names by
definition) are unaffected.

Closes #75

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c Jaro-c added type:bug Something broken prio:P0 Critical — drop everything area:containers Podman/containers status:review Waiting for review effort:M About a day labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:containers Podman/containers effort:M About a day prio:P0 Critical — drop everything status:review Waiting for review type:bug Something broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant