mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
25 lines
670 B
Bash
25 lines
670 B
Bash
#!/usr/bin/env bash
|
|
echo "=========================== Excluding Files from Veracode SAST ==========================="
|
|
set -ex
|
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
|
|
|
# Copy war file to temporary directory
|
|
cp -f "$1" "$2"
|
|
|
|
# Remove files to be excluded from Veracode SAST
|
|
exclusions="./scripts/ci/SAST-exclusion-list.txt"
|
|
if [ -e $exclusions ]
|
|
then
|
|
while read -r line
|
|
do
|
|
echo "Removing WEB-INF/lib/$line"
|
|
zip -d "$2" "WEB-INF/lib/$line" || true
|
|
done < "$exclusions"
|
|
else
|
|
echo "No files to be excluded from SAST"
|
|
fi
|
|
|
|
popd
|
|
set +ex
|
|
echo "=========================== Finishing Excluding Files from Veracode SAST =========================="
|