From c5a34322fbc7bfade82d23c7d14414bdb968678e Mon Sep 17 00:00:00 2001 From: Ana Scolari <127357173+apsscolari@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:53:56 -0800 Subject: [PATCH] Create sarif_converter.yml for testing sonarqube xml to sarif --- .github/workflows/sarif_converter.yml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/sarif_converter.yml diff --git a/.github/workflows/sarif_converter.yml b/.github/workflows/sarif_converter.yml new file mode 100644 index 0000000..6b70b7e --- /dev/null +++ b/.github/workflows/sarif_converter.yml @@ -0,0 +1,32 @@ +name: cppcheck + +on: + push: + branches: + - master + +jobs: + upload-sarif: + runs-on: ubuntu-24.04 + permissions: + security-events: write + actions: read + contents: read + steps: + - uses: actions/checkout@v4 + + - run: | + sudo apt-get install -y cppcheck + + - run: | + cppcheck --enable=all --xml --output-file=report.xml . + + - uses: Flast/cppcheck-sarif@v2 + with: + input: report.xml + output: report.sarif + + - uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: report.sarif + category: cppcheck