From 7535711f725aeb2ed2cd749a76866203046e55ea Mon Sep 17 00:00:00 2001 From: Enriqueta De Leon Date: Fri, 18 Aug 2023 11:10:07 -0700 Subject: [PATCH 1/2] Create snyk_scan.yml automating snyk dependency scanning --- .github/workflows/snyk_scan.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/snyk_scan.yml diff --git a/.github/workflows/snyk_scan.yml b/.github/workflows/snyk_scan.yml new file mode 100644 index 0000000..1ef453b --- /dev/null +++ b/.github/workflows/snyk_scan.yml @@ -0,0 +1,25 @@ +# This workflow automates the process of identifying potential security vulnerabilities +# using Snyk. Dependency vulnerability scans will be run when a push is made to the main +# branch, on a weekly schedule, and can also be triggered manually. + +name: Snyk Vulnerability Scan +on: + workflow_dispatch: + schedule: + - cron: '00 15 * * 1' + push: + branches: + - main + +jobs: + security: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run Snyk To Check For Vulnerabilities + uses: snyk/actions/gradle@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + command: monitor + args: --all-sub-projects --org=java-agent --configuration-matching='(^compileClasspath$)|(^runtimeClasspath$)' From 0f1978566729e1519088c4e5730e30b7f2444f07 Mon Sep 17 00:00:00 2001 From: Enriqueta De Leon Date: Tue, 22 Aug 2023 10:14:05 -0700 Subject: [PATCH 2/2] updated checkout action and command --- .github/workflows/snyk_scan.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snyk_scan.yml b/.github/workflows/snyk_scan.yml index 1ef453b..02ceb92 100644 --- a/.github/workflows/snyk_scan.yml +++ b/.github/workflows/snyk_scan.yml @@ -15,11 +15,15 @@ jobs: security: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - name: Checkout Code + uses: actions/checkout@v3 + with: + ref: 'main' + - name: Run Snyk To Check For Vulnerabilities uses: snyk/actions/gradle@master env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: - command: monitor + command: test args: --all-sub-projects --org=java-agent --configuration-matching='(^compileClasspath$)|(^runtimeClasspath$)'