Create codeql github action (#17107)
Summary of the issue:
CodeQL scanning was set up via the UI.
We want to configure this via YML, so we can set the branches that it runs on more easily.
Description of development approach
Uses default template to set up python scanning on master, beta,rc