akondrahman / IaCTesting

Placeholder for the research study related to IaC testing anti-patterns
3 stars 256 forks source link

Mishandled privilege escalation #3

Closed Talismanic closed 4 years ago

Talismanic commented 4 years ago

On categ_ansible_test_code.txt file there are some sudo usage which is candidate of "Mishandled privilege escalation". However, I have not considered this part as anti-pattern.

shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"

Reason because:

akondrahman commented 4 years ago

I understand. Can we know the Ansible version automatically?

Talismanic commented 4 years ago
  1. Ansible version can be determined from ansible playbook through some command or OS.
  2. Till now I cound not find any way to determine ansible version from the code base
akondrahman commented 4 years ago

OK. In that case we cannot consider wrong version as an anti-pattern. How many anti-patterns have we found so far Ansible?

Talismanic commented 4 years ago

So far I have found :

  1. Assertion Roulette
  2. External Dependency
  3. Privilege Escalation
  4. Local Testing
akondrahman commented 4 years ago

My gut feeling is there might be 1/2 more ... may be sth. related to Python testing as we will not skip Python altogether?

Talismanic commented 4 years ago

I am closing this issue and taking the category to #1