codeql-action icon indicating copy to clipboard operation
codeql-action copied to clipboard

Configuration IO is synchronous

Open RA80533 opened this issue 3 years ago • 1 comments

  • https://github.com/github/codeql-action/blob/f00bafbde1cf72f723cff6bcb0fa170325b2edb9/src/config-utils.ts#L1074
  • https://github.com/github/codeql-action/blob/f00bafbde1cf72f723cff6bcb0fa170325b2edb9/src/config-utils.ts#L1087

Both are annotated as asynchronous functions but neither utilizes asynchronous IO.

RA80533 avatar May 08 '21 05:05 RA80533

Nice catch. Not sure exactly what happened here but I'd guess they were genuinely asynchronous at some point in the past. This looks like a good candidate for a CodeQL query to find unnecessary async methods. I'm surprised that doesn't exist already to be honest as it sounds like it could be broadly useful.

robertbrignull avatar May 10 '21 08:05 robertbrignull