-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (75 loc) · 2.76 KB
/
codeql.yml
File metadata and controls
85 lines (75 loc) · 2.76 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
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
name: "CodeQL Advanced"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "42 5 * * 6"
workflow_dispatch:
jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24.x"
cache: "npm"
cache-dependency-path: "**/package*.json"
- name: Install JavaScript/TypeScript dependencies
shell: bash
run: |
echo "📦 Installing JavaScript/TypeScript dependencies..."
# Install dependencies for JavaScript SDK
if [ -f "package.json" ]; then
npm ci || npm install
fi
# Install dependencies for examples
if [ -f "examples/package.json" ]; then
cd examples
npm ci || npm install
cd ..
fi
echo "✅ JavaScript/TypeScript dependencies installed"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
languages: javascript-typescript
build-mode: none
queries: +security-extended,security-and-quality
config: |
name: "CodeQL Config"
queries:
- uses: security-extended
- uses: security-and-quality
query-filters:
- exclude:
# Helm values files use empty strings as defaults
id: js/empty-password-in-configuration-file
paths-ignore:
- "**/*_pb.js"
- "**/*_pb.d.ts"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
category: "/language:${{matrix.language}}"