-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeql-javascripttypescript.yml
More file actions
73 lines (64 loc) · 2.23 KB
/
codeql-javascripttypescript.yml
File metadata and controls
73 lines (64 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: '🛡️ CodeQL - javascript-typescript'
on:
pull_request:
paths:
- 'web/**'
push:
branches:
- main
paths:
- 'web/**'
workflow_dispatch:
jobs:
codeql-analyze:
name: CodeQL - Analyze (javascript-typescript)
runs-on: 'ubuntu-latest'
permissions:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Hugo
uses: ./.github/actions/setup-hugo
with:
hugo-cachedir: ${{ runner.temp }}/hugo_cache
- name: Initialize CodeQL
uses: github/codeql-action/init@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
with:
languages: javascript-typescript
build-mode: none
config-file: .github/codeql/codeql-config-javascript-typescript.yml
- name: Build with Hugo
run: |
hugo \
--gc \
--minify \
--enableGitInfo \
--baseURL "${URL}"
shell: bash
working-directory: web
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: Europe/Stockholm
URL: "https://kallelilja.com"
HUGO_PARAMS_gitCommit: 'codeql'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
with:
category: "/language:javascript-typescript"
output: sarif-results
upload: failure-only
- name: filter-sarif - javascript-typescript
uses: advanced-security/filter-sarif@f3b8118a9349d88f7b1c0c488476411145b6270d # v1.0.1
with:
patterns: |
-web/themes/hello-friend-ng/assets/js/prism.js:js/regex/missing-regexp-anchor
-web/public/bundle.min.*.js:js/regex/missing-regexp-anchor
input: "sarif-results/javascript.sarif"
output: "sarif-results/javascript-typescript.sarif"
- name: Upload CodeQL sarif
uses: github/codeql-action/upload-sarif@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
with:
sarif_file: "sarif-results/javascript-typescript.sarif"