# gitlab-ci-ai-supply-chain-v2

> gitlab-ci-ai-supply-chain-v2: 6 Keryn rules for javascript, typescript, python, generic (4 warning, 2 info).

Source: https://keryn.dev/rules/gitlab-ci-ai-supply-chain-v2/

6 rules · Keryn Software Licence · rules 0.8.0 · [all packs](https://keryn.dev/rules/)

**How to read a rule**

- **Severity**: How bad the finding is if it is real: `error` fails a default gate, `warning` and `info` do not.

- **Confidence**: **P0** exploitable as written; **P1** dangerous in context; **P2** a heuristic or a posture check: confirm by reading the code.

- **False-positive risk**: **low**: an exact API or flag, so hits are almost always real; **medium**: the pattern is legitimate in many programs, so check each hit; **high**: it finds a lead to confirm, so expect benign hits.

- **Edge**: The relationship the finding sits on. **reaches**: content or traffic gets to a thing; **calls**: one thing invokes another; **reads**: one thing reads from another; **writes**: one thing writes to another; **sends**: data leaves for another party; **grants**: authority is given or left unchecked; **depends_on**: something relies on a component it does not verify; **trusts**: one party believes another without evidence. The boundary it crosses, when there is one: **user->prompt** (untrusted input reaching a prompt); **model->code** (model output reaching code, a shell, a query or a page); **secret->outside** (a secret leaving the trusted side); **supply-chain** (code, models or prompts pulled in from outside).

- **Taxonomy chips**: References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

## seceng.gitlab.ai-job-secrets-to-llm-or-log

`warning` javascript, typescript, python gitlab-ci

GitLab CI token/secret appears near LLM prompt, messages, provider call, or logging.

Confidence **P2**: a heuristic or a posture check: confirm by reading the code. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [reads](https://keryn.dev/docs/edges/edge-kinds/#reads) one thing reads from another.

[CWE-532](https://keryn.dev/taxonomies/cwe/#cwe-532-insertion-of-sensitive-information-into-log-file) [CWE-798](https://keryn.dev/taxonomies/cwe/#cwe-798-use-of-hard-coded-credentials) [LLM02](https://keryn.dev/taxonomies/owasp-llm/#llm02-sensitive-information-disclosure) [LLM03](https://keryn.dev/taxonomies/owasp-llm/#llm03-supply-chain) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse) [ASI04](https://keryn.dev/taxonomies/owasp-agentic/#asi04-agentic-supply-chain-vulnerabilities)

## seceng.gitlab-ci-user-input-to-shell-or-ai

`warning` generic gitlab-ci

GitLab CI variable, trigger variable, or pipeline input appears to flow into shell or AI prompt without validation.

Confidence **P1**: dangerous in context. False-positive risk **high**: it finds a lead to confirm, so expect benign hits.

Edge inspected: [reaches](https://keryn.dev/docs/edges/edge-kinds/#reaches) content or traffic gets to a thing.

[CWE-20](https://keryn.dev/taxonomies/cwe/#cwe-20-improper-input-validation) [CWE-78](https://keryn.dev/taxonomies/cwe/#cwe-78-os-command-injection) [LLM01](https://keryn.dev/taxonomies/owasp-llm/#llm01-prompt-injection) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI01](https://keryn.dev/taxonomies/owasp-agentic/#asi01-agent-goal-hijack) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation)

## seceng.gitlab-ai-generated-commit-no-approval

`info` generic gitlab-ci

GitLab CI job appears to commit or push AI-generated changes without a visible manual approval gate.

Confidence **P1**: dangerous in context. False-positive risk **high**: it finds a lead to confirm, so expect benign hits.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-862](https://keryn.dev/taxonomies/cwe/#cwe-862-missing-authorization) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [LLM09](https://keryn.dev/taxonomies/owasp-llm/#llm09-misinformation) [ASI02](https://keryn.dev/taxonomies/owasp-agentic/#asi02-tool-misuse-and-exploitation) [ASI09](https://keryn.dev/taxonomies/owasp-agentic/#asi09-human-agent-trust-exploitation)

## seceng.gitlab-model-download-no-integrity

`info` generic gitlab-ci

GitLab CI downloads AI model, weights, checkpoint, or artifact without visible checksum/signature verification.

Confidence **P1**: dangerous in context. False-positive risk **high**: it finds a lead to confirm, so expect benign hits.

Edge inspected: [depends_on](https://keryn.dev/docs/edges/edge-kinds/#depends-on) something relies on a component it does not verify; it crosses the [`supply-chain`](https://keryn.dev/docs/edges/trust-boundaries/#supply-chain) boundary (code, models or prompts pulled in from outside).

[CWE-494](https://keryn.dev/taxonomies/cwe/#cwe-494-download-of-code-without-integrity-check) [LLM03](https://keryn.dev/taxonomies/owasp-llm/#llm03-supply-chain) [ASI04](https://keryn.dev/taxonomies/owasp-agentic/#asi04-agentic-supply-chain-vulnerabilities) [ASI06](https://keryn.dev/taxonomies/owasp-agentic/#asi06-memory-and-context-poisoning)

## seceng.gitlab-runner-docker-privileged-ai-job

`warning` generic gitlab-ci, containers

AI/agent GitLab CI job uses privileged Docker runner or docker socket. This increases blast radius for generated code or tools.

Confidence **P1**: dangerous in context. False-positive risk **high**: it finds a lead to confirm, so expect benign hits.

Edge inspected: [grants](https://keryn.dev/docs/edges/edge-kinds/#grants) authority is given or left unchecked.

[CWE-250](https://keryn.dev/taxonomies/cwe/#cwe-250-execution-with-unnecessary-privileges) [LLM06](https://keryn.dev/taxonomies/owasp-llm/#llm06-excessive-agency) [LLM03](https://keryn.dev/taxonomies/owasp-llm/#llm03-supply-chain) [ASI05](https://keryn.dev/taxonomies/owasp-agentic/#asi05-unexpected-code-execution) [ASI03](https://keryn.dev/taxonomies/owasp-agentic/#asi03-identity-and-privilege-abuse)

## seceng.gitlab-unpinned-ai-container-image

`warning` generic gitlab-ci, containers

GitLab CI AI/ML job uses container image without digest pinning.

Confidence **P1**: dangerous in context. False-positive risk **medium**: the pattern is legitimate in many programs, so check each hit.

Edge inspected: [depends_on](https://keryn.dev/docs/edges/edge-kinds/#depends-on) something relies on a component it does not verify; it crosses the [`supply-chain`](https://keryn.dev/docs/edges/trust-boundaries/#supply-chain) boundary (code, models or prompts pulled in from outside).

[CWE-829](https://keryn.dev/taxonomies/cwe/#cwe-829-inclusion-of-functionality-from-untrusted-control-sphere) [LLM03](https://keryn.dev/taxonomies/owasp-llm/#llm03-supply-chain) [ASI04](https://keryn.dev/taxonomies/owasp-agentic/#asi04-agentic-supply-chain-vulnerabilities) [ASI10](https://keryn.dev/taxonomies/owasp-agentic/#asi10-rogue-agents)
