So, CodeQL found a vulnerability in your code, you avoided the warning by adding an intermediate variable (but ignored the vulnerability), and you are frustrated with CodeQL, not the person who added this variable?
If I read it correctly, the comment suggesting the intermediate variable was from CodeQL itself.
If I read it correctly, the comment suggesting the intermediate variable was from CodeQL itself.