Skip to content

Commit

Permalink
ACS-9044 fix for temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraAspery committed Dec 19, 2024
1 parent cef68a2 commit 547f014
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ jobs:
bash ./scripts/ci/build.sh
- name: "Remove excluded files"
run: |
bash mkdir temp-dir-for-sast
bash ./scripts/ci/remove-sast-exclusions.sh ./distribution/target/alfresco-reduced.war ./temp-dir-for-sast/reduced.war
mkdir temp-dir-for-sast
bash ./scripts/ci/remove-sast-exclusions.sh ./distribution/target/alfresco-reduced.war temp-dir-for-sast/reduced.war
- name: "Run SAST Scan"
uses: veracode/[email protected]
with:
Expand All @@ -111,7 +111,7 @@ jobs:
name: Veracode Pipeline-Scan Results - ACS (Human Readable)
path: readable_output.zip
- name: "Remove temporary directory"
run: bash rm -rfv temp-dir-for-sast
run: rm -rfv temp-dir-for-sast
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/remove-sast-exclusions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"

# Copy war file to temporary directory
cp -f "$1" ./temp-dir-for-sast/reduced.war
cp -f "$1" "$2"

# Remove files to be excluded from Veracode SAST
exclusions="./scripts/ci/SAST-exclusion-list.txt"
Expand All @@ -13,7 +13,7 @@ then
while read -r line
do
echo "Removing WEB-INF/lib/$line"
zip -d ./temp-dir-for-sast/reduced.war "WEB-INF/lib/$line" || true
zip -d "$2" "WEB-INF/lib/$line" || true
done < "$exclusions"
else
echo "No files to be excluded from SAST"
Expand Down

0 comments on commit 547f014

Please sign in to comment.