-
Notifications
You must be signed in to change notification settings - Fork 34
74 lines (62 loc) · 1.74 KB
/
Copy pathcodeql.yml
File metadata and controls
74 lines (62 loc) · 1.74 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: CodeQL
on:
push:
branches: ["master"]
paths-ignore:
- "ChangeLog"
- "**/*.md"
- "**/*.txt"
pull_request:
branches: ["master"]
paths-ignore:
- "ChangeLog"
- "**/*.md"
- "**/*.txt"
schedule:
- cron: "23 2 * * 3"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
actions: read # CodeQL reads Actions metadata for workflow analysis.
contents: read
security-events: write # CodeQL uploads results to code scanning.
strategy:
fail-fast: false
matrix:
language: [c-cpp, actions]
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
- name: Install build packages
if: ${{ matrix.language == 'c-cpp' }}
run: |
sudo apt-get update
sudo apt-get install --yes \
autoconf \
automake \
libtool \
pkg-config
- name: Initialize CodeQL
uses: github/codeql-action/init@53e96ec3b35fce51c141c0d6f0e31028a448722d # v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Build project
if: ${{ matrix.language == 'c-cpp' }}
run: |
autoreconf -fvi
./configure
make
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@53e96ec3b35fce51c141c0d6f0e31028a448722d # v3
with:
category: "/language:${{ matrix.language }}"