Skip to content

[setup-security] Unpinned curl | sudo sh root install in sudo_docker_sbx_install.sh (supply-chain risk) #62521

Description

@github-actions

Summary

actions/setup/sh/sudo_docker_sbx_install.sh installs the Docker apt repository by piping a remotely-fetched, unversioned convenience script directly into a root shell: curl -fsSL (get.docker.com/redacted) | sudo REPO_ONLY=1 sh. Because the script body is fetched at run time and executed as root without any integrity verification (no pinned commit/tag, no checksum), whatever get.docker.com returns at that moment runs with full privileges on the runner. This is the classic curl | sudo sh supply-chain risk: a compromise of the upstream endpoint, a TLS/MITM downgrade, or a malicious redirect yields arbitrary root code execution inside the setup action. Sibling installers in the same directory (e.g. sudo_gvisor_install.sh) already demonstrate the hardened pattern — pinned version plus SHA-512 verification — so this script is inconsistent with the repository's own baseline.

Affected Files

File Line(s) Pattern
actions/setup/sh/sudo_docker_sbx_install.sh 15 curl -fsSL (get.docker.com/redacted) | sudo REPO_ONLY=1 sh

Risk

Severity: Medium
Attack vector: An attacker who can influence the content served from (get.docker.com/redacted) (upstream compromise, CDN/DNS hijack, or an on-path TLS interception where cert validation is weakened) causes attacker-controlled shell code to be executed as root during the setup action. There is no pinning or checksum to detect substitution, and the piped-to-shell form means the code runs even if only partially downloaded.
Impact: Arbitrary root-level code execution on the GitHub Actions runner during setup — full compromise of the workflow environment, including any secrets/tokens present in the job, the ability to tamper with the AWF sandbox/firewall setup, and persistence within the runner for the remainder of the job.

Recommendation

  1. Stop piping a remote script into a privileged shell. Prefer adding the Docker apt repository deterministically: install the pinned Docker GPG key and write the deb [signed-by=...] source line directly, then sudo apt-get update && sudo apt-get install -y docker-sbx.
  2. If the convenience script must be used, pin it to a specific commit and verify it before execution: download to a file, compare against a checked-in SHA-256, and only then run it — never pipe curl output straight into sh. Mirror the pattern already used in sudo_gvisor_install.sh (pinned version + SHA-512 sha512sum -c).
  3. Fetch to disk with an explicit failure on redirect/host mismatch and add the runner-guard:ignore annotation with a justification only after verification is in place, consistent with the other install scripts.

Evidence

Relevant code snippet — actions/setup/sh/sudo_docker_sbx_install.sh
echo "::group::Install docker-sbx"
# Add Docker apt repo without installing Docker Engine (already present).
curl -fsSL (get.docker.com/redacted) | sudo REPO_ONLY=1 sh
sudo apt-get install -y docker-sbx
sbx version
# Fix KVM permissions so the runner user can create microVMs.
sudo chmod 666 /dev/kvm
echo "docker-sbx installed successfully"
echo "::endgroup::"

Contrast with the hardened sibling sudo_gvisor_install.sh (pinned version + checksum verification):

URL="(storage.googleapis.com/redacted)
curl -fsSL "${URL}/runsc" -o /tmp/runsc
curl -fsSL "${URL}/runsc.sha512" -o /tmp/runsc.sha512
(cd /tmp && sha512sum -c runsc.sha512)

Generated by 🛡️ Daily action/setup/* Security Audit · copilot · opus48 · 134 AIC · ⌖ 33.3 AIC · ⊞ 10.2K · ◷

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 11.6 AIC · ⊞ 12.7K · ◷

  2. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 14.9 AIC · ⊞ 12.7K · ◷

  3. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 10.5 AIC · ⊞ 12.7K · ◷

  4. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.13 AIC · ⊞ 12.7K · ◷

  5. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.37 AIC · ⊞ 13.3K · ◷

  6. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.48 AIC · ⌖ 11.5 AIC · ⊞ 13.2K · ◷

  7. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 8.62 AIC · ⌖ 10.3 AIC · ⊞ 13.2K · ◷

  8. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.02 AIC · ⌖ 11.7 AIC · ⊞ 13.4K · ◷

  9. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.31 AIC · ⌖ 10.2 AIC · ⊞ 13.4K · ◷

  10. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 10.1 AIC · ⌖ 12.7 AIC · ⊞ 13.4K · ◷

  11. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 10.1 AIC · ⌖ 12.6 AIC · ⊞ 13.4K · ◷

  12. github-actions commented on Sep 22, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.53 AIC · ⌖ 14.1 AIC · ⊞ 13.3K · ◷

  13. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 7.76 AIC · ⌖ 12.1 AIC · ⊞ 13.3K · ◷

  14. 2 remaining items

  15. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.77 AIC · ⌖ 10.4 AIC · ⊞ 13.5K · ◷

  16. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 11.6 AIC · ⌖ 10.4 AIC · ⊞ 13.5K · ◷

  17. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 8.63 AIC · ⌖ 10.4 AIC · ⊞ 13.5K · ◷

  18. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 11.6 AIC · ⌖ 14.4 AIC · ⊞ 13.5K · ◷

  19. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.55 AIC · ⌖ 10.9 AIC · ⊞ 13.5K · ◷

  20. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 11.9 AIC · ⌖ 13 AIC · ⊞ 13.5K · ◷

  21. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 10.2 AIC · ⌖ 10.1 AIC · ⊞ 13.5K · ◷

  22. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 8.05 AIC · ⌖ 10.6 AIC · ⊞ 13.5K · ◷

  23. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.35 AIC · ⌖ 16.1 AIC · ⊞ 13.5K · ◷

  24. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 11.3 AIC · ⌖ 10.4 AIC · ⊞ 13.6K · ◷

  25. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 7.82 AIC · ⌖ 8.87 AIC · ⊞ 13.6K · ◷

  26. github-actions commented on Sep 23, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt54 · 9.1 AIC · ⌖ 10.4 AIC · ⊞ 13.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions