From 48869a654f4006fef9d3c288c3f5cc306c520622 Mon Sep 17 00:00:00 2001 From: Rohitesh Gupta <1429138+srkgupta@users.noreply.github.com> Date: Thu, 20 Oct 2022 18:43:07 +0530 Subject: [PATCH] Updated CodeQL to latest version (#2292) * Created CodeQL config * Upgraded CodeQL to latest version --- .github/codeql/codeql-config.yml | 11 +++++++++++ .github/workflows/codeql-analysis.yml | 25 ++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) 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 00000000..4a0d285c --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,11 @@ +name: "CodeQL config" + +query-filters: + - exclude: + problem.severity: + - warning + - recommendation + +paths-ignore: + - e2e + - '**/*.test.*' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b1ec3711..c49e5115 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,10 +7,15 @@ on: # The branches below must be a subset of the branches above branches: [ master ] schedule: - - cron: '00 00 * * 0' + - cron: '0 0 * * 0' + +permissions: + contents: read jobs: analyze: + permissions: + security-events: write name: Analyze runs-on: ubuntu-latest @@ -18,26 +23,20 @@ jobs: fail-fast: false matrix: language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 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 }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + config-file: ./.github/codeql/codeql-config.yml - # 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) + # Autobuild attempts to build any compiled languages - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2