Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable SAST scanning with CodeQL #197

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: codeql

on:
push:
branches:
- 'main'
pull_request:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for not adding it for PRs too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull_request: means it will be triggered for any PRs against any based branch if you don't specify branches field under.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right!


permissions:
actions: read
contents: read
security-events: write

env:
NODE_VERSION: 20

jobs:
analyze:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
-
name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript-typescript
-
name: Autobuild
uses: github/codeql-action/autobuild@v2
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:javascript-typescript"
2 changes: 1 addition & 1 deletion src/buildx/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class Builder {
if (value.includes('*')) {
for (const platform of value.split(', ')) {
if (platform.includes('*')) {
platforms.push(platform.replace('*', ''));
platforms.push(platform.replace(/\*/g, ''));
}
}
} else {
Expand Down