From f3adfa69eb6afab2f827bed03ab2de2cd0824964 Mon Sep 17 00:00:00 2001 From: Andrew Meir <134502868+AM-K-19@users.noreply.github.com> Date: Mon, 6 Nov 2023 10:25:15 +0100 Subject: [PATCH] Updates to codeql config * Split c-cpp and python init sections * Add paths-ignore config for pythin init * Add json-c wrap during build - increases c codeql coverage --- .github/codeql/codeql-config.yml | 3 +++ .github/workflows/codeql.yml | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 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..d9079fd9 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,3 @@ +name: "CodeQL Config" +paths-ignore: + - subprojects/** diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 56259239..0dc02a8f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -47,21 +47,22 @@ jobs: sudo apt-get install meson # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL + - if: matrix.language == 'c-cpp' + name: Initialize CodeQL C 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. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - + languages: 'c-cpp' + - if: matrix.language == 'python' + name: Initialize CodeQL Python + uses: github/codeql-action/init@v2 + with: + languages: 'python' + config-file: ./.github/codeql/codeql-config.yml + - name: meson build run: | - meson setup --force-fallback-for=libnvme .build + meson setup --force-fallback-for=libnvme,json-c .build ninja -C .build - name: Perform CodeQL Analysis -- 2.50.1