Skip to content

[static-analysis] RGS-012: Secret Exfiltration via Outbound HTTP Request in daily-byok-ollama-test.lock.yml #35652

@github-actions

Description

@github-actions

🚨 Runner-Guard Security Finding

Rule: RGS-012 — Secret Exfiltration via Outbound HTTP Request
Severity: High
File: .github/workflows/daily-byok-ollama-test.lock.yml
Lines: 384, 391 (2 findings in this file)

Description

A run: block contains an outbound HTTP request command (curl, wget, httpie, python requests, node fetch, etc.) targeting a non-GitHub domain (i.e., not github.com, api.github.com, or ghcr.io) in a job context that has access to secrets or publishing capabilities. This pattern is a strong indicator of credential exfiltration — the primary objective of most GitHub Actions supply-chain attacks.

The specific commands flagged are:

  • Line 384 (Install Ollama step): curl -fsSL (ollama.com/redacted) | sh
  • Line 391 (Start Ollama service step): triggers further outbound traffic from the just-installed binary

Impact

Attackers who achieve code execution in a CI runner (via expression injection, fork checkout, compromised action, etc.) need a way to exfiltrate stolen secrets to infrastructure they control. The most common method is an HTTP POST request to an attacker-owned domain carrying environment variables, secret values, or tokens as the request body. While there are legitimate uses of outbound HTTP requests in CI (API calls, webhook notifications, deployment), the combination of external HTTP requests with secrets access in a workflow triggered by untrusted events is a high-confidence indicator of either active exploitation or a dangerous pattern that could be exploited.

In this workflow specifically, the installer script (ollama.com/install.sh) is fetched and piped directly to a shell, and the subsequent ollama daemon makes further outbound calls. If ollama.com were ever compromised or the script tampered with in transit (e.g. DNS hijack), the workflow's secrets would be at risk.

Remediation

Consider one or more of the following:

  1. Pin Ollama by version + checksum: download the released binary tarball from a specific GitHub release tag and verify its SHA256 instead of piping install.sh to shell.
  2. Run installation in a separate job without secrets: split the workflow so the Install Ollama step runs in a job that has no access to secrets.* or write permissions, then pass the binary to a second job via an artifact.
  3. Cache the installed Ollama runtime: use actions/cache to avoid re-fetching the installer on every run, reducing the window where a tampered upstream installer can take effect.
  4. Allow-list outbound domains via the firewall: if ollama.com is the only domain needed, lock down egress for the rest of the job using the gh-aw network firewall configuration.

Detected by runner-guard v2.6.0 — CI/CD source-to-sink vulnerability scanner
Workflow run: https://github.com/github/gh-aw/actions/runs/26620964658

Generated by 📊 Static Analysis Report · opus47 22.9M ·

  • expires on Jun 5, 2026, 6:14 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions