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

CIS 1.3.1.4 missing variable in v2.0.0 branch #268

Open
kbknapp opened this issue Jan 2, 2025 · 1 comment
Open

CIS 1.3.1.4 missing variable in v2.0.0 branch #268

kbknapp opened this issue Jan 2, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kbknapp
Copy link

kbknapp commented Jan 2, 2025

Describe the Issue

Failed to run due to an undefined variable (control_1_3_1_4_was_run)

Expected Behavior

No error for an undefined variable.

Actual Behavior

Running server-level-1 gives the following:

fatal: [localhost]: FAILED! => {"msg": "The conditional check 'not control_1_3_1_4_was_run' failed. The error was: error while evaluating conditional (not control_1_3_1_4_was_run): 'control_1_3_1_4_was_run' is undefined\n\nThe error appears to be in '/tmp/UBUNTU22-CIS/tasks/section_1/cis_1.3.1.x.yml': line 137, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: \"1.3.1.3 | AUDIT | Ensure all AppArmor Profiles are in enforce or complain | Set ubtu22cis_apparmor_enforce_only true for GOSS\"\n      ^ here\n"}
    metal-stage1-cmp.incus.metal-stage0:
    metal-stage1-cmp.incus.metal-stage0: PLAY RECAP *********************************************************************
    metal-stage1-cmp.incus.metal-stage0: localhost                  : ok=66   changed=20   unreachable=0    failed=1    skipped=65   rescued=0    ignored=0

Control(s) Affected

1.3.1.4

Environment (please complete the following information):

  • branch being used: benchmark_v2.0.0

Possible Solution

In prelim.yml:

 name: PRELIM | AUDIT | Set default values for facts
 ansible.builtin.set_fact:
+   control_1_3_1_4_was_run: false
   control_1_6_1_4_was_run: false
   ubtu22cis_apparmor_enforce_only: false
 changed_when: false
@kbknapp kbknapp added the bug Something isn't working label Jan 2, 2025
@uk-bolly uk-bolly mentioned this issue Jan 6, 2025
@uk-bolly uk-bolly self-assigned this Jan 6, 2025
@uk-bolly
Copy link
Member

uk-bolly commented Jan 7, 2025

Hi @kbknapp

Thank you so much for your feedback on this other branch this has really assisted. The branch has now been merged with devel and all being well we will get released to main in around two weeks.

Kindest regards

uk-bolly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants