Skip to content

Commit b525cd9

Browse files
authored
Merge pull request #197 from crazy-max/ci-codeql
ci: enable SAST scanning with CodeQL
2 parents 21a7def + b212b3b commit b525cd9

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: codeql
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
9+
permissions:
10+
actions: read
11+
contents: read
12+
security-events: write
13+
14+
env:
15+
NODE_VERSION: 20
16+
17+
jobs:
18+
analyze:
19+
runs-on: ubuntu-latest
20+
steps:
21+
-
22+
name: Checkout
23+
uses: actions/checkout@v4
24+
-
25+
name: Set up Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
-
30+
name: Initialize CodeQL
31+
uses: github/codeql-action/init@v2
32+
with:
33+
languages: javascript-typescript
34+
-
35+
name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
-
38+
name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:javascript-typescript"

src/buildx/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class Builder {
145145
if (value.includes('*')) {
146146
for (const platform of value.split(', ')) {
147147
if (platform.includes('*')) {
148-
platforms.push(platform.replace('*', ''));
148+
platforms.push(platform.replace(/\*/g, ''));
149149
}
150150
}
151151
} else {

0 commit comments

Comments
 (0)