From d294961b35afe2082368819843f1acf52cc5ead4 Mon Sep 17 00:00:00 2001 From: Damon Blais Date: Wed, 18 Nov 2026 03:52:06 -0700 Subject: [PATCH 1/2] chore(biome): disable noMagicNumbers and noBitwiseOperators --- biome.jsonc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/biome.jsonc b/biome.jsonc index c997c2c..d5cda5e 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -93,6 +93,8 @@ "noTernary": "off", // canon ts-biome-00035 "useExportsLast": "off", + // canon ts-biome-00035 + "noMagicNumbers": "off", // canon ts-biome-00007 "noExcessiveLinesPerFile": { @@ -184,6 +186,8 @@ }, "suspicious": { + // canon ts-biome-00035 + "noBitwiseOperators": "off", // canon ts-biome-00021 "noExplicitAny": "error", // canon ts-biome-00005 From 94f04bf9de789828326f6f672b4877a60e8860db Mon Sep 17 00:00:00 2001 From: Damon Blais Date: Wed, 18 Nov 2026 03:52:12 -0700 Subject: [PATCH 2/2] ci(codeql): analyze the languages this repository holds --- .github/workflows/codeql.yml | 54 +++++++++++++++++++----------------- canon.toml | 2 ++ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2ab2c01..f37d5fb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,49 +1,53 @@ +# CodeQL advanced setup: every language in this repository with the security-and-quality suite, re-runnable +# from the Actions tab. Languages other than Go are extracted without a build. name: CodeQL + on: push: branches: [main] - merge_group: pull_request: + branches: [main] schedule: - - cron: "17 5 * * 1" -permissions: {} + - cron: "42 20 * * 0" + workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + +permissions: {} + jobs: analyze: + name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 60 permissions: - security-events: write - contents: read actions: read + contents: read + security-events: write strategy: fail-fast: false matrix: - # Add the repository's own languages here; "actions" scans these workflows. - language: [actions] + include: + - language: actions + build-mode: none + - language: javascript-typescript + build-mode: none + - language: python + build-mode: none steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 + - name: Initialize CodeQL + uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 with: languages: ${{ matrix.language }} - - uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 + build-mode: ${{ matrix.build-mode }} + queries: security-and-quality + - name: Analyze + uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 with: category: /language:${{ matrix.language }} - # One required check for branch protection: a matrix leg that never ran reads as not failing rather than not run. - all-checks: - if: always() - needs: [analyze] - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Fail if any check did not succeed - run: | - if [ "${{ needs.analyze.result }}" != "success" ]; then - echo "analyze=${{ needs.analyze.result }}" - exit 1 - fi - echo "all checks passed" diff --git a/canon.toml b/canon.toml index 4a9b27e..14a5c40 100644 --- a/canon.toml +++ b/canon.toml @@ -3,3 +3,5 @@ reconciled = "canon v0.1.0-poc" [deviations] # Astro template directives (set:html) and HTML attributes (datetime) are valid in .astro files but read as unknown React props to this rule (18 findings measured). "ts-biome-00006 suspicious/noUnknownAttribute" = "Astro templates are HTML, not React" +# Canon artifact matrix includes Go; this repository holds JavaScript/TypeScript, Python, and Actions. +"patterns-repo-settings-00001" = "this repository holds JavaScript/TypeScript, Python and Actions, not Go; the CodeQL matrix lists those languages with build-mode none"