Skip to content
Closed
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
54 changes: 29 additions & 25 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 4 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
"noTernary": "off",
// canon ts-biome-00035
"useExportsLast": "off",
// canon ts-biome-00035
"noMagicNumbers": "off",

// canon ts-biome-00007
"noExcessiveLinesPerFile": {
Expand Down Expand Up @@ -184,6 +186,8 @@
},

"suspicious": {
// canon ts-biome-00035
"noBitwiseOperators": "off",
// canon ts-biome-00021
"noExplicitAny": "error",
// canon ts-biome-00005
Expand Down
2 changes: 2 additions & 0 deletions canon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading