Skip to content

Commit cbad288

Browse files
committed
ci: add estate-standard CodeQL workflow (unblocks code-scanning merge gate)
arghda-core's `main` branch protection requires Code Scanning results, but the repo shipped no CodeQL workflow — so auto-merge waits forever ("Waiting for Code Scanning results. Code Scanning may not be configured for the target branch"). Earlier PRs only merged because the owner merged them manually; auto-merge enforces the gate strictly. Root cause: arghda-core was EXTRACTED from echo-types rather than instantiated from rsr-template-repo, so it never inherited the template's `codeql.yml`. This restores the canonical estate workflow verbatim (identical to rsr-template-repo + cicd-squabbler, which is green): - `language: actions`, `build-mode: none` — the estate default; scans the workflow files every repo has, avoiding the "no source files" failures that `rust`/`javascript-typescript` extractors produce (CodeQL's Rust support is limited). Per hypatia `codeql_language_matrix_mismatch`. - Triggers on `push: [main]` (establishes the code-scanning BASELINE on the target branch — the missing piece the error names) AND `pull_request` (produces results on every PR). SHA-pinned actions. Permanent fix: once this lands on `main`, the push-trigger run establishes the baseline and every future PR's code-scanning gate is satisfied automatically — no more manual-merge workaround. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7
1 parent ca59438 commit cbad288

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: CodeQL Security Analysis
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
- cron: '0 6 1 * *' # monthly 1st 06:00 UTC (Actions burn cut, standards#288)
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
permissions:
14+
contents: read
15+
jobs:
16+
analyze:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
permissions:
20+
contents: read
21+
security-events: write
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
# Default to `actions` — scaffolded repos rarely have JS/TS
27+
# source; `javascript-typescript` produced "no source files"
28+
# failures on every CodeQL run. The `actions` extractor scans
29+
# workflow files which every repo has. Override per-repo if
30+
# the scaffolded project actually contains JS/TS code.
31+
# Per hypatia rule `codeql_language_matrix_mismatch`.
32+
- language: actions
33+
build-mode: none
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
39+
with:
40+
languages: ${{ matrix.language }}
41+
build-mode: ${{ matrix.build-mode }}
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
44+
with:
45+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)