Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat): Assessment report tool #89

Merged
merged 10 commits into from
May 23, 2024
Merged

(feat): Assessment report tool #89

merged 10 commits into from
May 23, 2024

Conversation

TylerMizuyabu
Copy link
Contributor

@TylerMizuyabu TylerMizuyabu commented May 23, 2024

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.

@blastdan
Copy link
Contributor

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.

@TylerMizuyabu
Copy link
Contributor Author

TylerMizuyabu commented May 23, 2024

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.

TylerMizuyabu and others added 2 commits May 23, 2024 10:35
…rganization.go

Co-authored-by: Ben Zarboni <99673202+bzarboni1@users.noreply.github.com>
Signed-off-by: TylerMizuyabu <tyler.mizuyabu@focisolutions.com>
…epository.go

Co-authored-by: Ben Zarboni <99673202+bzarboni1@users.noreply.github.com>
Signed-off-by: TylerMizuyabu <tyler.mizuyabu@focisolutions.com>
bzarboni1
bzarboni1 previously approved these changes May 23, 2024
bzarboni1
bzarboni1 previously approved these changes May 23, 2024
@TylerMizuyabu TylerMizuyabu merged commit 3fba6ac into main May 23, 2024
3 checks passed
@TylerMizuyabu TylerMizuyabu deleted the assessment-report-tool branch May 23, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants