openscap oscap-ssh --local-files option problem, no such file or directory

265 Views Asked by At

Description of Problem:

I'm trying to scan a remote machine using my own script that I made using OpenSCAP Script Engine. From the different options that offers me oscap-ssh I am using the "--local-files" one that allows me to upload a directory to the remote host so I can transfer the bash check scripts. When I execute the complete command I can establish conection with the remote machine and the files from the local directory are copied to a temporal remote working directory but then, when the main script has to use the local file, an error tells me that there no such file or directory.

OpenSCAP Version:

oscap 1.3.6

Operating System & Version:

Rocky Linux 8.6

Command executed:

oscap-ssh <user>@<ip> 22 xccdf eval --profile <profile> --report report.html --local-files </path/to/directory/> <my_script>.xml

Actual Results:

enter image description here

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Finally I had the answer... no references founded in official documentation or anywhere on the Internet.

When you use the option --local-files the files in the directory you specify are not located in the /tmp/tmp.XXXXXXX/ directory, they are in /tmp/tmp.XXXXXX/local_files/ and these information does not appear anywhere.