Skip to content

Security workflow downloads the gitleaks binary with no checksum #885

Closed

Description

@scttfrdmn

Noticed while debugging a gitleaks failure on #881. .github/workflows/security.yml:

- name: Install gitleaks
  run: |
    VER=8.21.2
    curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${VER}/gitleaks_${VER}_linux_x64.tar.gz" \
      | tar -xz -C /usr/local/bin gitleaks

The binary that decides whether secrets are present is downloaded and executed with no checksum verification — curl | tar. The rest of the repo's Actions are SHA-pinned for exactly this reason, and this audit spent #876/#879 removing unverified downloads of binaries that run with authority. This one runs inside CI with the repository checked out.

Exposure is limited — it is a release asset over TLS from gitleaks' own GitHub releases — but a pinned version with no pinned hash is half a pin: a replaced release asset would be run unnoticed.

  • Verify against the release's gitleaks_8.21.2_checksums.txt, or pin the expected SHA-256 in the workflow and sha256sum -c before extracting.
  • Note: 8.21.2 is also old enough that .gitleaks.toml's allowlist semantics differ from current releases (recorded in that file). Upgrading is a separate, deliberate change — the config must move to [[allowlists]] in the same PR.

Activity

  1. added
    bug
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions