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] Error while running openscap from saltmaster to windows minion #65193

Closed
code-fire opened this issue Sep 14, 2023 · 1 comment · Fixed by #65596
Closed

[BUG] Error while running openscap from saltmaster to windows minion #65193

code-fire opened this issue Sep 14, 2023 · 1 comment · Fixed by #65596
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@code-fire
Copy link

code-fire commented Sep 14, 2023

Description
Error while running openscap from saltmaster to windows minion

Setup

Used the saltmaster vagrant box from the get started guide for the salt master.
Used my local Windows 11 as salt windows minion.
Salt-Minion-3006.3-Py3-AMD64-Setup.exe and OpenSCAP-1.3.4-win32.msi have been installed on the local windows machine.
Windows windows minion correctly registered on salt master (and this test command salt 'winminion' cmd.run 'dir c:\' is running successfully).

Steps to Reproduce the behavior
execute this command on salt master:

salt 'winminion'  openscap.xccdf "eval --profile MAC-3_Sensitive 'c:\temp\U_MS_Windows_10_STIG_V2R7_Manual-xccdf.xml'"

fails with following error:

File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\openscap.py", line 100, in xccdf
        success = _OSCAP_EXIT_CODES_MAP[proc.returncode]
    KeyError: 255
ERROR: Minions returned with non-zero exit code

Expected behavior
should print out on master the passed rules.
should create an openscap report.

Additional context
I have added some output debug in openscap.py file, and it confirmed the passed arguments are ok.
Here is the command printed out:

oscap xccdf eval --oval-results --results results.xml --report report.html --profile MAC-3_Sensitive c:\temp\U_MS_Windows_10_STIG_V2R7_Manual-xccdf.xml
@code-fire code-fire added Bug broken, incorrect, or confusing behavior needs-triage labels Sep 14, 2023
@welcome
Copy link

welcome bot commented Sep 14, 2023

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@anilsil anilsil changed the title openscap[BUG] [BUG]Error while running openscap from saltmaster to windows minion Sep 14, 2023
@anilsil anilsil added this to the Sulfur v3006.4 milestone Sep 14, 2023
@twangboy twangboy changed the title [BUG]Error while running openscap from saltmaster to windows minion [BUG] Error while running openscap from saltmaster to windows minion Nov 20, 2023
@twangboy twangboy linked a pull request Nov 20, 2023 that will close this issue
3 tasks
@twangboy twangboy closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants