gitlab
7 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
gitlab/codeowners-catch-all | warning | A section whose approval is required declares a rule matching every path, so a file nobody thought about still has an owner who has to approve it. |
gitlab/codeowners-no-unowned-rules | error | No rule in CODEOWNERS ends up with an empty set of owners, counting the default owners its section header hands down, so no section claims a path it names nobody for. |
gitlab/codeowners-owners-per-rule | warning | Every rule in CODEOWNERS ends up with at least the minimum owners and no more than the maximum, counting the default owners its section header hands down, so review is neither one person's bus factor nor everybody's problem. |
gitlab/codeowners-parses | error | Every line of CODEOWNERS that is not a comment reads either as a section header or as a rule, so no ownership is silently lost to a line GitLab ignores. |
gitlab/codeowners-present | warning | The project carries a CODEOWNERS file in one of the three places GitLab reads one from, and at least one section of it declares a rule, so every change has somebody to review it. |
gitlab/codeowners-team-owned | warning | Every rule in CODEOWNERS ends up owned by at least one GitLab group, so ownership survives the people currently in it. |
gitlab/job-timeout-set | info | Every job declares how long it may run, so a hung job is cut off rather than holding a runner until the project's own limit. |
Shared inputs
Every gitlab guardrail declares these inputs, and each one may add its own.
| Input | Description | Default |
|---|---|---|
pipelines | Comma separated globs naming the GitLab CI files to read. | .gitlab-ci.yml,.gitlab-ci.yaml |
Shared collectors
Every gitlab guardrail is handed the facts these collectors gather, and each one may ask for more of its own.
| Collector | Gathers |
|---|---|
gitlab | What GitLab itself reads out of the repository: the .gitlab-ci.yml, read as GitLab writes it, and the CODEOWNERS file, read as sections of rules. For the pipeline, the stages it declares, what it includes, and for every job the stage it sits in, the image and runner tags it asks for, how long it may run, the rules that decide whether it runs at all, and each script section with the variables it interpolates. For CODEOWNERS, every section with whether it is optional and how many approvals it needs, the rules under each, and the owners that apply to the paths a guardrail asks about, resolved per section the way GitLab resolves them. Names and shapes only, never a secret, a variable value or an environment value. |
Every guardrail in this category is configured the same way, in the guardrails.checks array of buildnote.json. See Configuring guardrails for every option, and Guardrails to search the whole library.