From 45605972f23d37b9c8d624eb16968e5c3281d16c Mon Sep 17 00:00:00 2001 From: Aman Brar Date: Tue, 29 Dec 2020 16:21:10 -0500 Subject: [PATCH 1/3] added codeql scan workflow --- .github/workflows/codeql-analysis.yml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..906a3250613 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,39 @@ +name: "Code Scanning - Action" + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_dispatch: + schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: '30 1 * * *' + +jobs: + CodeQL-Build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: go + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 \ No newline at end of file From 289cb08ab7d11d8c05ecf1e0ab93a962d4e56286 Mon Sep 17 00:00:00 2001 From: Aman Brar Date: Wed, 30 Dec 2020 09:51:37 -0500 Subject: [PATCH 2/3] added name and newline --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 906a3250613..61918515b4e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,4 +1,4 @@ -name: "Code Scanning - Action" +name: "CodeQL Analysis" on: push: @@ -36,4 +36,4 @@ jobs: uses: github/codeql-action/autobuild@v1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 \ No newline at end of file + uses: github/codeql-action/analyze@v1 From 5103fa45ce1822cc4f91c8d5213ef80450f4cb4c Mon Sep 17 00:00:00 2001 From: Aman Brar Date: Wed, 30 Dec 2020 15:28:21 -0500 Subject: [PATCH 3/3] run only on daily cron job and manual trigger --- .github/workflows/codeql-analysis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 61918515b4e..8075055b144 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,10 +1,6 @@ name: "CodeQL Analysis" on: - push: - branches: [master] - pull_request: - branches: [master] workflow_dispatch: schedule: # ┌───────────── minute (0 - 59)