|
| 1 | +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json |
| 2 | + |
| 3 | +# For most projects, this workflow file will not need changing; you simply need |
| 4 | +# to commit it to your repository. |
| 5 | +# |
| 6 | +# You may wish to alter this file to override the set of languages analyzed, |
| 7 | +# or to provide custom queries or build logic. |
| 8 | +# |
| 9 | +# ******** NOTE ******** |
| 10 | +# We have attempted to detect the languages in your repository. Please check |
| 11 | +# the `language` matrix defined below to confirm you have the correct set of |
| 12 | +# supported CodeQL languages. |
| 13 | +# |
| 14 | +name: "CodeQL" |
| 15 | + |
| 16 | +on: |
| 17 | + push: |
| 18 | + branches: ["main"] |
| 19 | + pull_request: |
| 20 | + # The branches below must be a subset of the branches above |
| 21 | + branches: ["main"] |
| 22 | + schedule: |
| 23 | + - cron: "0 0 * * 1" |
| 24 | + |
| 25 | +permissions: |
| 26 | + contents: read |
| 27 | + |
| 28 | +jobs: |
| 29 | + analyze: |
| 30 | + name: Analyze |
| 31 | + runs-on: ubuntu-latest |
| 32 | + permissions: |
| 33 | + actions: read |
| 34 | + contents: read |
| 35 | + security-events: write |
| 36 | + |
| 37 | + strategy: |
| 38 | + fail-fast: false |
| 39 | + matrix: |
| 40 | + language: ["javascript", "typescript"] |
| 41 | + # CodeQL supports [ $supported-codeql-languages ] |
| 42 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
| 43 | + |
| 44 | + steps: |
| 45 | + - name: Harden Runner |
| 46 | + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 |
| 47 | + with: |
| 48 | + egress-policy: audit |
| 49 | + |
| 50 | + - name: Checkout repository |
| 51 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 52 | + |
| 53 | + # Initializes the CodeQL tools for scanning. |
| 54 | + - name: Initialize CodeQL |
| 55 | + uses: github/codeql-action/init@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6 |
| 56 | + with: |
| 57 | + # https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#example-configuration |
| 58 | + languages: ${{ matrix.language }} |
| 59 | + config: | |
| 60 | + paths-ignore: |
| 61 | + - '**/*.test.js' |
| 62 | + - '**/*.test.mjs' |
| 63 | + - '**/*.bench.js' |
| 64 | + - '**/*.bench.mjs' |
| 65 | +
|
| 66 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 67 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 68 | + - name: Autobuild |
| 69 | + uses: github/codeql-action/autobuild@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6 |
| 70 | + |
| 71 | + # ℹ️ Command-line programs to run using the OS shell. |
| 72 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 73 | + |
| 74 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 75 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
| 76 | + |
| 77 | + # - run: | |
| 78 | + # echo "Run, Build Application using script" |
| 79 | + # ./location_of_script_within_repo/buildscript.sh |
| 80 | + |
| 81 | + - name: Perform CodeQL Analysis |
| 82 | + uses: github/codeql-action/analyze@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6 |
| 83 | + with: |
| 84 | + category: "/language:${{matrix.language}}" |
0 commit comments