Skip to content
Open
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
7 changes: 0 additions & 7 deletions .github/workflows/flow-build-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ on:
type: boolean
required: false
default: false
enable-snyk-scan:
description: "Snyk Scan Enabled"
type: boolean
required: false
default: false
java-version:
description: "Java JDK Version:"
type: string
Expand Down Expand Up @@ -87,12 +82,10 @@ jobs:
java-version: ${{ github.event.inputs.java-version || '21.0.1' }}
java-distribution: ${{ github.event.inputs.java-distribution || 'temurin' }}
gradle-version: ${{ github.event.inputs.gradle-version || 'wrapper' }}
enable-snyk-scan: ${{ github.event_name == 'push' || github.event.inputs.enable-snyk-scan == 'true' }}
enable-sonar-analysis: ${{ github.event_name == 'push' || github.event.inputs.enable-sonar-analysis == 'true' }}
enable-codecov-analysis: ${{ github.event_name == 'push' || github.event.inputs.enable-unit-tests == 'true' }}
secrets:
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 0 additions & 14 deletions .github/workflows/flow-pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,3 @@ jobs:
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
sonar-token: ${{ secrets.SONAR_TOKEN }}

snyk:
name: Snyk Scan
uses: ./.github/workflows/zxc-code-analysis.yaml
needs:
- unit-tests
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.actor != 'dependabot[bot]' }}
with:
custom-job-label: Standard
enable-snyk-scan: true
secrets:
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
67 changes: 1 addition & 66 deletions .github/workflows/zxc-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ on:
type: boolean
required: false
default: false
enable-snyk-scan:
description: "Snyk Scan Enabled"
type: boolean
required: false
default: false
java-distribution:
description: "Java JDK Distribution:"
type: string
Expand Down Expand Up @@ -75,9 +70,6 @@ on:
sonar-token:
description: "The SonarCloud access token used by the SonarQube agent to report an analysis."
required: false
snyk-token:
description: "The Snyk access token is used by Snyk to analyze the code for vulnerabilities "
required: false
codecov-token:
description: "The CodeCov access token is used by CodeCov.io to analyze the code coverage "
required: false
Expand Down Expand Up @@ -124,7 +116,7 @@ jobs:
with:
gradle-version: ${{ inputs.gradle-version }}

# Node.JS 16.x is required for the Snyk CLI, Sonar Scan, and CodeCov steps below.
# Node.JS 16.x is required for the Sonar Scan and CodeCov steps below.
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
Expand Down Expand Up @@ -171,60 +163,3 @@ jobs:
with:
gradle-version: ${{ inputs.gradle-version }}
arguments: sonar --info --scan ${{ steps.sonar-cloud.outputs.options }}

- name: Setup Snyk
env:
SNYK_TOKEN: ${{ secrets.snyk-token }}
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
run: npm install -g snyk snyk-to-html @wcj/html-to-markdown-cli

- name: Snyk Scan
id: snyk
env:
SNYK_TOKEN: ${{ secrets.snyk-token }}
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
run: snyk test --all-projects --severity-threshold=high --json-file-output=snyk-test.json

- name: Snyk Code
id: snyk-code
env:
SNYK_TOKEN: ${{ secrets.snyk-token }}
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
run: snyk code test --severity-threshold=high --json-file-output=snyk-code.json

- name: Publish Snyk Results
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
run: |
if [[ -f "snyk-test.json" && -n "$(cat snyk-test.json | tr -d '[:space:]')" ]]; then
snyk-to-html -i snyk-test.json -o snyk-test.html --summary
html-to-markdown snyk-test.html -o snyk
cat snyk/snyk-test.html.md >> $GITHUB_STEP_SUMMARY
fi

if [[ -f "snyk-code.json" && -n "$(cat snyk-code.json | tr -d '[:space:]')" ]]; then
snyk-to-html -i snyk-code.json -o snyk-code.html --summary
html-to-markdown snyk-code.html -o snyk
cat snyk/snyk-code.html.md >> $GITHUB_STEP_SUMMARY
fi

- name: Check Snyk Files
if: ${{ always() }}
run: |
echo "::group::Snyk File List"
ls -lah snyk* || true
echo "::endgroup::"
echo "::group::Snyk Test Contents"
cat snyk-test.json || true
echo "::endgroup::"
echo "::group::Snyk Code Contents"
cat snyk-code.json || true
echo "::endgroup::"

- name: Publish Snyk Reports
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
with:
name: Snyk Reports
path: |
snyk-*.html
snyk-*.json
82 changes: 0 additions & 82 deletions .github/workflows/zxf-snyk-monitor.yaml

This file was deleted.

Loading