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

Add veracode scan #2250

Merged
merged 17 commits into from
Sep 19, 2024
Merged
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
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 }}
Loading