Repository navigation
Fix CodeQL JavaScript parse warnings and scan .ado/scripts - #402
Merged
Vladimir Morozov (vmoroz) merged 1 commit intoNov 1, 2026
Merged
Conversation
The JavaScript scan reported 49 syntax-error diagnostics: upstream tools/hermes-parser uses Flow syntax CodeQL cannot parse, and the InternalJavaScript and extensions header/footer files are fragments the build wraps around other files. Exclude them on GitHub and in the Azure DevOps CodeQL 3000 filters. On Linux runners the JavaScript extractor skips dot-folders other than .github, so .ado/scripts was never scanned on GitHub. Give the JavaScript job its own config that lists .ado/scripts in paths. Other languages keep the shared config: with those paths the C/C++ no-build extractor finds no source files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the CodeQL configuration changes.
No open issues 🎉
What changed in this PR
Refines the CodeQL setup introduced in #401 to address JavaScript parse warnings and include .ado/scripts in GitHub scanning without changing C/C++ extraction behavior.
Changes:
- Adds a JavaScript-specific configuration that explicitly includes
.ado/scripts. - Aligns GitHub and Azure DevOps exclusions for Flow-based parser tooling and header/footer fragments.
- Documents the language-specific scanning configuration.
| File | Description |
|---|---|
| AGENTS.md | Documents the JavaScript-specific config and CI script coverage. |
| .github/workflows/codeql.yml | Selects the JavaScript config only for JavaScript/TypeScript. |
| .github/codeql/codeql-config.yml | Excludes parser tooling and header/footer fragments. |
| .github/codeql/codeql-config-javascript.yml | Adds explicit CI script inclusion with matching exclusions. |
| .ado/codeql-variables.yml | Aligns Azure DevOps extraction filters with GitHub exclusions. |
Review effort: Balanced
Vladimir Morozov (vmoroz)
enabled auto-merge (squash)
November 1, 2026 15:27
Khalef Hosany (Khalef1)
approved these changes
Nov 1, 2026
anuagragith
approved these changes
Nov 1, 2026
Benchmark ResultsTotal benchmarks: 204 Inputs: baseline/baseline.json, bench_result.json v8 (6176ms, 5201ms) -15.8%
test-suites (317886ms, 245338ms) -22.8%
micros (60876ms, 58141ms) -4.5%
jit-benches (8563ms, 5915ms) -30.9%
many-subclasses (73437ms, 57178ms) -22.1%
map-objects (3627ms, 2888ms) -20.4%
map-strings (4335ms, 3717ms) -14.3%
nbody (3448ms, 2221ms) -35.6%
string-switch (6503ms, 5551ms) -14.6%
raytracer (5608ms, 4584ms) -18.3%
MiniReact (30332ms, 25385ms) -16.3%
widgets (12934ms, 10269ms) -20.6%
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The first CodeQL JavaScript scan of
mainafter #401 reported 49"Could not process some files due to syntax errors" diagnostics, and it
skipped our CI scripts.
tools/hermes-parser, upstream toolingwritten in Flow syntax that CodeQL cannot parse; we do not ship it. The
rest came from the
00-header.jsand99-footer.jsfiles inlib/InternalJavaScriptandAPI/hermes/extensions, which are fragmentsthe build wraps around the other files. Both are now excluded on GitHub
and in the Azure DevOps CodeQL 3000 filters.
whose names start with a dot, except
.github, so.ado/scripts(
build.js,setVersionNumber.js,npm-source-lint.ts) was neverscanned on GitHub. The JavaScript job now uses
codeql-config-javascript.yml, which addspaths: [., .ado/scripts].Other languages keep the shared config: with those
pathsthe C/C++no-build extractor finds no source files.
Test Plan
Local CodeQL CLI 2.27.3 (the GitHub runner version) on a checkout of
mainwith its dot-folders marked hidden, as on Linux:
tools/hermes-parser, 4header/footer files, none from
.ado(matches the GitHub log).tools/hermes-parseror theheader/footer files; the 8
.ado/scriptsfiles added; all 35lib/andAPI/files kept.--build-mode=none): shared config extracts 1,786 files; addingpaths: [., .ado/scripts]fails with "found 0 source files".LGTM_INDEX_FILTERSand.adonot hidden (as on theWindows agents): JavaScript, Python and Actions databases finalize; the
excluded paths are absent and
.ado/scriptsis present.actionlint .github/workflows/codeql.yml(v1.7.12): passed.This PR's CodeQL run should report no syntax-error diagnostics and scan 3 of
3 TypeScript files.
Microsoft Reviewers: Open in CodeFlow