Skip to content

HTTPS url not used with Ansible get_url module

Description

This policy detects whether HTTPS URLs are used in the Ansible get_url module to ensure secure data transmission. Using HTTPS encrypts the data transmitted, providing confidentiality and integrity. It verifies that the tasks interact with URLs over a secure channel.

Code Example

yaml
- name: Example
  ansible.builtin.get_url:
    url: "https://example.com/file.tar.gz"
    dest: "/tmp/file.tar.gz"

Remediation

Ansible

  • Module: get_url
  • Attribute: url

To align with this policy, make sure that all tasks using the `get_url` module specify URLs that start with "https://". This practice ensures that the data is transferred over an encrypted connection.

Secure Code Example:

Rule Details

FieldValue
IDIAC-0049
SeverityMEDIUM
IaC TypeAnsible
FrameworksAnsible
Checkov IDCKV2_ANSIBLE_2

References