Skip to content

Commit

Permalink
Add sca scan
Browse files Browse the repository at this point in the history
  • Loading branch information
FeiChen-okta committed Jan 17, 2025
1 parent 5d3003d commit b72f6d5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .bacon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ test_suites:
}
criteria : MERGE
queue_name : small

- name: sca-scan
script_path: /root/okta/okta-devices-kotlin/scripts/
sort_order: '1'
timeout: '200'
script_name: dependency_scan
criteria: MERGE
queue_name: small
27 changes: 27 additions & 0 deletions scripts/dependency_scan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

start_scan=false
if echo "${BRANCH}" | grep -Eq "(^master$|^([0-9]+\.[0-9]*[13579])$)"; then
start_scan=true
elif echo "${BRANCH}" | grep -Eq "(^release$|^preview$|^([0-9]+\.[0-9]+)-(pf|lc|pb|tf)[0-9]+$)"; then
start_scan=true
else
start_scan=true
fi

if [[ "$start_scan" = false ]]; then
echo 'Not a release or master. dependency-scan skipped'
exit 0
fi

#####
## Build Environment Setup
#####
java17_0

#####
## Execute Dependency Scanning
#####
REPO_DIR=$(git rev-parse --git-dir | sed 's/.git//g')

dependency_scan --configuration-matching=implementation

0 comments on commit b72f6d5

Please sign in to comment.