Skip to content

Commit

Permalink
Add veracode scan (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-polinsky authored Sep 19, 2024
1 parent ba9bc9a commit 4e8be34
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
# These owners will be the default owners for everything in
# the repo, unless a later match takes precedence.
* @iTwin/itwinui
/scripts/zip-for-veracode.mjs @ben-polinsky
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,50 @@ jobs:
name: e2e-report
path: testing/e2e/playwright-report/
retention-days: 30

veracode:
name: Zip and Upload files to Veracode
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v4

- name: Zip files for veracode
shell: bash
run: |
sourceDirs=("apps" "packages")
outputFile="itwui-veracode.zip"
excludedPaths=(
".git/*"
"**/backstop/*"
"**/cypress*/*"
)
zipCommand="zip -r $outputFile"
for dir in "${sourceDirs[@]}"; do
zipCommand+=" $dir"
done
for path in "${excludedPaths[@]}"; do
zipCommand+=" -x \"$path\""
done
eval $zipCommand
if [[ $? -eq 0 ]]; then
echo "Zip file created successfully"
else
echo "An error occurred while creating the zip file"
exit 1
fi
- name: Upload & scan
uses: veracode/[email protected]
with:
appname: 'iTwinUI - UX (ITWUI - 3418)'
filepath: 'itwui-veracode.zip'
vid: ${{ secrets.VERACODE_ID }}
vkey: ${{ secrets.VERACODE_SECRET_KEY }}

0 comments on commit 4e8be34

Please sign in to comment.