-
Notifications
You must be signed in to change notification settings - Fork 0
feat(security-scan): add optional runner input for self-hosted runners #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: resq-software/.github
Length of output: 7807
🌐 Web query:
GitHub Actions job container self-hosted runner Docker Linux runtime requirements💡 Result:
To use job containers or service containers with a self-hosted GitHub Actions runner, your infrastructure must meet specific requirements primarily focused on Linux and Docker support [1][2]. Requirements: - Operating System: You must use a Linux machine [1][2]. Job containers and service containers are not supported on self-hosted runners running Windows or macOS [3]. - Docker Engine: Docker must be installed and the Docker daemon must be running [1][2]. - Docker Access: The runner user must have permission to access the Docker daemon, typically by being a member of the docker group, or by ensuring the Docker socket (e.g., /var/run/docker.sock) is accessible [3]. - Connectivity: The host machine must be able to communicate with GitHub Actions over HTTPS (typically via port 443) [1]. Additional Context: - Limitations: Docker Hub rate limits apply to self-hosted runners, unlike GitHub-hosted runners which have an agreement with Docker to avoid these limits [4]. - Customization: On Linux, GitHub Actions allows for advanced customization of container creation (e.g., using Podman or Kubernetes) via a customization script triggered by environment variables on the runner [5]. - Workflow Configuration: When using a container for a job, you define the image in your workflow file under the jobs.<job_id>.container key [4][6]. If this is not set, steps run directly on the host machine unless they specifically call an action configured to run in a container [4]. If you are using Actions Runner Controller (ARC) on Kubernetes, "Docker-in-Docker" (DinD) mode is typically required, where the runner container shares the Docker socket with a sidecar [3].
Citations:
Constrain
runnerto Linux/Docker-capable labels.The documented single-label
self-hostedvalue does not guarantee a Linux Docker runtime, butsemgrepruns with a job-level container. This can fail to schedule or be intentionally unsafe if routed to Windows/macOS/Linux without Docker; use Linux/Docker-specific labels or allow multiple labels/groups in the input contract.🤖 Prompt for AI Agents
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: resq-software/.github
Length of output: 656
🏁 Script executed:
Repository: resq-software/.github
Length of output: 13529
Gate self-hosted runners for PR-based security scans.
The reusable runner input defaults to GitHub-hosted but allows self-hosted labels in callers; one documented caller forwards all secrets with
secrets: inherit, and other callers usesecrets: inheritfor their required checks. Restrict self-hosted usage forpull_request/fork scenarios to trusted/private PR sources or protected runner groups, and avoid inheriting secrets on non-ephemeral runners unless the repository and PR context are trusted. Audit-only runner hardening does not contain a compromised runner.🤖 Prompt for AI Agents