Skip to content

Commit

Permalink
Adding oscap-ssh fix_2107
Browse files Browse the repository at this point in the history
  • Loading branch information
avalanchein committed May 29, 2024
1 parent 74043f7 commit 6eb4217
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/oscap-ssh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ TARGET_RESULTS_ARF=""
TARGET_REPORT=""
TARGET_SYSCHAR=""
OVAL_RESULTS=""
STIG_RESULTS=""

# We have to rewrite various paths to a remote temp dir
for i in $(seq 0 `expr $# - 1`); do
Expand All @@ -222,6 +223,10 @@ for i in $(seq 0 `expr $# - 1`); do
LOCAL_TAILORING_PATH=${oscap_args[j]}
oscap_args[j]="$REMOTE_TEMP_DIR/tailoring.xml"
;;
("--stig-viewer")
STIG_RESULTS=${oscap_args[j]}
oscap_args[j]="$REMOTE_TEMP_DIR/stig_results.xml"
;;
("--local-files")
LOCAL_LOCAL_FILES_PATH=${oscap_args[j]}
oscap_args[j]="$REMOTE_TEMP_DIR/local_files"
Expand Down Expand Up @@ -317,6 +322,9 @@ echo "Copying back requested files..."
if [ "$TARGET_RESULTS" != "" ]; then
scp_retreive_from_temp_dir results.xml "$TARGET_RESULTS" || die "Failed to copy the results file back to local machine!"
fi
if [ "$STIG_RESULTS" != "" ]; then
scp_retreive_from_temp_dir stig_results.xml "$STIG_RESULTS" || die "Failed to copy the STIG results file back to local machine!"
fi
if [ "$TARGET_RESULTS_ARF" != "" ]; then
scp_retreive_from_temp_dir results-arf.xml "$TARGET_RESULTS_ARF" || die "Failed to copy the ARF file back to local machine!"
fi
Expand Down

0 comments on commit 6eb4217

Please sign in to comment.