From 2379b6286424cf029e740ecd63983c267060405b Mon Sep 17 00:00:00 2001 From: John Osumi <931193+sumitake@users.noreply.github.com> Date: Mon, 3 Aug 2026 19:31:20 -0700 Subject: [PATCH] ci: add CodeQL workflow, split secret-scan, add status badges Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 10 -------- .github/workflows/codeql.yml | 38 +++++++++++++++++++++++++++++++ .github/workflows/secret-scan.yml | 16 +++++++++++++ README.md | 5 ++++ 4 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/secret-scan.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eafc3f..c486493 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,13 +14,3 @@ jobs: - uses: astral-sh/setup-uv@v5 - run: uv sync --group dev - run: uv run pytest -v - - secret-scan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: gitleaks/gitleaks-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..237b592 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,38 @@ +name: CodeQL +on: + push: + branches: [main] + pull_request: + schedule: + - cron: "0 4 * * 1" + workflow_dispatch: +permissions: {} +jobs: + codeql: + runs-on: ubuntu-24.04 + timeout-minutes: 30 + permissions: + contents: read + security-events: write + actions: read + concurrency: + group: ${{ github.workflow }}-codeql-${{ matrix.language }}-${{ github.ref }} + cancel-in-progress: true + strategy: + fail-fast: false + matrix: + language: + - python + steps: + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + - name: Initialize CodeQL + uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 + with: + languages: ${{ matrix.language }} + - name: Analyze + uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 + with: + category: /language:${{ matrix.language }} diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml new file mode 100644 index 0000000..94395a2 --- /dev/null +++ b/.github/workflows/secret-scan.yml @@ -0,0 +1,16 @@ +name: secret-scan +on: + push: + branches: [main] + pull_request: + +jobs: + secret-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index f02987c..ced8401 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # BUSY Bar Integrations +[![ci](https://github.com/sumitake/busybar-integrations/actions/workflows/ci.yml/badge.svg)](https://github.com/sumitake/busybar-integrations/actions/workflows/ci.yml) +[![CodeQL](https://github.com/sumitake/busybar-integrations/actions/workflows/codeql.yml/badge.svg)](https://github.com/sumitake/busybar-integrations/actions/workflows/codeql.yml) +[![secret-scan](https://github.com/sumitake/busybar-integrations/actions/workflows/secret-scan.yml/badge.svg)](https://github.com/sumitake/busybar-integrations/actions/workflows/secret-scan.yml) +[![License: MPL-2.0](https://img.shields.io/badge/License-MPL--2.0-blue.svg)](LICENSE) + Local-API integrations for the BUSY Bar — a 72×16 LED status display on USB or LAN. ## Requirements