Quellcode durchsuchen

Enable GitHub code scanning with CodeQL (to replace the soon-to-be-deprecated LGTM.com) (#25056)

* Create codeql.yml

* Update codeql.yml

* Create codeql-config.yml

* Update codeql.yml

* Update codeql-config.yml

* Update and rename codeql.yml to codeql-code-scanning.yml

* Update codeql-code-scanning.yml

* Update codeql-code-scanning.yml

* Update codeql-config.yml

* Update codeql-config.yml

* Update codeql-config.yml

Co-authored-by: Michael Herzog <[email protected]>
Bas van Schaik vor 2 Jahren
Ursprung
Commit
5ee9d03092
2 geänderte Dateien mit 52 neuen und 0 gelöschten Zeilen
  1. 7 0
      .github/codeql-config.yml
  2. 45 0
      .github/workflows/codeql-code-scanning.yml

+ 7 - 0
.github/codeql-config.yml

@@ -0,0 +1,7 @@
+paths-ignore:
+  - "docs/prettify/**/*.*"
+  - "editor/js/libs/**/*.*"
+  - "examples/jsm/libs/**/*.*"
+  - "examples/jsm/loaders/ifc/**/*.*"
+  - "build/*.*"
+  - "manual/3rdparty/**/*.*"

+ 45 - 0
.github/workflows/codeql-code-scanning.yml

@@ -0,0 +1,45 @@
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ "dev" ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ "dev" ]
+  schedule:
+    - cron: '29 23 * * 0'
+  workflow_dispatch:
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'javascript' ]
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v3
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v2
+      with:
+        languages: ${{ matrix.language }}
+        config-file: ./.github/codeql-config.yml
+        queries: security-and-quality
+
+    - name: Autobuild
+      uses: github/codeql-action/autobuild@v2
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v2
+      with:
+        category: "/language:${{matrix.language}}"