You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Analyzing the database with [Code Scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#using-query-packs)
38
-
Example [configuration file](https://github.com/advanced-security/codeql-sap-js/blob/main/.github/codeql/codeql-config.yaml#L3-L7).
39
-
38
+
Example workflow file:
39
+
```yaml
40
+
jobs:
41
+
analyze-javascript:
42
+
name: Analyze
43
+
runs-on: 'ubuntu-latest'
44
+
permissions:
45
+
actions: read
46
+
contents: read
47
+
security-events: write
48
+
49
+
- name: Compile CDS files
50
+
run: |
51
+
npm install -g @sap/cds-dk
52
+
for cds_file in $(find . -type f \( -iname '*.cds' \) -print)
53
+
do
54
+
cds compile $cds_file \
55
+
-2 json \
56
+
-o "$cds_file.json" \
57
+
--locations
58
+
done
59
+
60
+
- name: Initialize CodeQL
61
+
uses: github/codeql-action/init@v3
62
+
with:
63
+
languages: javascript
64
+
config-file: .github/codeql/codeql-config.yaml
65
+
66
+
- name: Perform CodeQL Analysis
67
+
id: analyze
68
+
uses: github/codeql-action/analyze@v3
69
+
```
70
+
Exmaple configuration file:
71
+
```yaml
72
+
name: "My CodeQL config"
73
+
74
+
packs:
75
+
# Use these packs for JavaScript and TypeScript analysis
### Analyzing the database with the [CodeQL CLI](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/publishing-and-using-codeql-packs#using-a-codeql-pack-to-analyze-a-codeql-database)
0 commit comments