Skip to content

Fix CodeQL JavaScript parse warnings and scan .ado/scripts - #402

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/codeql-js-warnings
Nov 1, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/codeql-js-warnings

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

The first CodeQL JavaScript scan of main after #401 reported 49
"Could not process some files due to syntax errors" diagnostics, and it
skipped our CI scripts.

  • Parse warnings. 46 came from tools/hermes-parser, upstream tooling
    written in Flow syntax that CodeQL cannot parse; we do not ship it. The
    rest came from the 00-header.js and 99-footer.js files in
    lib/InternalJavaScript and API/hermes/extensions, which are fragments
    the build wraps around the other files. Both are now excluded on GitHub
    and in the Azure DevOps CodeQL 3000 filters.
  • CI scripts. On Linux runners the JavaScript extractor skips folders
    whose names start with a dot, except .github, so .ado/scripts
    (build.js, setVersionNumber.js, npm-source-lint.ts) was never
    scanned on GitHub. The JavaScript job now uses
    codeql-config-javascript.yml, which adds paths: [., .ado/scripts].
    Other languages keep the shared config: with those paths the C/C++
    no-build extractor finds no source files.
  • Docs. AGENTS.md mentions the new config file.

Test Plan

Local CodeQL CLI 2.27.3 (the GitHub runner version) on a checkout of main
with its dot-folders marked hidden, as on Linux:

  • JavaScript, current config: 448 files, 190 from tools/hermes-parser, 4
    header/footer files, none from .ado (matches the GitHub log).
  • JavaScript, new config: 262 files; none from tools/hermes-parser or the
    header/footer files; the 8 .ado/scripts files added; all 35 lib/ and
    API/ files kept.
  • C/C++ (--build-mode=none): shared config extracts 1,786 files; adding
    paths: [., .ado/scripts] fails with "found 0 source files".
  • Azure filters with LGTM_INDEX_FILTERS and .ado not hidden (as on the
    Windows agents): JavaScript, Python and Actions databases finalize; the
    excluded paths are absent and .ado/scripts is present.
  • actionlint .github/workflows/codeql.yml (v1.7.12): passed.
  • The exclusion lists in the three files are identical.

This PR's CodeQL run should report no syntax-error diagnostics and scan 3 of
3 TypeScript files.

Microsoft Reviewers: Open in CodeFlow

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>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@vmoroz
Vladimir Morozov (vmoroz) merged commit ceffb27 into microsoft:main Nov 1, 2026
19 checks passed
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Benchmark Results

Total benchmarks: 204

Inputs: baseline/baseline.json, bench_result.json

v8 (6176ms, 5201ms) -15.8%
v8 hermes (CI) hermes (CI)
v8-crypto 622.6ms 397.4ms
v8-deltablue 739.4ms 637.8ms
v8-raytrace 127.8ms 93.8ms
v8-regexp 593ms 543.2ms
v8-richards 937ms 734.6ms
v8-splay 225.2ms 206.4ms
v8-crypto (static) 452ms 312.8ms
v8-deltablue (static) 661.6ms 564.4ms
v8-raytrace (static) 91.8ms 84.2ms
v8-regexp (static) 749.2ms 714ms
v8-richards (static) 781.4ms 703.4ms
v8-splay (static) 195ms 209ms
test-suites (317886ms, 245338ms) -22.8%
test-suites hermes (CI) hermes (CI)
box2d 2949.8ms 1921.2ms
earley-boyer 2564.8ms 1868ms
navier-stokes 5743.8ms 3239.6ms
pdfjs 1038.2ms 695.4ms
gbemu 2296ms 1654.4ms
code-load 4472.8ms 4540.6ms
typescript 3381.8ms 2863.6ms
simpleSum 8855.4ms 5898.8ms
propAccess 2691.2ms 2078.6ms
allocObj 252ms 195.2ms
allocObjLit 6371.8ms 4629.6ms
allocNewObj 20053ms 14594.6ms
allocArray 249ms 193.8ms
allocNewArray 34956.8ms 24768.4ms
arrayRead 115.6ms 75.6ms
arrayReadByIndex 550ms 298ms
largeArrayRead 827.2ms 427.2ms
arrayWrite 261.8ms 175ms
largeArrayWrite 2218ms 1436.4ms
interp-dispatch 2880ms 1861.6ms
wb-perf 8327ms 5136.4ms
arrayReverse 40.6ms 30.6ms
arrayMap 1472.6ms 1046.2ms
arrayIndexOf 143.2ms 130.6ms
arrayLastIndexOf 148.6ms 130.2ms
arrayEvery 2308.8ms 1496ms
arraySome 2174.4ms 1489ms
arrayFill 2401.2ms 1679ms
arrayFilter 1866.4ms 1301.8ms
arrayFind 3207ms 2461.4ms
arrayFindIndex 3322ms 2465.6ms
arrayPop 1031.4ms 709.8ms
arrayReduce 1994.2ms 1453.8ms
arrayReduceRight 2075.8ms 1410.6ms
arrayShift 2065.8ms 1424.2ms
arrayUnshift 2109.4ms 1415.6ms
arrayIncludes 1216.6ms 801.6ms
arrayFrom 1102.8ms 881.8ms
arrayCopyWithin 1487ms 1031.8ms
stringFromCharCode 92.6ms 66.2ms
arraySlice 786.2ms 601.8ms
arraySplice 26.8ms 29.4ms
arrayOf 1048.8ms 702.4ms
stringCharAt 1346.6ms 872.4ms
stringMatch 3192.4ms 2306.6ms
stringSearch 3508.2ms 2313.6ms
stringStartsWith 701ms 413ms
stringEndsWith 650.4ms 376.6ms
stringIncludes 1520.6ms 1458.8ms
stringIndexOf 1555.6ms 1773.6ms
stringLastIndexOf 1821.4ms 1653.2ms
stringSplit 822ms 574.8ms
stringSlice 490ms 392.4ms
stringPadStart 2910.8ms 2122ms
stringPadEnd 2910ms 2124ms
regExpMatch 1506.2ms 1210.4ms
regExpSearch 1227ms 1321.2ms
regExpToString 1204ms 910.4ms
stringReplace 1394.8ms 1574.2ms
regExpReplace 3309.2ms 683ms
regExpFlags 956.8ms 677.2ms
regExpSplit 1307.8ms 980.6ms
numberArrayReadWrite 2477.8ms 1770.8ms
protoCache 3594.6ms 1804.4ms
box2d (static) 1792.6ms 1579ms
earley-boyer (static) 1875.6ms 1581ms
navier-stokes (static) 3410.2ms 2644.8ms
pdfjs (static) 812.8ms 648.8ms
gbemu (static) 1797ms 1393ms
code-load (static) 4199.2ms 4280.2ms
typescript (static) 2685.6ms 2500.4ms
simpleSum (static) 936.2ms 668.4ms
propAccess (static) 2298ms 2101.8ms
allocObj (static) 0.2ms 0ms
allocObjLit (static) 4154.4ms 3642.8ms
allocNewObj (static) 15749.2ms 13463.6ms
allocArray (static) 0.6ms 0.6ms
allocNewArray (static) 28494.2ms 22532ms
arrayRead (static) 74.2ms 59ms
arrayReadByIndex (static) 453.2ms 383.4ms
largeArrayRead (static) 552.2ms 458.4ms
arrayWrite (static) 178.4ms 131.8ms
largeArrayWrite (static) 1568.6ms 1188.8ms
interp-dispatch (static) 1918.8ms 1548.6ms
wb-perf (static) 8991.2ms 7531ms
arrayReverse (static) 37ms 30.8ms
arrayMap (static) 1064.8ms 859.2ms
arrayIndexOf (static) 128.2ms 126ms
arrayLastIndexOf (static) 138.8ms 128.2ms
arrayEvery (static) 1397.6ms 1175.4ms
arraySome (static) 1406.6ms 1180.6ms
arrayFill (static) 1969.2ms 1654.6ms
arrayFilter (static) 1061ms 877ms
arrayFind (static) 2242.2ms 1955.8ms
arrayFindIndex (static) 2235.8ms 1978.2ms
arrayPop (static) 878ms 688.6ms
arrayReduce (static) 1311.8ms 1226.4ms
arrayReduceRight (static) 1322.6ms 1195.8ms
arrayShift (static) 1512ms 1245.6ms
arrayUnshift (static) 1568.2ms 1290.2ms
arrayIncludes (static) 963.4ms 751.2ms
arrayFrom (static) 1030.6ms 773.4ms
arrayCopyWithin (static) 1109.6ms 901.8ms
stringFromCharCode (static) 77ms 55ms
arraySlice (static) 571.6ms 518ms
arraySplice (static) 26ms 28.2ms
arrayOf (static) 868.8ms 655ms
stringCharAt (static) 1100.6ms 773ms
stringMatch (static) 2227.6ms 2291.2ms
stringSearch (static) 2219.2ms 2287.4ms
stringStartsWith (static) 494.2ms 399.6ms
stringEndsWith (static) 457.8ms 351ms
stringIncludes (static) 1437.4ms 1429.2ms
stringIndexOf (static) 1440.8ms 2458.4ms
stringLastIndexOf (static) 1956.6ms 1991.6ms
stringSplit (static) 651.2ms 555ms
stringSlice (static) 445.6ms 363ms
stringPadStart (static) 2294.4ms 1995.4ms
stringPadEnd (static) 2499.2ms 2022.6ms
regExpMatch (static) 1483.2ms 1191.6ms
regExpSearch (static) 1296.2ms 1319.6ms
regExpToString (static) 1326.6ms 1105ms
stringReplace (static) 1455.6ms 1692.2ms
regExpReplace (static) 851.8ms 661.2ms
regExpFlags (static) 870.6ms 642.8ms
regExpSplit (static) 1200ms 929.6ms
numberArrayReadWrite (static) 2132.8ms 1572.2ms
protoCache (static) 3595.8ms 3049ms
micros (60876ms, 58141ms) -4.5%
micros hermes (CI) hermes (CI)
getNodeById.js 5273ms 3539.8ms
setInsert.js 2864.8ms 2130.6ms
stringify-number.js 1823.4ms 1351.6ms
typed-array-sort.js 22381ms 22982.2ms
getNodeById.js (static) 3941ms 3162.4ms
setInsert.js (static) 2517.6ms 1831.4ms
stringify-number.js (static) 1663.6ms 1182.8ms
typed-array-sort.js (static) 20411.4ms 21960.6ms
jit-benches (8563ms, 5915ms) -30.9%
jit-benches hermes (CI) hermes (CI)
idisp.js 2810.2ms 1857.2ms
idispn.js 3395.8ms 2199.6ms
idisp.js (static) 1906ms 1549.2ms
idispn.js (static) 450.8ms 308.8ms
many-subclasses (73437ms, 57178ms) -22.1%
many-subclasses hermes (CI) hermes (CI)
many.js 19104.8ms 16005.4ms
many-sh-1.js 7322.8ms 5396ms
many-sh-2.js 7329ms 5381.6ms
many-sh-3.js 7083.6ms 5231.2ms
many-sh-4.js 7235ms 5192.6ms
many.js (static) 15996ms 12146.4ms
many-sh-1.js (static) 2285.2ms 1834.2ms
many-sh-2.js (static) 2387ms 2116.4ms
many-sh-3.js (static) 2347.2ms 1940.4ms
many-sh-4.js (static) 2346ms 1933.8ms
map-objects (3627ms, 2888ms) -20.4%
map-objects hermes (CI) hermes (CI)
map-objects-untyped.js 1023.6ms 769ms
map-objects-typed.js 957.6ms 721ms
map-objects-untyped.js (static) 917.2ms 770.4ms
map-objects-typed.js (static) 728.8ms 627.8ms
map-strings (4335ms, 3717ms) -14.3%
map-strings hermes (CI) hermes (CI)
map-strings-untyped.js 1196.8ms 988ms
map-strings-typed.js 1139.2ms 938.6ms
map-strings-untyped.js (static) 1092.2ms 969.2ms
map-strings-typed.js (static) 906.8ms 821ms
nbody (3448ms, 2221ms) -35.6%
nbody hermes (CI) hermes (CI)
original/nbody.js 839.6ms 497.6ms
fully-typed/nbody.js 710ms 397ms
fully-typed/nbody.ts 865.2ms 493.8ms
original/nbody.js (static) 449.2ms 359.8ms
fully-typed/nbody.js (static) 135ms 109ms
fully-typed/nbody.ts (static) 449.2ms 363.6ms
string-switch (6503ms, 5551ms) -14.6%
string-switch (string-switch/plain) hermes (CI) hermes (CI)
bench.js 1316ms 993.8ms
bench.js (static) 5187ms 4557.4ms
raytracer (5608ms, 4584ms) -18.3%
raytracer (raytracer/original) hermes (CI) hermes (CI)
bench-raytracer.js 1550.4ms 1207.8ms
raytracer.ts 1667.6ms 1240.6ms
bench-raytracer.js (static) 1198.4ms 1059.8ms
raytracer.ts (static) 1191.8ms 1075.8ms
MiniReact (30332ms, 25385ms) -16.3%
MiniReact hermes (CI) hermes (CI)
no-objects/out/simple-stripped.js 2239.2ms 1788.6ms
no-objects/out/simple-lowered.js 2270.8ms 1829ms
no-objects/out/music-stripped.js 42.6ms 41.8ms
no-objects/out/music-lowered.js 47.2ms 45ms
no-deps/stripped/MiniReact.js 5004ms 3899.6ms
no-deps/MiniReact.js 5256.2ms 3771.6ms
no-objects/out/simple.js 2260.4ms 1805.2ms
no-objects/out/music.js 45.6ms 44.6ms
no-objects/out/simple-stripped.js (static) 1725.2ms 1559.8ms
no-objects/out/simple-lowered.js (static) 1725.4ms 1649.2ms
no-objects/out/music-stripped.js (static) 18.8ms 20.2ms
no-objects/out/music-lowered.js (static) 19.4ms 20ms
no-deps/stripped/MiniReact.js (static) 4024.8ms 3730.6ms
no-deps/MiniReact.js (static) 3938.2ms 3627.6ms
no-objects/out/simple.js (static) 1695.2ms 1532.2ms
no-objects/out/music.js (static) 19ms 20.4ms
widgets (12934ms, 10269ms) -20.6%
widgets hermes (CI) hermes (CI)
simple-classes/widgets.js 1758.2ms 1182.4ms
original/es5/widgets.js 2798.8ms 2136.2ms
single-file/es5/widgets.js 2775.2ms 2140.8ms
simple-classes/widgets.js (static) 1012ms 891ms
original/es5/widgets.js (static) 2283.2ms 1954.4ms
single-file/es5/widgets.js (static) 2306.2ms 1963.8ms

@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/codeql-js-warnings branch November 1, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants