From 89c9bfd1a514003c5710f0194c4d231cdd25851f Mon Sep 17 00:00:00 2001 From: Richin Jain Date: Fri, 9 Sep 2022 15:11:57 -0700 Subject: [PATCH 1/2] Adding DevSkim linter to Github actions --- .github/workflows/devskim-security-linter.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/devskim-security-linter.yml diff --git a/.github/workflows/devskim-security-linter.yml b/.github/workflows/devskim-security-linter.yml new file mode 100644 index 000000000..d52fa57a8 --- /dev/null +++ b/.github/workflows/devskim-security-linter.yml @@ -0,0 +1,35 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party (Microsoft) and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# For more details about Devskim, visit https://github.com/marketplace/actions/devskim + +name: DevSkim + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '25 4 * * 2' + +jobs: + lint: + name: DevSkim + runs-on: ubuntu-20.04 + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run DevSkim scanner + uses: microsoft/DevSkim-Action@v1 + + - name: Upload DevSkim scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: devskim-results.sarif From 13f21fe383b346d957501632e5dd25d507edfc6d Mon Sep 17 00:00:00 2001 From: Richin Jain Date: Fri, 7 Oct 2022 22:22:49 -0700 Subject: [PATCH 2/2] Ignoring .git and test folder --- .github/workflows/devskim-security-linter.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/devskim-security-linter.yml b/.github/workflows/devskim-security-linter.yml index d52fa57a8..e7e33b7ab 100644 --- a/.github/workflows/devskim-security-linter.yml +++ b/.github/workflows/devskim-security-linter.yml @@ -12,7 +12,7 @@ on: pull_request: branches: [ "main" ] schedule: - - cron: '25 4 * * 2' + - cron: '00 4 * * *' jobs: lint: @@ -28,6 +28,8 @@ jobs: - name: Run DevSkim scanner uses: microsoft/DevSkim-Action@v1 + with: + ignore-globs: "**/.git/**,**/test/**" - name: Upload DevSkim scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v2