Skip to content

fix: remove full host filesystem hostPath mount from web deployment#119

Open
hacktron-app-stg[bot] wants to merge 1 commit into
add-k8s-deploymentfrom
hacktron/fix-357b40ea
Open

fix: remove full host filesystem hostPath mount from web deployment#119
hacktron-app-stg[bot] wants to merge 1 commit into
add-k8s-deploymentfrom
hacktron/fix-357b40ea

Conversation

@hacktron-app-stg

Copy link
Copy Markdown

Vulnerability

deployment.yaml mounted the entire host root filesystem into the web container:

volumeMounts:
  - name: host-root
    mountPath: /host
volumes:
  - name: host-root
    hostPath:
      path: /

A hostPath volume with path: / gives the container read/write access to every file on the underlying node — kernel/config/secrets, other containers' data, kubelet credentials, etc. Combined with the container's privileged settings this allows trivial full host compromise. Severity: critical.

Fix

Removed the host-root hostPath volume and its volumeMount. The mount was not referenced by any application code or configuration, so it can be dropped safely without a functional replacement.

Verification

  • Confirmed no other manifest or code references the host-root volume or /host mount path.
  • Verified the resulting deployment.yaml is structurally intact YAML (the containers list now terminates at the env block; no dangling volumeMounts/volumes keys remain).

Note: this PR intentionally addresses only the reported "Full Host Filesystem Mount" finding. Other insecure settings present in the manifest (privileged, hostNetwork/hostPID, runAsUser 0, hardcoded secret, :latest image) are separate findings and out of scope for this change.


Automated fix by Hacktron for finding: https://staging.hacktron.ai/testestesttest/findings/357b40ea-46a3-453e-9e47-51829fca59e4

@hacktron-app-stg
hacktron-app-stg Bot requested a review from maekuss July 23, 2026 09:19
The web container mounted the host root (`hostPath: /`) at `/host`,
granting read/write access to the entire node filesystem and enabling
full host compromise. Removed the volume and its volumeMount since no
code referenced it.
@hacktron-app-stg
hacktron-app-stg Bot force-pushed the hacktron/fix-357b40ea branch from 5af598e to ccab0e2 Compare July 23, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants