Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
paths-ignore:
- "docs/prettify/**/*.*"
- "editor/js/libs/**/*.*"
- "examples/jsm/libs/**/*.*"
- "examples/jsm/loaders/ifc/**/*.*"
- "build/*.*"
- "manual/3rdparty/**/*.*"
45 changes: 45 additions & 0 deletions .github/workflows/codeql-code-scanning.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use pinning for the actions (i.e. using the commit hash instead of the version)? Otherwise this can potentially leave the repository open to a supply chain attack in actions, with which the repository's secrets could be stealed, (not sure if there are any enabled in three.js).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you trust the provider of the Action (in this case: GitHub) and its ability to put measures in place to prevent malicious take-overs, then it's fine to pin to a @v2 tag. But if you want to be super secure, then you are indeed very welcome to pin to the Action's commit SHA. You could then even use Dependabot to help keep your Action SHAs up to date!.

I'll leave it up to the three.js team to decide what to do here. Maintainers should feel free to edit the contents of the PR 🙂

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}}"