Skip to content
BETAGuardrails are in beta. The library, the configuration format and the CLI command can still change.

Guardrails

ruby

4 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
ruby/lockfile-committedwarningThe project commits Gemfile.lock, so an install of the same commit resolves the same gem versions.
ruby/no-git-dependencieswarningNo gem the manifests declare is fetched from a git repository rather than from a gem source. The Gemfile is Ruby rather than a declaration and is read by pattern, so a git gem that is found is a real finding, but finding none is not proof that there is none: a gem added inside a condition, a loop or an eval is not seen.
ruby/single-gem-sourceerrorThe Gemfile resolves gems from at most one source, and that source is one the repository trusts. The Gemfile is Ruby rather than a declaration and is read by pattern, so a second source that is found is a real finding, but finding one source is not proof that there is only one: a source named inside a condition, a loop or an eval is not seen.
ruby/version-declaredwarningThe project declares the Ruby version it is built and run against, and that version is no older than the configured floor.

Shared inputs

Every ruby guardrail declares these inputs, and each one may add its own.

InputDescriptionDefault
projectDirDirectory holding the project, relative to the directory the CLI runs in..

Shared collectors

Every ruby guardrail is handed the facts these collectors gather, and each one may ask for more of its own.

CollectorGathers
rubyThe Bundler project in the project directory: the Ruby version it asks for, the gem sources it resolves from, the gems each manifest declares with their groups and origins, and the lock file beside them. The Gemfile is Ruby rather than a declaration, so what it declares conditionally is not seen and scanned says so.

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.

Buildnote Limited
Registered in England and Wales, Reg: 16140412