-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (45 loc) · 1.61 KB
/
review.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Mobb/CodeQL Fixer on pull requests
# This workflow defines the needed steps to run CodeQL on every pull request and pass the results to Mobb Fixer.
# This example utilizes CodeQL with JavaScript. For other languages, change the CodeQL language settings below.
#
# Secrets in use:
# MOBB_API_TOKEN - your mobb user credentials (autumatially set if you forked this repo via the Mobb app)
# GITHUB_TOKEN - automatically set by GitHub
name: "Mobb/CodeQL"
on:
pull_request:
branches: ["*"]
jobs:
scan-and-fix:
name: Scan with CodeQL and fix with Mobb
runs-on: 'ubuntu-latest'
timeout-minutes: 360
permissions:
pull-requests: write
statuses: write
strategy:
fail-fast: false
matrix:
language: ["javascript-typescript"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
codeql_output_filename: ["javascript.sarif"]
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:
category: "/language:${{ matrix.language }}"
output: results
- name: Run Mobb on the findings and get fixes
if: always()
uses: ./review
with:
report-file: results/${{ matrix.codeql_output_filename }}
api-key: ${{ secrets.MOBB_API_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
scanner: codeql