diff --git a/cicd-examples/bitbucket/bitbucket-create-remote-app-blocking-mode.yaml b/cicd-examples/bitbucket/bitbucket-create-remote-app-blocking-mode.yaml index ce47204..65c8e41 100644 --- a/cicd-examples/bitbucket/bitbucket-create-remote-app-blocking-mode.yaml +++ b/cicd-examples/bitbucket/bitbucket-create-remote-app-blocking-mode.yaml @@ -64,7 +64,7 @@ pipelines: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY -o JSON | jq -r '.status') if [ "$SCAN_STATUS" == "started" ] || [ "$SCAN_STATUS" == "queued" ]; then echo "Scan is running or queued!" else @@ -75,7 +75,7 @@ pipelines: done # Optional logic - abort the pipeline if there are any HIGH risk vulnerabilities. - - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].highs') + - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.highs') - echo "HIGH risk vulnerabilities ${HIGH_VULNS}" - | if [[ "$HIGH_VULNS" -gt 0 ]]; then diff --git a/cicd-examples/bitbucket/bitbucket-ephemeral-app-blocking-mode.yaml b/cicd-examples/bitbucket/bitbucket-ephemeral-app-blocking-mode.yaml index 6aef55e..1adb429 100644 --- a/cicd-examples/bitbucket/bitbucket-ephemeral-app-blocking-mode.yaml +++ b/cicd-examples/bitbucket/bitbucket-ephemeral-app-blocking-mode.yaml @@ -80,7 +80,7 @@ pipelines: SCAN_OUTPUT=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.status') if [[ "$SCAN_STATUS" == "started" ]] || [[ "$SCAN_STATUS" == "queued" ]]; then echo "Scan is running or queued!"; else @@ -91,7 +91,7 @@ pipelines: done # Optional logic - abort the pipeline if there are any HIGH risk vulnerabilities. - - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].highs') + - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.highs') - echo "HIGH vulnerabilities ${HIGH_VULNS}" - | if [[ "$HIGH_VULNS" -gt 0 ]]; then diff --git a/cicd-examples/bitbucket/bitbucket-remote-app-blocking-mode.yaml b/cicd-examples/bitbucket/bitbucket-remote-app-blocking-mode.yaml index 4a44417..0e37379 100644 --- a/cicd-examples/bitbucket/bitbucket-remote-app-blocking-mode.yaml +++ b/cicd-examples/bitbucket/bitbucket-remote-app-blocking-mode.yaml @@ -40,7 +40,7 @@ pipelines: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key $PROBELY_API_KEY -o JSON | jq -r '.status') if [ "$SCAN_STATUS" == "started" ] || [ "$SCAN_STATUS" == "queued" ]; then echo "Scan is running or queued!" else @@ -51,7 +51,7 @@ pipelines: done # Optional logic - abort the pipeline if there are any HIGH risk vulnerabilities. - - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.[0].highs') + - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key $PROBELY_API_KEY -o JSON | jq -r '.highs') - echo "HIGH risk vulnerabilities ${HIGH_VULNS}" - | if [[ "$HIGH_VULNS" -gt 0 ]]; then diff --git a/cicd-examples/github/github-ephemeral-app-blocking-mode.yaml b/cicd-examples/github/github-ephemeral-app-blocking-mode.yaml index b7a4c40..0278e70 100644 --- a/cicd-examples/github/github-ephemeral-app-blocking-mode.yaml +++ b/cicd-examples/github/github-ephemeral-app-blocking-mode.yaml @@ -154,7 +154,7 @@ jobs: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.status') if [ $SCAN_STATUS == "started" ] || [ $SCAN_STATUS == "queued" ]; then echo "Scan is running or queued!"; else @@ -167,7 +167,7 @@ jobs: # Step 13: check high vulnerabities - name: Check for high vulnerabilities run: | - HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.[0].highs') + HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.highs') echo "HIGH vulnerabilities: ${HIGH_VULNS}" if [ $HIGH_VULNS -gt 0 ]; then echo "Scan has High vulnerabilities... aborting" diff --git a/cicd-examples/github/github-remote-app-blocking-mode.yaml b/cicd-examples/github/github-remote-app-blocking-mode.yaml index 6ebe66c..54bd8cc 100644 --- a/cicd-examples/github/github-remote-app-blocking-mode.yaml +++ b/cicd-examples/github/github-remote-app-blocking-mode.yaml @@ -53,7 +53,7 @@ jobs: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.status') if [ $SCAN_STATUS == "started" ] || [ $SCAN_STATUS == "queued" ]; then echo "Scan is running or queued!"; else @@ -67,7 +67,7 @@ jobs: - name: Check for High risk vulnerabilities run: | # Wait until scan ends - HIGH_VULNS=$(probely scans get $SCAN_ID --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.[0].highs') + HIGH_VULNS=$(probely scans get $SCAN_ID --api-key ${{ secrets.PROBELY_API_KEY }} -o JSON | jq -r '.highs') echo "HIGH risk vulnerabilities ${HIGH_VULNS}" if [[ "$HIGH_VULNS" -gt 0 ]]; then echo "Scan has High risk vulnerabilities... aborting" diff --git a/cicd-examples/gitlab/gitlab-ephemeral-app-blocking-mode.yaml b/cicd-examples/gitlab/gitlab-ephemeral-app-blocking-mode.yaml index ef0d27a..c28608f 100644 --- a/cicd-examples/gitlab/gitlab-ephemeral-app-blocking-mode.yaml +++ b/cicd-examples/gitlab/gitlab-ephemeral-app-blocking-mode.yaml @@ -82,7 +82,7 @@ build-and-test: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.status') if [[ "$SCAN_STATUS" == "started" ]] || [[ "$SCAN_STATUS" == "queued" ]]; then echo "Scan is running or queued!"; else @@ -93,7 +93,7 @@ build-and-test: done # Check for high vulnerabilities - - HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.[0].highs') + - HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.highs') - echo "HIGH vulnerabilities ${HIGH_VULNS}" - | if [[ "$HIGH_VULNS" -gt 0 ]]; then diff --git a/cicd-examples/gitlab/gitlab-remote-app-blocking-mode.yaml b/cicd-examples/gitlab/gitlab-remote-app-blocking-mode.yaml index d1de260..df6724b 100644 --- a/cicd-examples/gitlab/gitlab-remote-app-blocking-mode.yaml +++ b/cicd-examples/gitlab/gitlab-remote-app-blocking-mode.yaml @@ -33,7 +33,7 @@ scan: SCAN_OUTPUT=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} | tail -1) echo ${SCAN_OUTPUT} echo "-----------------------------------" - SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.[0].status') + SCAN_STATUS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.status') if [[ "$SCAN_STATUS" == "started" ]] || [[ "$SCAN_STATUS" == "queued" ]]; then echo "Scan is running or queued!"; else @@ -43,7 +43,7 @@ scan: sleep 30; done - - HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.[0].highs') + - HIGH_VULNS=$(probely scans get ${SCAN_ID} --api-key ${PROBELY_API_KEY} -o JSON | jq -r '.highs') - echo "HIGH risk vulnerabilities ${HIGH_VULNS}" - | if [[ "$HIGH_VULNS" -gt 0 ]]; then