-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Remove semgrep workflow #1663
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
Remove semgrep workflow #1663
Changes from all commits
e7be4cd
fc439e3
a53b09b
67c77a4
7a686f8
2cdcf70
e86c6a6
60503a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,80 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: "CodeQL - JavaScript (Advanced)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - cron: '0 2 * * 3' # weekly on Wed 02:00 UTC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| analyze: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Analyze (CodeQL, Node ${{ matrix.node }}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| security-events: write | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| packages: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| actions: read | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| include: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - language: javascript-typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node: 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build-mode: none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - language: javascript-typescript | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node: 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build-mode: none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node.js | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node-version: ${{ matrix.node }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cache: 'npm' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cache node modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ~/.npm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| node_modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| restore-keys: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ${{ runner.os }}-node-${{ matrix.node }}- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+54
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| node_modules | |
| key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-${{ matrix.node }}- |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing dependencies is unnecessary when using build-mode 'none' for JavaScript/TypeScript analysis. CodeQL can analyze the source code directly without installed dependencies. This step adds unnecessary time to the workflow execution. Consider removing this step or only including it if you change to a build mode that requires it.
| - name: Install dependencies | |
| run: | | |
| if [ -f package-lock.json ]; then | |
| npm ci | |
| else | |
| npm install | |
| fi |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting up Node.js is unnecessary for CodeQL analysis with build-mode 'none'. CodeQL for JavaScript/TypeScript performs static analysis on the source code and doesn't require a Node.js runtime or dependencies. This step (along with the cache and install steps) can be removed to speed up the workflow.
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'npm' | |
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| node_modules | |
| key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-${{ matrix.node }}- | |
| - name: Install dependencies | |
| run: | | |
| if [ -f package-lock.json ]; then | |
| npm ci | |
| else | |
| npm install | |
| fi |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix specifies 'build-mode: none' but the workflow includes an Autobuild step. When build-mode is 'none', CodeQL analyzes the code without building it, making the Autobuild step unnecessary. Either remove the Autobuild step (recommended for JavaScript/TypeScript projects which typically don't need building for CodeQL analysis) or change build-mode to 'autobuild' if building is required.
| - name: Autobuild (CodeQL) | |
| uses: github/codeql-action/autobuild@v4 | |
| env: | |
| CI: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix strategy runs CodeQL analysis twice (once for Node 18 and once for Node 20), but since build-mode is 'none', the Node version doesn't affect the analysis results. CodeQL analyzes the source code statically without executing it. Running duplicate analyses wastes CI resources and time. Consider removing the matrix and running a single analysis job, or if you need to test against multiple Node versions, use the existing Node.js CI workflow instead.