Repository navigation
ci: add CodeQL code scanning - #97
Conversation
Nothing in CI looked for security problems in the code itself, and code scanning wasn't set up on the repo. This adds codeql.yaml, modelled on terraform-provider-kosli's, analyze job only: - javascript-typescript and actions, both build-mode none, with the security-extended queries. The actions language matters here: the review workflow runs an LLM with a token in scope. - On PRs and pushes to main, plus a weekly baseline re-scan. - Superseded PR runs are cancelled; runs on main are not, so the baseline always gets its SARIF. - SHA-pinned with version comments, harden-runner first, as everywhere else here. It needs no secrets, so it runs on fork PRs unguarded. codeql-action is pinned to v4.39.0 (the provider's pin), not v4.39.1, which is two days old; the repo's 7-day cooldown applies, and Dependabot's actions group will offer it. The Kosli attestation job and making CodeQL a required check are left for later, as the issue says. Closes #91
|
Claude finished @dangrondahl's task in 2m 14s —— View job Review:
|
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Release prep for **0.6.0**. A draft for now: it gets rebased once #97 (CodeQL) merges, then marked ready. `npm version minor --no-git-tag-version` moves `package.json`, `package-lock.json` and the generated `src/version.ts` together. `manifest.json` gets the version at pack time. Nothing else changes. ## What's in 0.6.0 (since 0.5.0) ###⚠️ Changes that affect existing setups - **No configured org (#65).** `KOSLI_ORG` and the Desktop extension's *Organization* setting are removed. Every org-scoped call names its org through the execute tools' `org` input, so no request lands in an org the caller didn't name. An existing config that still sets `KOSLI_ORG` starts fine and logs that the value is ignored, but calls that relied on the default are now refused until an org is given. - **Node ≥ 22 (#38).** It was ≥ 20. ### Fixes - **Evidence downloads work again (#88, fixes #86).** Since 16 Oct, every `get_attestation_evidence` call failed: our token was forwarded to the pre-signed S3 URL. Text files come back as text, and binary files return a clear error. - **The `.mcpb` bundle starts on Node 22.0 – 22.6 (#87).** It didn't before. - **No known vulnerabilities in the bundled dependencies (#96).** `npm audit --omit=dev` is clean. ### Features - **`org` input on the execute tools (#65).** - **`User-Agent` carries the version (#41):** `kosli-mcp-server/<version>`. ### Dependencies - **Runtime:** `@modelcontextprotocol/sdk` 1.29.0 → 1.32.1 (#29, #71, #79). - **Dev:** TypeScript 7 (#45), with emitted output byte-identical to 5.9. vitest 5 (#93). - **Catalog:** regenerated from the OpenAPI spec (#50, #53, #60, #69, #78). ### Release confidence (CI only) Typecheck of tests and scripts, a stdio smoke test against `dist/` and the unzipped bundle (including Node 22.0.0), `mcpb validate`, and `release.yml` publishing only after every check (#87). There's also a phased Claude review (#90), Dependabot grouping with a 7-day cooldown, and CodeQL (#97). ## Checked locally on this branch - Build, typecheck, 122 tests. - The smoke test reports `server advertises version 0.6.0`, both from `dist/` and from the unzipped bundle. - `kosli-mcp-server-0.6.0.mcpb`: the manifest says 0.6.0 and `mcpb validate` passes. ## Before tagging (after merge) - [ ] Rebase onto `main` once #97 merges, then mark ready. - [ ] Install the 0.6.0 `.mcpb` in Claude Desktop, including an upgrade over 0.5.0 with an org configured. - [ ] Run `KOSLI_API_TOKEN=… KOSLI_SMOKE_ORG=<org> npm run smoke` on `main`. - [ ] Download one piece of evidence via `get_attestation_evidence`. - [ ] `git tag -a v0.6.0 -m "v0.6.0" <merge commit> && git push origin v0.6.0`. `release.yml` does the rest.
Closes #91.
What
.github/workflows/codeql.yaml, modelled on terraform-provider-kosli's. It includes the analyze job only.javascript-typescript(src/,scripts/,test/) andactions(the workflows). Both usebuild-mode: none, so there's no build step.security-extended.main, plus a weekly re-scan (Wednesdays 05:23 UTC).mainaren't, so the code scanning baseline always gets its SARIF.contents: readat the top level. The job addssecurity-events: writeandactions: read.harden-runnerfirst, as in every other workflow here. It needs no secrets, so there's no fork guard. Dependabot'sactionsgroup will keep the pins current.CLAUDE.md's workflow list goes from four to five.codeql-actionis pinned to v4.39.0, the provider's pin, rather than v4.39.1. v4.39.1 is two days old, which is inside the repo's 7-day cooldown; Dependabot will offer it.Not in this PR (per #91)
attestjob, which needs a Kosli flow and trail for this repo.mainruleset. Decide that after a few runs.Checking it
actionlintpasses on every workflow.claude-review.yaml, this workflow runs on the PR that adds it, so this PR's own checks are the first scan. Look at Security → Code scanning afterwards, and fix or dismiss with a reason anything the first full scan raises (the issue's "done when").