Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/codeql/codeql-autogenerated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths:
- 'packages'
Comment on lines +1 to +2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

If the packages directory is the primary contributor to the 6-hour runtime, moving it into its own configuration file will not resolve the timeout issue if it is still processed by a single CodeQL runner. To effectively reduce runtime and stay within the 6-hour limit, consider further partitioning the packages directory into multiple configuration files (e.g., by sub-directory ranges) to allow for parallel execution across multiple runners.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll need to test with the split config before considering further splits.

3 changes: 3 additions & 0 deletions .github/codeql/codeql-handwritten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
paths:
- 'core'
- 'handwritten'
4 changes: 4 additions & 0 deletions .github/codeql/codeql-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths-ignore:
- 'packages'
- 'core'
- 'handwritten'
66 changes: 66 additions & 0 deletions .github/workflows/codeql-autogenerated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "CodeQL Advanced - autogenerated"

# The CodeQL jobs are kept separately so that their run time doesn't
# exceed the max for an action job on GitHub.

on:
schedule:
- cron: '0 2 * * *'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# 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

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning - autogen flavour.
- name: Initialize CodeQL for autogenerated
uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/codeql-autogenerated.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis for autogenerated
uses: github/codeql-action/analyze@v4
66 changes: 66 additions & 0 deletions .github/workflows/codeql-handwritten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "CodeQL Advanced - handwritten"

# The CodeQL jobs are kept separately so that their run time doesn't
# exceed the max for an action job on GitHub.

on:
schedule:
- cron: '30 1 * * *'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# 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

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning - handwritten flavour.
- name: Initialize CodeQL for handwritten
uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/codeql-handwritten.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis for handwritten
uses: github/codeql-action/analyze@v4
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: "CodeQL Advanced"
name: "CodeQL Advanced - repo meta"

# The CodeQL jobs are kept separately so that their run time doesn't
# exceed the max for an action job on GitHub.

on:
schedule:
- cron: '0 4 * * *'
- cron: '0 1 * * *'

jobs:
analyze:
Expand Down Expand Up @@ -52,18 +55,13 @@ jobs:
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
# Initializes the CodeQL tools for scanning - repo meta flavour.
- name: Initialize CodeQL for repo meta
uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/codeql-repo.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Perform CodeQL Analysis
- name: Perform CodeQL Analysis for repo meta
uses: github/codeql-action/analyze@v4
Loading