diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 000000000..96dde6a1b --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,20 @@ +name: "Threadlines CodeQL config" + +paths-ignore: + # Read-only Effect 4 source copy for agents (21 MB); not shipped or executed. + - ".repos/**" + # Vendored third-party code. + - "apps/desktop/src/preview/vendor/**" + - "apps/web/public/mockServiceWorker.js" + - "apps/web/src/lib/vendor/**" + # Generated code. + - "**/routeTree.gen.ts" + - "**/worker-configuration.d.ts" + - "packages/effect-codex-app-server/src/_generated/**" + # Test suites and fixtures. + - "**/*.test.*" + - "**/*.spec.*" + - "**/*.browser.*" + - "apps/server/integration/**" + - "apps/server/evals/**" + - "scripts/fixtures/**" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..8582705d6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,48 @@ +name: CodeQL + +on: + pull_request: + branches: + - main + schedule: + # Weekly Monday 06:23 UTC (off the :00 cron spike) to keep main's security + # alerts current without running a 20-minute scan on every push to main. + - cron: "23 6 * * 1" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: + - javascript-typescript + - actions + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Initialize CodeQL + uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql/codeql-config.yml + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4 + with: + category: "/language:${{ matrix.language }}"