Hub rules-github-actions

rules-github-actions

v3 public Verified

Github-actions

GitHub Actions is a CI/CD platform that allows you to automate your build, test, and deployment pipeline. These rules govern workflow security, secret management, and action configuration for AI agents.

@sigmashakeinc 17 pulls 10 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-github-actions →
Severity
6 error 4 warn 0 info
demo.cast
GitHub Actions is a CI/CD platform that allows you to automate your build, test, and deployment pipeline. These rules govern workflow security, secret management, and action configuration for AI agents.

Rules index

10 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

gha

no-expression-injection-gha error block

Injecting github.event context directly into run: steps allows attackers to execute arbitrary code via crafted PR titles, commit messages, or issue bodies. Store the value in an env variable first and reference $ENV_VAR in the run step.

Rule source requires an active Pro or Enterprise subscription.
no-gha-cache-poisoning warning log

RISK: Cache keys derived from PR-controlled data (branch name, event payload) allow cache poisoning — a malicious PR can write a poisoned cache entry that a later trusted workflow restores and executes (pwn-request cache poisoning pattern). FIX: Scope cache keys to trusted data only: runner.os, hashFiles(), and static strings.

Rule source requires an active Pro or Enterprise subscription.
no-gha-oidc-id-token-write-without-condition warning log

RISK: Granting id-token: write without a branch/environment condition allows any workflow trigger (including PRs from forks) to obtain a cloud OIDC token, enabling unauthorized cloud resource access. FIX: Restrict jobs that need OIDC tokens to protected environments or specific branch conditions (github.ref == 'refs/heads/main').

Rule source requires an active Pro or Enterprise subscription.
no-gha-run-name-injection warning log

RISK: Embedding untrusted user-controlled data (branch names, event payloads) in workflow run-name can inject JavaScript into the Actions UI if GitHub ever changes how run names are rendered — defense-in-depth. FIX: Use only static strings or trusted context values (github.actor, github.sha) in run-name.

Rule source requires an active Pro or Enterprise subscription.
no-gha-workflow-dispatch-secret-input error log

RISK: workflow_dispatch string inputs are stored in the audit log and visible in the Actions UI run history — passing secrets as inputs exposes them to anyone with Actions read access. FIX: Use GitHub Actions secrets (${{ secrets.MY_SECRET }}) rather than input parameters for sensitive values; use type: choice to constrain valid non-sensitive inputs.

Rule source requires an active Pro or Enterprise subscription.
no-hardcoded-secrets-gha error block

Hardcoded secrets in workflow files are stored in plaintext in the repository. Use encrypted GitHub Secrets: ${{ secrets.MY_SECRET }} or environment secrets.

Rule source requires an active Pro or Enterprise subscription.
no-pull-request-target-checkout error block

pull_request_target with actions/checkout of the PR branch executes untrusted code with write permissions — the most critical GitHub Actions misconfiguration. Use pull_request instead, or explicitly checkout the base branch.

Rule source requires an active Pro or Enterprise subscription.
no-self-hosted-runner-public-repo error log

Self-hosted runners on pull_request events in public repos allow untrusted fork PRs to execute code on your infrastructure. Use GitHub-hosted runners for public repo CI, or require approval for fork PRs.

Rule source requires an active Pro or Enterprise subscription.
no-unpinned-action-version warning log

Referencing actions by branch name or floating tag allows supply chain attacks — the action can be updated to malicious code. Pin to a full commit SHA: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

Rule source requires an active Pro or Enterprise subscription.
no-write-all-permissions error log

write-all permissions grant the workflow GITHUB_TOKEN access to write to all repository resources. Apply least-privilege: declare only the specific permissions needed (e.g., contents: read).

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
eade0e67a43a01f7f760be46141de96906dd2c62a143c6f68d393715302d0e6d
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-github-actions/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-github-actions. The published version only bumps when a maintainer resyncs.

No commit history available.