...
1# For most projects, this workflow file will not need changing; you simply need
2# to commit it to your repository.
3#
4# You may wish to alter this file to override the set of languages analyzed,
5# or to provide custom queries or build logic.
6#
7# ******** NOTE ********
8# We have attempted to detect the languages in your repository. Please check
9# the `language` matrix defined below to confirm you have the correct set of
10# supported CodeQL languages.
11#
12name: "CodeQL"
13
14on:
15 push:
16 branches: [ main ]
17 pull_request:
18 # The branches below must be a subset of the branches above
19 branches: [ main ]
20 schedule:
21 - cron: '35 21 * * 4'
22
23jobs:
24 analyze:
25 name: Analyze
26 runs-on: [self-hosted, X64]
27 permissions:
28 actions: read
29 contents: read
30 security-events: write
31
32 strategy:
33 fail-fast: false
34 matrix:
35 language: [ 'go' ]
36 # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37 # Learn more:
38 # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39
40 steps:
41 - name: Clear repository
42 run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
43
44 - name: Checkout repository
45 uses: actions/checkout@v2
46
47 - name: Set up Go
48 uses: actions/setup-go@v2
49 with:
50 go-version: 1.17
51
52 - uses: actions/cache@v2
53 with:
54 path: ~/go/pkg/mod
55 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
56 restore-keys: |
57 ${{ runner.os }}-go-
58
59 # Initializes the CodeQL tools for scanning.
60 - name: Initialize CodeQL
61 uses: github/codeql-action/init@v2
62 with:
63 languages: ${{ matrix.language }}
64 # If you wish to specify custom queries, you can do so here or in a config file.
65 # By default, queries listed here will override any specified in a config file.
66 # Prefix the list here with "+" to use these queries and those in the config file.
67 # queries: ./path/to/local/query, your-org/your-repo/queries@main
68
69 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
70 # If this step fails, then you should remove it and run the build manually (see below)
71 - name: Autobuild
72 uses: github/codeql-action/autobuild@v1
73
74 # âšī¸ Command-line programs to run using the OS shell.
75 # đ https://git.io/JvXDl
76
77 # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
78 # and modify them (or add more) to build your code if your project
79 # uses a compiled language
80
81 #- run: |
82 # make bootstrap
83 # make release
84
85 - name: Perform CodeQL Analysis
86 uses: github/codeql-action/analyze@v2
View as plain text