From 29ab5072915b342645491d479245628bf1672f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= Date: Wed, 10 Jul 2024 22:19:02 +0200 Subject: [PATCH] Add codeql (#5554) --- .github/workflows/codeql.yml | 41 ++++++++++++++++++++++++++++++++++++ codeql-config.yml | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/codeql.yml create mode 100644 codeql-config.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000000..46c012853fc --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '41 13 * * 6' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + timeout-minutes: 360 + permissions: + security-events: write + + strategy: + fail-fast: false + matrix: + include: + - language: javascript-typescript + build-mode: none + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + queries: +github/codeql/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql@main + config-file: ./codeql-config.yml + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" \ No newline at end of file diff --git a/codeql-config.yml b/codeql-config.yml new file mode 100644 index 00000000000..63c42d52ea9 --- /dev/null +++ b/codeql-config.yml @@ -0,0 +1,2 @@ +paths: + - src \ No newline at end of file