Skip to content

Commit

Permalink
Testing CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cox authored and Dan Cox committed Jan 24, 2024
1 parent b95a0b8 commit 622b88a
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions .github/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,51 @@
name: "CodeQL"

on:
push:
branches: [develop]
branches: [ develop ]
paths-ignore:
- 'test/**'
paths:
- src
pull_request:
branches: [develop]
branches: [ develop ]
paths-ignore:
- 'test/**'
paths:
- src

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
upload: false # disable the upload here - we will upload in a different action
output: sarif-results

- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
# filter out all test files unless they contain a sql-injection vulnerability
patterns:
-test/**/*
+test/**/*:js/sql-injection
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif

0 comments on commit 622b88a

Please sign in to comment.