mirror of
https://github.com/Radarr/Radarr
synced 2026-05-08 19:00:17 +02:00
Add custom CodeQL config to exclude log-forging false positives
This commit is contained in:
parent
1190d218af
commit
adced83df6
4 changed files with 84 additions and 0 deletions
18
.github/codeql/codeql-config.yml
vendored
Normal file
18
.github/codeql/codeql-config.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
name: "Aletheia CodeQL Configuration"
|
||||||
|
|
||||||
|
queries:
|
||||||
|
- uses: security-and-quality
|
||||||
|
|
||||||
|
packs:
|
||||||
|
csharp:
|
||||||
|
- .github/codeql/extensions
|
||||||
|
|
||||||
|
query-filters:
|
||||||
|
- exclude:
|
||||||
|
id: cs/log-forging
|
||||||
|
|
||||||
|
paths-ignore:
|
||||||
|
- node_modules
|
||||||
|
- _output
|
||||||
|
- _tests
|
||||||
|
- _artifacts
|
||||||
7
.github/codeql/extensions/log-sanitizers.yml
vendored
Normal file
7
.github/codeql/extensions/log-sanitizers.yml
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
extensions:
|
||||||
|
- addsTo:
|
||||||
|
pack: codeql/csharp-all
|
||||||
|
extensible: summaryModel
|
||||||
|
data:
|
||||||
|
- ["NzbDrone.Common.Extensions", "StringExtensions", false, "SanitizeForLog", "(System.String,System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
|
||||||
|
|
||||||
6
.github/codeql/extensions/qlpack.yml
vendored
Normal file
6
.github/codeql/extensions/qlpack.yml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
name: aletheia/codeql-extensions
|
||||||
|
version: 1.0.0
|
||||||
|
extensionTargets:
|
||||||
|
codeql/csharp-all: "*"
|
||||||
|
dataExtensions:
|
||||||
|
- log-sanitizers.yml
|
||||||
53
.github/workflows/codeql.yml
vendored
Normal file
53
.github/workflows/codeql.yml
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
name: CodeQL
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [develop, master]
|
||||||
|
pull_request:
|
||||||
|
branches: [develop, master]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze (${{ matrix.language }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
packages: read
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- language: csharp
|
||||||
|
build-mode: manual
|
||||||
|
- language: javascript-typescript
|
||||||
|
build-mode: none
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v3
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
config-file: .github/codeql/codeql-config.yml
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
if: matrix.language == 'csharp'
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
- name: Build C#
|
||||||
|
if: matrix.language == 'csharp'
|
||||||
|
run: dotnet build src/Radarr.sln --configuration Release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v3
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
||||||
Loading…
Reference in a new issue