| 1 |
# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 |
# contributor license agreements. See the NOTICE file distributed with |
| 3 |
# this work for additional information regarding copyright ownership. |
| 4 |
# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 |
# (the "License"); you may not use this file except in compliance with |
| 6 |
# the License. You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
# For most projects, this workflow file will not need changing; you simply need |
| 16 |
# to commit it to your repository. |
| 17 |
|
| 18 |
# You may wish to alter this file to override the set of languages analyzed, |
| 19 |
# or to provide custom queries or build logic. |
| 20 |
|
| 21 |
name: "CodeQL JavaScript" |
| 22 |
|
| 23 |
on: |
| 24 |
push: |
| 25 |
branches: |
| 26 |
- main |
| 27 |
pull_request: |
| 28 |
# The branches below must be a subset of the branches above |
| 29 |
branches: |
| 30 |
- main |
| 31 |
paths: |
| 32 |
- .github/workflows/codeql-js-analysis.yml |
| 33 |
- lang/js/** |
| 34 |
|
| 35 |
concurrency: |
| 36 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 37 |
cancel-in-progress: true |
| 38 |
|
| 39 |
jobs: |
| 40 |
analyze: |
| 41 |
name: Analyze |
| 42 |
runs-on: ubuntu-latest |
| 43 |
|
| 44 |
strategy: |
| 45 |
fail-fast: false |
| 46 |
matrix: |
| 47 |
# Override automatic language detection by changing the below list |
| 48 |
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
| 49 |
language: |
| 50 |
- javascript |
| 51 |
# Learn more... |
| 52 |
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
| 53 |
|
| 54 |
steps: |
| 55 |
- name: Checkout repository |
| 56 |
uses: actions/checkout@v5 |
| 57 |
with: |
| 58 |
# We must fetch at least the immediate parents so that if this is |
| 59 |
# a pull request then we can checkout the head. |
| 60 |
fetch-depth: 2 |
| 61 |
|
| 62 |
# Initializes the CodeQL tools for scanning. |
| 63 |
- name: Initialize CodeQL |
| 64 |
uses: github/codeql-action/init@v3 |
| 65 |
with: |
| 66 |
languages: ${{ matrix.language }} |
| 67 |
# If you wish to specify custom queries, you can do so here or in a config file. |
| 68 |
# By default, queries listed here will override any specified in a config file. |
| 69 |
# Prefix the list here with "+" to use these queries and those in the config file. |
| 70 |
# queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 71 |
queries: +security-and-quality |
| 72 |
|
| 73 |
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 74 |
# If this step fails, then you should remove it and run the build manually (see below) |
| 75 |
- name: Autobuild |
| 76 |
uses: github/codeql-action/autobuild@v3 |
| 77 |
|
| 78 |
# âšī¸ Command-line programs to run using the OS shell. |
| 79 |
# đ https://git.io/JvXDl |
| 80 |
|
| 81 |
# âī¸ If the Autobuild fails above, remove it and uncomment the following three lines |
| 82 |
# and modify them (or add more) to build your code if your project |
| 83 |
# uses a compiled language |
| 84 |
|
| 85 |
- name: Perform CodeQL Analysis |
| 86 |
uses: github/codeql-action/analyze@v3 |