Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(scan): ansible false positive (in mysql_user at update_password) #6936

Closed
timo-fc opened this issue Mar 7, 2024 · 0 comments · Fixed by #6938
Closed

bug(scan): ansible false positive (in mysql_user at update_password) #6936

timo-fc opened this issue Mar 7, 2024 · 0 comments · Fixed by #6938
Labels
ansible Ansible query bug Something isn't working community Community contribution docker Docker query query New query feature

Comments

@timo-fc
Copy link

timo-fc commented Mar 7, 2024

During a scan of Ansible playbooks there is a false positive detection for a password.

Expected Behavior

Configuration parameter are not interpreted as password.

Actual Behavior

Checking a playbook containing the mysql_user module where the update_password parameter is set, results in a false positive.

https://docs.ansible.com/ansible/latest/collections/community/mysql/mysql_user_module.html

Passwords And Secrets - Generic Password, Severity: HIGH, Results: 1
Description: Query to find passwords and secrets in infrastructure code.
Platform: Common
Learn more about this vulnerability: https://docs.kics.io/latest/queries/common-queries/common/487f4be7-3fd9-4506-a07a-eae252180c08

        [1]: ../../path/tasks/main.yml:9

                008:     password_expire: "never"
                009:     update_password: <SECRET-MASKED-ON-PURPOSE>
                010: 

Steps to Reproduce the Problem

Scan playbook containing the following:

- name: "Configure the MySQL user "
  community.mysql.mysql_user:
    login_user: "root"
    login_password: "{{ mysql_root_password }}"
    name: "{{ mysql_user }}"
    password: "{{ mysql_user_password }}"
    password_expire: "never"
    update_password: "on_create"

Specifications

  • Version: v1.7.13 (docker)
  • Platform: Linux
  • Subsystem: Ansible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible query bug Something isn't working community Community contribution docker Docker query query New query feature
Projects
None yet
1 participant