Repository navigation
Closed
Labels
Description
Problem
Nothing in CI looks for security problems in the code itself. Code scanning isn't set up on the repo (default setup reports not-configured). Dependabot covers dependencies, and the Claude review only advises. This server holds a Kosli API token, can do destructive writes, and is shipped through npm and the .mcpb bundle, so it should get the same baseline scan as our other repos.
Proposal
Add .github/workflows/codeql.yaml, modelled on terraform-provider-kosli's codeql.yaml, using the analyze job only. Leave out its attest job and the SARIF upload artifact for now (see "Not in scope").
- Triggers:
pushandpull_requesttomain, plus a weeklyscheduleas a baseline re-scan, at an off-peak minute as the provider does. - Concurrency: cancel superseded PR runs only, as the provider does (
cancel-in-progress: ${{ github.event_name == 'pull_request' }}). A cancelled run onmainuploads no SARIF and leaves the code scanning baseline stale. - Languages: a matrix with
build-mode: nonefor both:javascript-typescript, which coverssrc/andscripts/. No build is needed.src/catalog.jsonis generated data, not code.actions, which covers the workflow files. The review workflow runs an LLM with a token in scope, so this matters here.
- Queries:
security-extended, as in the provider. - Permissions:
security-events: write,contents: readandactions: readon the job, withcontents: readat the top level.
Repo conventions to keep (from CLAUDE.md)
- Pin every action to a full commit SHA with a trailing
# vX.Y.Zcomment. Dependabot updates them weekly. - Run
step-security/harden-runneras the first step. The provider's workflow doesn't, but ours does on every job. - Make it fork-safe: it needs no secrets, so it runs on fork PRs without the
head.repo.full_nameguard. - Update the "Four workflows" line in
CLAUDE.md.
Not in scope (for now)
- Kosli attestation and instrumentation: the provider's
attestjob, which reportscodeql-scanto a Kosli trail with a compliant flag based on open high or critical alerts. This repo has no Kosli flow or trail yet, so attesting has nowhere to go. Revisit once the repo reports to Kosli. Until then, the SARIF upload artifact isn't needed either. - Making CodeQL a required check in the
mainruleset. Decide that after a few runs show how noisy it is.
Done when
codeql.yamlruns on a PR and onmain, and its results show under Security → Code scanning.- Any alerts from the first full scan are fixed, or dismissed with a reason.
Activity