Skip to content

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

Closed
@code-fire

Description

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

Metadata

Assignees

Labels

Bugbroken, incorrect, or confusing behavior

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions