mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-09-16 18:12:54 +00:00
ACS-12005 Remove Veracode integration (#1285)
This commit is contained in:
@@ -56,91 +56,6 @@ jobs:
|
||||
) ||
|
||||
contains(github.event.head_commit.message, '[run tests]')
|
||||
|
||||
veracode_sca:
|
||||
name: "Veracode - Source Clear Scan (SCA)"
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v9.3.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v9.3.1
|
||||
- name: "Clean-up SNAPSHOT artifacts"
|
||||
run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v9.3.1
|
||||
continue-on-error: true
|
||||
with:
|
||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||
|
||||
veracode_sast:
|
||||
name: "Pipeline SAST Scan"
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- pre_commit
|
||||
- test_run_check
|
||||
if: needs.test_run_check.outputs.tests == 'true' && github.actor != 'dependabot[bot]'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v9.3.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v9.3.1
|
||||
- name: "Login to Docker Hub"
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: "Login to Quay.io"
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.QUAY_USERNAME }}
|
||||
password: ${{ secrets.QUAY_PASSWORD }}
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v9.3.1
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
repository: "Alfresco/veracode-baseline-archive"
|
||||
file-path: "alfresco-transform-core/alfresco-transform-core-baseline.json"
|
||||
target: "baseline.json"
|
||||
- name: "Build"
|
||||
run: mvn -B -U install -DskipTests
|
||||
- name: "Create zip"
|
||||
run: |
|
||||
mkdir -p to-scan
|
||||
for file in engines/aio/target/alfresco-transform-core-aio-*.jar engines/base/target/alfresco-base-t-engine-*.jar model/target/alfresco-transform-model-*.jar
|
||||
do
|
||||
if [[ $file != *javadoc.jar ]] && [[ $file != *sources.jar ]] && [[ $file != *tests.jar ]]; then
|
||||
mv "$file" to-scan/
|
||||
fi
|
||||
done
|
||||
# Removing the aspectjweaver and bouncycastle jars from the scan, since Veracode detects them as 1st party code and fails the scan. TO BE REVERTED ONCE VERACODE FIXES THE ISSUE
|
||||
zip -d to-scan/alfresco-transform*.jar "BOOT-INF/lib/bcmail-jdk18on-*.jar" "BOOT-INF/lib/bcprov-jdk18on-*.jar" "BOOT-INF/lib/aspectjweaver*.jar"
|
||||
zip -r to-scan.zip to-scan
|
||||
- name: "Run SAST Scan"
|
||||
uses: veracode/Veracode-pipeline-scan-action@v1.0.16
|
||||
with:
|
||||
vid: ${{ secrets.VERACODE_API_ID }}
|
||||
vkey: ${{ secrets.VERACODE_API_KEY }}
|
||||
file: "to-scan.zip"
|
||||
fail_build: true
|
||||
project_name: alfresco-transform-core
|
||||
issue_details: true
|
||||
veracode_policy_name: Alfresco Default
|
||||
summary_output: true
|
||||
summary_output_file: results.json
|
||||
summary_display: true
|
||||
baseline_file: baseline.json
|
||||
include: "to-scan/alfresco*"
|
||||
- name: Upload scan result
|
||||
if: success() || failure()
|
||||
run: zip readable_output.zip results.json
|
||||
- name: Upload Artifact
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Veracode Pipeline-Scan Results (Human Readable)
|
||||
path: readable_output.zip
|
||||
|
||||
pmd_scan:
|
||||
name: "PMD Scan"
|
||||
runs-on: ubuntu-latest
|
||||
@@ -299,7 +214,7 @@ jobs:
|
||||
release:
|
||||
name: "Release"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [veracode_sca, build_and_test, all_tests_matrix, e2e_javaruntime_tests]
|
||||
needs: [build_and_test, all_tests_matrix, e2e_javaruntime_tests]
|
||||
if: >
|
||||
!(failure() || cancelled()) &&
|
||||
contains(github.event.head_commit.message, '[release]') &&
|
||||
|
||||
Reference in New Issue
Block a user