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

Why can't these fail? #30

Open
smiller171 opened this issue Apr 24, 2019 · 2 comments
Open

Why can't these fail? #30

smiller171 opened this issue Apr 24, 2019 · 2 comments

Comments

@smiller171
Copy link
Contributor

I can't find any tasks checking the registered vars, and yet these tasks are set to never fail. As far as I can tell these are scored rules that are being allowed to pass unchecked.

- name: "SCORED | 1.1.5 | PATCH | Ensure separate partition exists for /var"
shell: mount | grep "on /var "
register: var_mounted
changed_when: false
failed_when: false
when:
- ubuntu1604cis_rule_1_1_5
tags:
- level2
- scored
- patch
- rule_1.1.5
- skip_ansible_lint
- name: "SCORED | 1.1.6 | PATCH | Ensure separate partition exists for /var/tmp"
shell: mount | grep "on /var/tmp "
register: var_tmp_mounted
changed_when: false
failed_when: false
when:
- ubuntu1604cis_rule_1_1_6
tags:
- level2
- scored
- patch
- rule_1.1.6
- skip_ansible_lint

- name: "SCORED | 1.1.10 | PATCH | Ensure separate partition exists for /var/log"
shell: mount | grep "on /var/log "
register: var_log_mounted
changed_when: false
failed_when: false
when:
- ubuntu1604cis_rule_1_1_10
tags:
- level2
- scored
- patch
- rule_1.1.10
- skip_ansible_lint
- name: "SCORED | 1.1.11 | PATCH | Ensure separate partition exists for /var/log/audit"
shell: mount | grep "on /var/log/audit "
register: var_log_audit_mounted
changed_when: false
failed_when: false
when:
- ubuntu1604cis_rule_1_1_11
tags:
- level2
- scored
- patch
- rule_1.1.11
- skip_ansible_lint
- name: "SCORED | 1.1.12 | PATCH | Ensure separate partition exists for /home"
shell: mount | grep "on /home "
register: home_mounted
changed_when: false
failed_when: false
when:
- ubuntu1604cis_rule_1_1_12
tags:
- level2
- scored
- patch
- rule_1.1.12
- skip_ansible_lint

@florianutz
Copy link
Owner

I know about that issue. But at the moment I have no idea for a feasible solution. Furthermore that option doesn't make sense for cloud systems. There is just one partition by default.
From my point of view, this must be configured when installing the system and should not be done afterwards by a hardening script.
There are two options to improve that:

  • The role generate a local log with the status of the recommended partitions
  • The role fails when there are no mount points (and we disable this checks by default)

@smiller171
Copy link
Contributor Author

@florianutz I think the right thing to do here is to fail if the check isn't skipped, but to skip it by default. IMO by setting failed_when to false you're just wasting CPU cycles by checking at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants