Closed TylerMizuyabu closed 5 months ago
Do you know if there is a way to use default credentials using the GH CLI that is easy? Just thinking about keeping the auth methods for everything the same.
Do you know if there is a way to use default credentials using the GH CLI that is easy? Just thinking about keeping the auth methods for everything the same.
After looking through the gh cli docs the best I think we could do would be to change the env var we use to be GH_TOKEN
to match the variable used by github. I'm not seeing anything from them where they setup default credentials like gcloud does.
edit: We could do something similar to what their tf provider does and execute a gh auth token command from the cli and use the token output for auth. But we will need the token, otherwise some info about the org and repositories won't be returned. Also something to note would be that this method would require users to have the gh cli installed.
Introduces a command to the gh_foundations cli tool to run checks against your github organization and repositories then output a report in a json format. The command requires either
GITHUB_TOKEN
environment variable to be set or gh cli to be installed and for the user to be logged in to authenticate against githubs REST api. For it's first iteration there is only one set of checks performed against the Gov of Canada's gaurdrails. More check types can be added later along with a command line option to configure what subset of checks get run or if all of them get run.