Skip to content

Commit d638357

Browse files
authored
chore(ci): update codeql workflow (#501)
1 parent ec2caeb commit d638357

File tree

5 files changed

+24
-46
lines changed

5 files changed

+24
-46
lines changed

.github/workflows/bump-packages.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: none # we use the github app's token to checkout and push
10+
811
jobs:
912
update_generated_files:
1013
name: Bump packages

.github/workflows/check-test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches:
1212
- main
1313

14+
permissions:
15+
contents: read # we just need to checkout the repo
16+
1417
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1518
jobs:
1619
check-and-test:

.github/workflows/codeql.yml

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
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-
#
12-
name: "CodeQL"
1+
name: CodeQL
132

143
on:
154
push:
16-
branches: ["main"]
5+
branches:
6+
- main
177
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: ["main"]
8+
branches:
9+
- main
2010
schedule:
2111
- cron: "30 14 * * 4"
2212

2313
jobs:
2414
analyze:
2515
name: Analyze
26-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
27-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 360
2818
permissions:
2919
actions: read
3020
contents: read
@@ -33,27 +23,18 @@ jobs:
3323
strategy:
3424
fail-fast: false
3525
matrix:
36-
language: ["javascript-typescript"]
37-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
38-
# Use only 'java' to analyze code written in Java, Kotlin or both
39-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
40-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
26+
language:
27+
- javascript-typescript
28+
- actions
4129

4230
steps:
4331
- name: Checkout repository
4432
uses: actions/checkout@v4
4533

46-
# Initializes the CodeQL tools for scanning.
4734
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@v2
35+
uses: github/codeql-action/init@v3
4936
with:
5037
languages: ${{ matrix.language }}
51-
# If you wish to specify custom queries, you can do so here or in a config file.
52-
# By default, queries listed here will override any specified in a config file.
53-
# Prefix the list here with "+" to use these queries and those in the config file.
54-
55-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
56-
# queries: security-extended,security-and-quality
5738
config: |
5839
paths-ignore:
5940
- '**/*.test.js'
@@ -64,22 +45,7 @@ jobs:
6445
- '**/*.spec.tsx'
6546
- 'scripts/**'
6647
67-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
68-
# If this step fails, then you should remove it and run the build manually (see below)
69-
- name: Autobuild
70-
uses: github/codeql-action/autobuild@v2
71-
72-
# ℹ️ Command-line programs to run using the OS shell.
73-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
74-
75-
# If the Autobuild fails above, remove it and uncomment the following three lines.
76-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
77-
78-
# - run: |
79-
# echo "Run, Build Application using script"
80-
# ./location_of_script_within_repo/buildscript.sh
81-
8248
- name: Perform CodeQL Analysis
83-
uses: github/codeql-action/analyze@v2
49+
uses: github/codeql-action/analyze@v3
8450
with:
8551
category: "/language:${{matrix.language}}"

.github/workflows/publish-packages.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
types:
88
- completed
99

10+
permissions:
11+
contents: none # we use the github app's token to checkout and push
12+
1013
jobs:
1114
publish:
1215
if: |

.github/workflows/update-cidrs.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
schedule:
77
- cron: "0 0 * * *"
88

9+
permissions:
10+
contents: none # we use the github app's token to checkout and push
11+
912
jobs:
1013
update_generated_files:
1114
name: Update automatically generated files

0 commit comments

Comments
 (0)