[PR #1760] [CLOSED] Don't bind host docker daemon socket #2115

Closed
opened 2026-03-01 21:54:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1760
Author: @vicamo
Created: 4/24/2023
Status: Closed

Base: masterHead: for-upstream/dont-bind-host-docker-socket


📝 Commits (1)

  • 43045e3 Don't bind host docker daemon socket

📊 Changes

1 file changed (+1 additions, -3 deletions)

View changed files

📝 pkg/runner/run_context.go (+1 -3)

📄 Description

Binding host docker daemon socket into executor containers can be a terrible security hole. Don't do this unless explicitly specified through customized mounts.

To exploit this issue, run following test job:

on:
  pull_request:
    branches:
      - 'main'

jobs:
  test:
    runs-on: ubuntu-latest
    container: docker:git
    steps:
      - name: Bind host rootfs
        run: |
          docker run --detach --name i_am_almighty -v /:/host-rootfs ubuntu:latest /bin/tail -f /dev/null
          docker exec i_am_almighty id
          docker exec i_am_almighty ls -la /host-rootfs

See also #1744 , #1756, #1757.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1760 **Author:** [@vicamo](https://github.com/vicamo) **Created:** 4/24/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `for-upstream/dont-bind-host-docker-socket` --- ### 📝 Commits (1) - [`43045e3`](https://github.com/nektos/act/commit/43045e3d6775973479184ea5a08bd720d495a6c0) Don't bind host docker daemon socket ### 📊 Changes **1 file changed** (+1 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/run_context.go` (+1 -3) </details> ### 📄 Description Binding host docker daemon socket into executor containers can be a terrible security hole. Don't do this unless explicitly specified through customized mounts. To exploit this issue, run following test job: ```yml on: pull_request: branches: - 'main' jobs: test: runs-on: ubuntu-latest container: docker:git steps: - name: Bind host rootfs run: | docker run --detach --name i_am_almighty -v /:/host-rootfs ubuntu:latest /bin/tail -f /dev/null docker exec i_am_almighty id docker exec i_am_almighty ls -la /host-rootfs ``` See also #1744 , #1756, #1757. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2115
No description provided.