Skip to content

Commit

Permalink
remove default regex value
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv-singhal-github committed Apr 17, 2023
1 parent 22e3f95 commit c09d831
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ runs:
then
echo "${optionsArr[$iterator]}" is Null
else
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" "${option}
if [ "${optionsArr[$iterator]}" = "--include-url-regex" ] || [ "${optionsArr[$iterator]}" = "--exclude-url-regex" ]
then
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" \"${option}\""
else
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" "${option}
fi
fi
iterator=$(($iterator+1))
done
Expand Down Expand Up @@ -232,13 +237,18 @@ runs:
#Iterating the options available from options array and filling them with the arguments received in order
iterator=0
for option in '${{ inputs.scan_name }}' '${{ inputs.traffic_env }}' '${{ inputs.client_scan_token }}' '${{ inputs.plugins }}' '"${{ inputs.include_url_regex }}"' '"${{ inputs.exclude_url_regex }}"' '${{ inputs.target_url }}' '${{ inputs.traceable_server }}' '${{ inputs.scan_timeout }}' '${{ inputs.reference_env }}' '${{ inputs.openapi_spec_ids }}' '${{ inputs.openapi_spec_files }}' '${{ inputs.policy }}' '${{ inputs.include_endpoint_labels}}' '${{ inputs.exclude_endpoint_labels }}' '${{ inputs.include_endpoint_with_owner_attributes }}' '${{ inputs.include_endpoint_owners }}' '${{ inputs.log_level }}'
for option in '${{ inputs.scan_name }}' '${{ inputs.traffic_env }}' '${{ inputs.client_scan_token }}' '${{ inputs.plugins }}' '${{ inputs.include_url_regex }}' '${{ inputs.exclude_url_regex }}' '${{ inputs.target_url }}' '${{ inputs.traceable_server }}' '${{ inputs.scan_timeout }}' '${{ inputs.reference_env }}' '${{ inputs.openapi_spec_ids }}' '${{ inputs.openapi_spec_files }}' '${{ inputs.policy }}' '${{ inputs.include_endpoint_labels}}' '${{ inputs.exclude_endpoint_labels }}' '${{ inputs.include_endpoint_with_owner_attributes }}' '${{ inputs.include_endpoint_owners }}' '${{ inputs.log_level }}'
do
if [ -z "$option" ] || [ "$option" = "''" ] || [ "$option" = "NULL" ]
then
echo "${optionsArr[$iterator]}" is Null
else
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" "${option}
if [ "${optionsArr[$iterator]}" = "--include-url-regex" ] || [ "${optionsArr[$iterator]}" = "--exclude-url-regex" ]
then
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" \"${option}\""
else
scanInitCmd=$scanInitCmd" "${optionsArr[$iterator]}" "${option}
fi
fi
iterator=$(($iterator+1))
done
Expand Down

0 comments on commit c09d831

Please sign in to comment.