Skip to content

Commit 7b11239

Browse files
committed
fix: address security vulnerabilities and add CodeQL workflow
- Add permissions to workflows to resolve code scanning alerts. See: https://github.com/GoogleChrome/webstatus.dev/security/code-scanning - Update tar-fs to resolve a high severity vulnerability. See: https://github.com/GoogleChrome/webstatus.dev/security/dependabot - Add a dedicated workflow for CodeQL analysis for Go, JavaScript/TypeScript, and Actions, including a build step to generate necessary packages. See: https://github.com/GoogleChrome/webstatus.dev/security/code-scanning/tools/CodeQL/status/configurations/automatic/50b81ab7aa14a07a66df525212035d409a54427fca55f64790c4765d94a09359 Generated with Gemini.
1 parent 7342afa commit 7b11239

4 files changed

Lines changed: 53 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ on: # trigger builds for 1) PRs, 2) merges into main from merge_queue, and 3) ma
1818
merge_group:
1919
workflow_dispatch:
2020

21+
permissions:
22+
contents: read
23+
2124
env:
22-
GO_VERSION: '1.23'
25+
GO_VERSION: '1.25'
2326
NODE_VERSION: '22'
2427
GO_CACHE_DEPENDENCY_PATH: '**/*.sum'
2528

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'go', 'javascript-typescript', 'actions' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v5
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v4
32+
with:
33+
languages: ${{ matrix.language }}
34+
35+
- name: Generate code
36+
run: make gen
37+
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v4
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v4

.github/workflows/devcontainer.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
schedule:
1919
- cron: '0 0 * * 2' # Runs every Tuesday at midnight UTC
2020

21+
permissions:
22+
contents: read
23+
packages: write
24+
2125
env:
2226
GO_VERSION: '1.23'
2327
NODE_VERSION: '22'

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)