repo/lockfile-committed/ruby
Dependency lockfile is committed
Implements repo/lockfile-committed for ruby.
| Severity | error |
| Tiers | 1, 2 |
| Stacks | ruby |
| Scope | each |
| Kind | expr |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
Gemfile.lock is tracked when there is a Gemfile.
Why
Builds are reproducible only when dependency versions are pinned in git.
Check
"Gemfile.lock" in tracked() || !file("Gemfile")Fix
Run bundle lock and commit Gemfile.lock.
Agent instruction: Run the package manager to produce the lockfile, remove any .gitignore entry for it, and commit it.
A finding of this rule points at Gemfile.lock.
Sources
- https://github.com/ossf/package-manager-best-practices/blob/main/published/npm.md (guidance)
- https://fleetlint.org/baseline/#dependencies (convention)
- https://guides.rubygems.org/dependency_management/ (spec)
- https://fleetlint.org/stacks/#ruby
Generated by fleetlint docs from catalog v0.5.0.