Repository navigation
fix(toolkit): keep everyone's setup off the repository they cloned - #14
Merged
Merged
Conversation
Bootstrap wrote the SSH key to the GitHub secrets of the origin remote and built an Azure identity trusting that same repository. Anyone who cloned this repository targeted its owner: HTTP 403 on the secret, and an identity with Contributor on their resource group trusting someone else's workflows. Nothing read those secrets or that identity: Infra and Ansible run from the workstation with the local key, the runner registers on GITHUB_RUNNER_URL. - drop terraform/bootstrap (CI identity) and the GitHub secret and variable - Bootstrap only creates the local SSH key, the menu runs it directly - Setup chains SSH key, infra, ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Someone who cloned this repository got
HTTP 403at Bootstrap:gh secret setran without-R, so it wrote to theoriginremote, the repository owner's. The Bootstrap Terraform did the same withgithub_repo_slug: it gave the person's resource group a Contributor identity trusting the owner's workflows.Nothing used them. Infra and Ansible run from the workstation with the local SSH key, and the runner registers on
GITHUB_RUNNER_URL, the target picked in Setup.Changes:
terraform/bootstrapremoved (Azure identity for a deploy CI), withTF_VAR_github_repositoryghneededmake bootstrap-ssh-keyis the only Bootstrap target.env.exampleand the dev Terraform comments followdocs/CONSIGNES.mdstill describes a CI-driven deploy: left as is, it is the assignment text.Tested under bash 3.2 in Docker: key created then reused on a second run, wrong action exits 2, menu entry 2 creates the key.
shellcheck -x,bash -nunder 3.2 andterraform fmt -checkpass. Infra and Ansible were not run.