Ansible

Ansible

Made by DeepSource

Git checkouts must contain explicit version ANS-E4001

Bug risk
Major

All version control checkouts must point to an explicit commit or tag, not just latest.

Relying on latest may lead to breakages in the application if the latest version is unstable or not meant for use with the current system.

Bad practice

- git:
    repo: 'https://foosball.example.org/path/to/repo.git'
    dest: /srv/checkout
    version: latest

Recommended

- git:
    repo: 'https://foosball.example.org/path/to/repo.git'
    dest: /srv/checkout
    version: release-0.22