Description
Description of the issue
The TypeScript repo uses the CodeQL action, with the default javascript-queries
set. For TypeScript 5.0, we're going to be changing the codebase from namespaces to modules. However, in my testing of that new compiler, I noticed that the CodeQL workflow would always time out at 6 hours. See: https://github.com/microsoft/TypeScript/actions/runs/3229429756/jobs/5286722214
I ran CodeQL locally, and it looks like it gets stuck on these queries:
TaintedPath.ql : iteration 2 of Configuration#e7756e4f::appendStep#5#fffff etc
CommandInjection.ql : iteration 26 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
CodeInjection.ql : iteration 26 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
ImproperCodeSanitization.ql : iteration 25 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
UnsafeDynamicMethodAccess.ql : iteration 20 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
CleartextLogging.ql : iteration 24 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
RegExpInjection.ql : iteration 26 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
UnvalidatedDynamicMethodCall.ql: iteration 12 of Configuration#e7756e4f::appendStep#5#fffff etc
InsecureDownload.ql : iteration 34 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
PrototypePollutingAssignment.ql: iteration 21 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
RequestForgery.ql : iteration 26 of Configuration#e7756e4f::reachesReturn#4#ffff#reorder_3_0_1_2 etc
Letting these run to completion overnight took upwards of 9 hours on my beefy machine.
I ignored these queries on my fork of TypeScript, and that brought the analysis time down to about 7 minutes on the builder: https://github.com/jakebailey/TypeScript/actions/runs/3298853660/jobs/5441505083
I'm not quite sure what the problem is here; it could be the circularities in the new codebase (which are now explicit, rather than being hidden in namespaces without explicit imports). Or, it's just that now there are imports, which exposes the dependencies between files properly (for the same reason).
The branch to test is located here: https://github.com/jakebailey/TypeScript/tree/typeformer-2