From 4c2b56dccc343ff1f5215058c1b292c4aa8341d7 Mon Sep 17 00:00:00 2001 From: Rohitesh Gupta <1429138+srkgupta@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:56:39 +0530 Subject: [PATCH 1/2] Created CodeQL config --- .github/codeql/codeql-config.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 000000000..4d9fa7b21 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,13 @@ +name: "CodeQL config" + +query-filters: + - exclude: + problem.severity: + - warning + - recommendation + - exclude: + id: go/log-injection + +paths-ignore: + - '**/*_test.go' + - '**/*.test.*' From 762caaed240894d9bd250f50c77032a52757a719 Mon Sep 17 00:00:00 2001 From: Rohitesh Gupta <1429138+srkgupta@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:57:01 +0530 Subject: [PATCH 2/2] Updated CodeQL to latest version --- .github/workflows/codeql-analysis.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3e5aea685..cf936643c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,15 +8,16 @@ on: branches: [ master ] schedule: - cron: '30 0 * * 0' + +permissions: + contents: read jobs: analyze: + permissions: + security-events: write # for github/codeql-action/autobuild to send a status report name: Analyze runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write strategy: fail-fast: false @@ -25,18 +26,20 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) + debug: false + config-file: ./.github/codeql/codeql-config.yml + + # Autobuild attempts to build any compiled languages - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 + # Perform Analysis - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2