Skip to content

[static-analysis] RGS-018: Suspicious Payload Execution Pattern in daily-byok-ollama-test.lock.ymlΒ #35653

@github-actions

Description

@github-actions

🚨 Runner-Guard Security Finding

Rule: RGS-018 β€” Suspicious Payload Execution Pattern
Severity: High
File: .github/workflows/daily-byok-ollama-test.lock.yml
Line: 384

Description

A workflow run: block contains code patterns associated with obfuscated payload execution or known indicators of compromise (IOCs) from active supply chain attack campaigns. This includes eval+decode chains (e.g., eval(base64.b64decode(...)), base64 --decode | bash), known malware marker variables, persistence file paths, and C2 communication patterns. These patterns are loaded from Runner Guard's threat signature database, which can be updated independently of the scanner binary.

The specific command flagged is the curl | sh install pattern at line 384:

      - name: Install Ollama
        run: |
          curl -fsSL (ollama.com/redacted) | sh

Runner-Guard treats remote-fetched scripts piped directly into a shell as an indicator of susceptibility to the broader supply-chain payload-execution attack class β€” the same shape the scanner uses to detect known IOC patterns.

Impact

A match against a known IOC indicates active compromise; a match against a dangerous execution pattern (this case) indicates susceptibility to this class of supply chain attack. If raw.githubusercontent.com/ollama.com content were ever tampered with (compromised CDN, hijacked DNS, MitM in transit), arbitrary code would execute in the CI runner with whatever permissions the job carries. Combined with RGS-012 (this same file, lines 384/391), exfiltration of any available secrets becomes trivial.

Remediation

  1. Pin the install script by content: fetch the installer to a file, verify its SHA256 against a known-good hash, then bash ./install.sh.
  2. Pin Ollama by released binary: download a tagged release tarball from github.com/ollama/ollama/releases/download/<tag>/... (already a GitHub-hosted, allowlisted domain) and verify the asset checksum from the release page.
  3. Stop piping curl into sh: capture the script first, optionally inspect/diff against an audited reference, then execute.
  4. Sandbox the install step: run installation in a job without secrets: and pass the resulting binary to downstream jobs via actions/upload-artifact.

Note: this file also has RGS-012 flagged on lines 384 and 391 β€” fixing RGS-018 with a pinned tarball + checksum should also satisfy RGS-012 if the downloaded asset comes from github.com/api.github.com/ghcr.io.


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