[CI] Check sarif location
This commit is contained in:
108
.github/workflows/common.yml
vendored
108
.github/workflows/common.yml
vendored
@@ -357,24 +357,6 @@ jobs:
|
||||
echo "::info ::$MESSAGE"
|
||||
fi
|
||||
popd > /dev/null
|
||||
- name: Scan Jar files
|
||||
shell: bash
|
||||
id: scan
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: 'Configure: Docker login'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -403,6 +385,24 @@ jobs:
|
||||
MAVEN_THREADS: ${{ inputs.mavenThreads }}
|
||||
BUILD_VERSION_TYPE: ${{ needs.parameters.outputs.build_version_type }}
|
||||
run: ./build-app.sh "stream-applications" "applications/processor/${{ matrix.app }}"
|
||||
- name: 'Scan Jar files'
|
||||
shell: bash
|
||||
id: scan
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: Unit Test Report
|
||||
uses: dorny/test-reporter@v1
|
||||
if: ${{ success() || failure() }}
|
||||
@@ -504,24 +504,6 @@ jobs:
|
||||
echo "::info ::$MESSAGE"
|
||||
fi
|
||||
popd > /dev/null
|
||||
- name: Scan Jar files
|
||||
id: scan
|
||||
shell: bash
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: 'Configure: Docker login'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -550,6 +532,24 @@ jobs:
|
||||
MAVEN_THREADS: ${{ inputs.mavenThreads }}
|
||||
BUILD_VERSION_TYPE: ${{ needs.parameters.outputs.build_version_type }}
|
||||
run: ./build-app.sh "stream-applications" "applications/sink/${{ matrix.app }}"
|
||||
- name: 'Scan Jar files'
|
||||
shell: bash
|
||||
id: scan
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: 'Upload: Test Reports'
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -652,24 +652,6 @@ jobs:
|
||||
echo "::info ::$MESSAGE"
|
||||
fi
|
||||
popd > /dev/null
|
||||
- name: Scan Jar files
|
||||
shell: bash
|
||||
id: scan
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: 'Configure: Docker login'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -698,6 +680,24 @@ jobs:
|
||||
MAVEN_THREADS: ${{ inputs.mavenThreads }}
|
||||
BUILD_VERSION_TYPE: ${{ needs.parameters.outputs.build_version_type }}
|
||||
run: ./build-app.sh "stream-applications" "applications/source/${{ matrix.app }}"
|
||||
- name: 'Scan Jar files'
|
||||
shell: bash
|
||||
id: scan
|
||||
run: |
|
||||
ROOT_DIR=$(realpath $PWD)
|
||||
pushd stream-applications > /dev/null
|
||||
$ROOT_DIR/scan-folders.sh
|
||||
popd > /dev/null
|
||||
if [ -f scan.sarif ]; then
|
||||
echo "scan_file=$(realpath scan.sarif)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "scan_file=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
if: ${{ steps.scan.output.scan_file != null && steps.scan.output.scan_file != '' }}
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: '${{ steps.scan.output.scan_file }}'
|
||||
- name: Unit Test Report
|
||||
uses: dorny/test-reporter@v1
|
||||
if: ${{ success() || failure() }}
|
||||
|
||||
Reference in New Issue
Block a user