You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: add CodeQL or equivalent security scanning workflow #665
Add automated security scanning to the CI pipeline. CodeQL (or equivalent) should run on PRs and on a weekly schedule to catch common vulnerability patterns in JavaScript and Python.
Hi @cv, are you currently working on this or planning to? I have a basic CodeQL workflow ready, in case you have not yet started working on this or if you have moved on from it. Thanks!
@albertrial we're planning to do a big move to TypeScript with #924, then throw as many scanners and linters and tooling at it as we can get our hands on. Please hold! :)
Updating the earlier thinking here: I would not block this on a future TS migration anymore. Based on the repo as it exists today, the right implementation is a hybrid scan setup:
CodeQL for JavaScript/TypeScript (the bulk of the repo now: bin/, root src/, nemoclaw/src/, test/, JS/TS scripts)
A shell-aware scanner for Bash (scripts/*.sh, install.sh, uninstall.sh, test/**/*.sh, shell embedded in workflows)
Optionally Python CodeQL for the smaller Python footprint that still exists (docs/_ext/**, docs/conf.py, scripts/*.py)
I would implement this as a dedicated workflow like .github/workflows/code-scanning.yaml, instead of folding it into pr.yaml / main.yaml, because code scanning needs different permissions and we also want a weekly schedule without re-running the full sandbox/E2E matrix.
CodeQL will not cover Bash, which is important here because a lot of the operational and security-sensitive glue is in shell scripts.
So I would pair CodeQL with one of these:
ShellCheck + SARIF upload (best fit with what we already do)
we already run ShellCheck via prek
add a CI job that runs ShellCheck in SARIF mode and uploads results with github/codeql-action/upload-sarif@v4
that gets shell findings into the GitHub Security / Code Scanning UI
Semgrep with shell rules + SARIF upload
slightly broader than ShellCheck, but also more tuning/noise
If we want the smallest first step, I’d do CodeQL for JS/TS now and either:
keep shell security checks in existing CI initially, or
add ShellCheck SARIF in the same PR if we want shell alerts to land in the Security tab too.
Repo-specific notes
We already have merge-gating checks in .github/actions/basic-checks/action.yaml (prek, ShellCheck, hadolint, gitleaks, TS build/checks). I would keep those as the gating path.
The new workflow’s job is security reporting (PR annotations + Security tab), not replacing the existing lint/test pipeline.
I would not copy the paths-ignore rules from main.yaml, because those would accidentally skip the Python code under docs/_ext/**.
To keep alert noise manageable, start with CodeQL’s security-and-quality pack, baseline the initial findings, and only then decide if we want anything more aggressive.
So the concrete implementation sequence would be:
add .github/workflows/code-scanning.yaml
wire up CodeQL for javascript-typescript
optionally add python to the same matrix
add a shell scan job (preferably ShellCheck -> SARIF upload)
verify with a draft PR that we get alerts in the GitHub Security UI
That would align the scanning with the repo we actually have now: mostly JS/TS, a meaningful amount of Bash, and some Python tooling.
Hi @cv, I’d like to take this on following your latest recommendation: a dedicated .github/workflows/code-scanning.yaml with CodeQL for JS/TS, likely Python, and ShellCheck SARIF upload for Bash. I’ll keep the existing basic checks as the gating path and make this workflow focused on code scanning/security reporting. Please let me know if you prefer a smaller first PR with only CodeQL JS/TS.
Activity
albertrial commentedon Mar 26, 2026
Hi @cv, are you currently working on this or planning to? I have a basic CodeQL workflow ready, in case you have not yet started working on this or if you have moved on from it. Thanks!
cv commentedon Mar 26, 2026
@albertrial we're planning to do a big move to TypeScript with #924, then throw as many scanners and linters and tooling at it as we can get our hands on. Please hold! :)
cv commentedon Apr 8, 2026
Updating the earlier thinking here: I would not block this on a future TS migration anymore. Based on the repo as it exists today, the right implementation is a hybrid scan setup:
bin/, rootsrc/,nemoclaw/src/,test/, JS/TS scripts)scripts/*.sh,install.sh,uninstall.sh,test/**/*.sh, shell embedded in workflows)docs/_ext/**,docs/conf.py,scripts/*.py)I would implement this as a dedicated workflow like
.github/workflows/code-scanning.yaml, instead of folding it intopr.yaml/main.yaml, because code scanning needs different permissions and we also want a weekly schedule without re-running the full sandbox/E2E matrix.Rough shape:
Job 1: CodeQL
Use a language matrix:
javascript-typescriptpython(optional, but still cheap and relevant for the docs/tooling Python we have)For this repo, that means scanning at least:
bin/**/*.jssrc/**/*.tsnemoclaw/src/**/*.tstest/**/*.jsscripts/**/*.jsdocs/_ext/**/*.pydocs/conf.pyscripts/*.pyFor JS/TS/Python, CodeQL can analyze source directly, so this can stay fairly simple:
Job 2: Shell scanning
CodeQL will not cover Bash, which is important here because a lot of the operational and security-sensitive glue is in shell scripts.
So I would pair CodeQL with one of these:
ShellCheck + SARIF upload (best fit with what we already do)
prekgithub/codeql-action/upload-sarif@v4Semgrep with shell rules + SARIF upload
If we want the smallest first step, I’d do CodeQL for JS/TS now and either:
Repo-specific notes
.github/actions/basic-checks/action.yaml(prek, ShellCheck, hadolint, gitleaks, TS build/checks). I would keep those as the gating path.paths-ignorerules frommain.yaml, because those would accidentally skip the Python code underdocs/_ext/**.security-and-qualitypack, baseline the initial findings, and only then decide if we want anything more aggressive.So the concrete implementation sequence would be:
.github/workflows/code-scanning.yamljavascript-typescriptpythonto the same matrixThat would align the scanning with the repo we actually have now: mostly JS/TS, a meaningful amount of Bash, and some Python tooling.
ChunkyMonkey11 commentedon May 7, 2026
Hi @cv, I’d like to take this on following your latest recommendation: a dedicated
.github/workflows/code-scanning.yamlwith CodeQL for JS/TS, likely Python, and ShellCheck SARIF upload for Bash. I’ll keep the existing basic checks as the gating path and make this workflow focused on code scanning/security reporting. Please let me know if you prefer a smaller first PR with only CodeQL JS/TS.ci: add code scanning workflow
ci: add code scanning workflow (#3202)