I maintain zanadir, which reads a repository's CI and reports which kinds of checks it runs and whether each one can actually fail the build. I ran it on zero and checked what it found by hand. This one seemed worth sharing.
A lot is already careful here: every action is pinned to a commit SHA with persist-credentials: false, govulncheck runs for both Linux and Windows on every PR, there's a race-detector job with a deliberate timeout, and npm publishing goes through trusted publishing behind a required-reviewer environment.
Version / branch / commit
main at ffd7bb2 (repository settings, not a code change)
What happens
CodeQL default setup is on, but it only analyses GitHub Actions and Ruby. Go, which is about 99% of the repository, has never been analysed, and neither has the JavaScript in bin/zero.js and scripts/.
- The setup's run history goes back to 2 July: 1,802 runs. Every one has the job
Analyze (actions), and from 21 August alsoAnalyze (ruby). None has a Go or JavaScript job. - Ruby was added automatically one minute after #910 merged
packaging/homebrew/zero.rb. Go and JavaScript were already in the repository on 2 July, so they look deselected rather than undetected. - The latest run, 43547704824, logs
Languages from configuration: actionsandLanguages from configuration: ruby. The same job logsCalculated baseline information for languages: actions, go, javascript, ruby, so CodeQL sees the Go code and doesn't scan it.
No other security analysis covers Go in CI. make lint-static enables only unused,ineffassign,staticcheck (Makefile line 51), and that step is advisory. For an agent that runs shell commands, edits files and builds outbound HTTP requests, that leaves the command-injection, path-traversal and SSRF queries unused on the code where they matter most.
Expected
Code scanning analyses Go and JavaScript/TypeScript as well as Actions and Ruby.
Fix
In Settings, under Code security (Advanced Security in the newer layout), open the CodeQL analysis menu, choose View/Edit configuration and tick Go and JavaScript/TypeScript. Go uses autobuild in default setup, so the job will take longer than the current ones.
If Go was dropped because its first analysis failed, or the Go job is too slow, an advanced-setup workflow would show the error and let you set the Go toolchain, build-mode and a path filter yourself. Adding gosec to lint-static is a lighter extra, but it doesn't replace CodeQL's data-flow queries.
Confirmed from the side I can see. The last 30 code scanning analyses on this repository are 15 for
/language:actionsand 15 for/language:ruby, with none for Go or JavaScript, while GitHub reports the repository as about 99% Go. On pull requests the checks areAnalyze (actions)andAnalyze (ruby)only.I cannot read or change the default setup configuration, it needs repository admin, so this one is for @kevincodex1: Settings, Code security, CodeQL analysis, edit the configuration and tick Go and JavaScript/TypeScript. The first Go run is worth watching, since the guess above that Go was dropped after a failed or slow first analysis is plausible.
Labelled
bug. No code change is needed, so I am not addingissue-approved.