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

Cant manually run audit via goss #3

Open
Luiggi33 opened this issue Oct 18, 2024 · 3 comments
Open

Cant manually run audit via goss #3

Luiggi33 opened this issue Oct 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Luiggi33
Copy link

Describe the Issue
When trying to execute the audit manually, it runs into an error and stops. Trying it via the sh file produces other, also flawed results.

Expected Behavior
It should run the audit accordingly.

Actual Behavior
After running the goss command from the README, I receive the error Error: template: test:86:33: executing "test" at <.Vars.machine_uuid>: map has no entry for key "machine_uuid"

Environment (please complete the following information):

  • branch being used: main
  • Ansible Version: N/A
  • Host Python Version: N/A
  • Ansible Server Python Version: N/A
  • Additional Details:
@Luiggi33 Luiggi33 added the bug Something isn't working label Oct 18, 2024
@uk-bolly
Copy link
Member

hi @Luiggi33

Thank you for raising this issue. Can you please let us know how you are running this manually?
Are you running via the run_audit script (which contains this data) or running goss directly against the goss file?

Many thanks

uk-bolly

@uk-bolly uk-bolly self-assigned this Oct 22, 2024
@Luiggi33
Copy link
Author

Hey @uk-bolly,
I can run it via the run_audit script, but trying to run it manually as described in the readme does not work.
Thanks in advance

@nman-hmcts
Copy link

Same issue.

root@linux02:/home/azureuser# goss --vars /home/azureuser/UBUNTU24-CIS-Audit/vars/CIS.yml -g /home/azureuser/UBUNTU24-CIS-Audit/goss.yml validate
Error: template: test:86:33: executing "test" at <.Vars.machine_uuid>: map has no entry for key "machine_uuid"

But running via script works. However I am not sure about the accuracy of the results.

Why is the count showing 702 when there are only about 380 odd policies in total on the CIS recommendations.

root@linux02:/opt# ./UBUNTU24-CIS-Audit/run_audit.sh

## Pre-Checks Start

OK - Audit binary /usr/local/bin/goss is available
OK - Goss is installed and version is ok (0.4.9 >= 0.4.4)
OK - /opt/UBUNTU24-CIS-Audit/goss.yml is available

## Pre-checks Successful

#############
Audit Started
#############


    "summary": {
        "failed-count": 107,
        "skipped-count": 22,
        "summary-line": "Count: 702, Failed: 107, Skipped: 22, Duration: 14.013s",
        "test-count": 702,
Completed file can be found at /opt/audit_linux02-CIS-UBUNTU24_1729610744.json

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

3 participants