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

first commit #24

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Init and run scan action
uses: Traceableai/ast-action@main
uses: Traceableai/ast-action@e2e-test
with:
step_name: 'init and run'
client_scan_token: ${{ secrets.CLIENT_SCAN_TOKEN_DEMO }}
cli_version: 'latest'
traffic_env: 'crapi-demo1'
include_url_regex: '13.58.254.175'
include_url_regex: .*
traceable_server: ${{ secrets.TRACEABLE_SERVER_DEMO }}
- name: Stop Scan
if: always()
Expand Down
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