Skip to content

Commit f51bd05

Browse files
authored
Merge pull request #1338 from github/ahpook-patch-1
Go to advanced mode codeql
2 parents ba5c351 + 17ced06 commit f51bd05

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths-ignore:
2+
- 'assets/js/index.js'

.github/workflows/codeql.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '21 12 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
# Runner size impacts CodeQL analysis time. To learn more, please see:
15+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
16+
# - https://gh.io/supported-runners-and-hardware-resources
17+
# - https://gh.io/using-larger-runners (GitHub.com only)
18+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
19+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
20+
permissions:
21+
# required for all workflows
22+
security-events: write
23+
24+
# required to fetch internal or private CodeQL packs
25+
packages: read
26+
27+
# only required for workflows in private repositories
28+
actions: read
29+
contents: read
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
include:
35+
- language: actions
36+
build-mode: none
37+
- language: javascript-typescript
38+
build-mode: none
39+
- language: ruby
40+
build-mode: none
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
# Initializes the CodeQL tools for scanning.
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@v4
48+
with:
49+
languages: ${{ matrix.language }}
50+
build-mode: ${{ matrix.build-mode }}
51+
config-file: ./.github/codeql/codeql-config.yml
52+
53+
# If the analyze step fails for one of the languages you are analyzing with
54+
# "We were unable to automatically build your code", modify the matrix above
55+
# to set the build mode to "manual" for that language. Then modify this step
56+
# to build your code.
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59+
- name: Run manual build steps
60+
if: matrix.build-mode == 'manual'
61+
shell: bash
62+
run: |
63+
echo 'If you are using a "manual" build mode for one or more of the' \
64+
'languages you are analyzing, replace this with the commands to build' \
65+
'your code, for example:'
66+
echo ' make bootstrap'
67+
echo ' make release'
68+
exit 1
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v4
72+
with:
73+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)