Skip to content

Commit 6086413

Browse files
Merge pull request #3 from Iterable/codeql-workflow
adding initial codeql workflow
2 parents 79c70ad + a74291c commit 6086413

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
10+
jobs:
11+
analyze:
12+
name: Analyze (${{ matrix.language }})
13+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
14+
permissions:
15+
# required for all workflows
16+
security-events: write
17+
18+
# required to fetch internal or private CodeQL packs
19+
packages: read
20+
21+
# only required for workflows in private repositories
22+
actions: read
23+
contents: read
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
include:
29+
- language: javascript-typescript
30+
build-mode: none
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
# Add any setup steps before running the `github/codeql-action/init` action.
37+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
38+
# or others). This is typically only required for manual builds.
39+
# - name: Setup runtime (example)
40+
# uses: actions/setup-example@v1
41+
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v3
45+
with:
46+
languages: ${{ matrix.language }}
47+
build-mode: ${{ matrix.build-mode }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
52+
# 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
53+
queries: security-extended,security-and-quality
54+
55+
# If the analyze step fails for one of the languages you are analyzing with
56+
# "We were unable to automatically build your code", modify the matrix above
57+
# to set the build mode to "manual" for that language. Then modify this step
58+
# to build your code.
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
61+
- if: matrix.build-mode == 'manual'
62+
shell: bash
63+
run: |
64+
echo 'If you are using a "manual" build mode for one or more of the' \
65+
'languages you are analyzing, replace this with the commands to build' \
66+
'your code, for example:'
67+
echo ' make bootstrap'
68+
echo ' make release'
69+
exit 1
70+
71+
- name: Perform CodeQL Analysis
72+
uses: github/codeql-action/analyze@v3
73+
with:
74+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ yarn-error.log
88
.vscode/
99
.swc/*
1010
/target/*
11+
.idea
1112

1213
# Test-related stuff
1314
test-reports/

0 commit comments

Comments
 (0)