mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Improve CodeQL action
* no need to run CodeQL on Dependabit PRs; no related files are changed there * specify permissions * enable `security-and-quality` rules instead of the default rules * ignore `vendor` folders Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
3
.github/codeql/codeql-config.yml
vendored
Normal file
3
.github/codeql/codeql-config.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
name: "CodeQL config"
|
||||||
|
paths-ignore:
|
||||||
|
- "**/vendor/**"
|
||||||
25
.github/workflows/codeql.yml
vendored
25
.github/workflows/codeql.yml
vendored
@@ -7,29 +7,40 @@ on:
|
|||||||
- development
|
- development
|
||||||
- "!dependabot/**"
|
- "!dependabot/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- development
|
- development
|
||||||
|
- "!dependabot/**"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * 0"
|
- cron: "0 0 * * 0"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v3
|
|
||||||
with:
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v3.28.10
|
||||||
|
with:
|
||||||
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
languages: "javascript"
|
languages: "javascript"
|
||||||
|
queries: +security-and-quality
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v3.28.10
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3.28.10
|
||||||
|
with:
|
||||||
|
category: "/language:javascript"
|
||||||
|
|||||||
Reference in New Issue
Block a user