Skip to content

fix(toolkit): keep everyone's setup off the repository they cloned - #14

Merged
WhiteMuush merged 1 commit into
mainfrom
fix/drop-ci-identity
Oct 2, 2026
Merged

WhiteMuush merged 1 commit into
mainfrom
fix/drop-ci-identity

Conversation

@WhiteMuush

Copy link
Copy Markdown
Member

Someone who cloned this repository got HTTP 403 at Bootstrap: gh secret set ran without -R, so it wrote to the origin remote, the repository owner's. The Bootstrap Terraform did the same with github_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/bootstrap removed (Azure identity for a deploy CI), with TF_VAR_github_repository
  • Bootstrap only creates the local SSH key: no GitHub secret or variable, no gh needed
  • the menu runs it directly, make bootstrap-ssh-key is the only Bootstrap target
  • Setup chains SSH key, infra, ansible
  • README, .env.example and the dev Terraform comments follow

docs/CONSIGNES.md still 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 -n under 3.2 and terraform fmt -check pass. Infra and Ansible were not run.

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
@WhiteMuush
WhiteMuush merged commit b0d2077 into main Oct 2, 2026
@WhiteMuush
WhiteMuush deleted the fix/drop-ci-identity branch October 2, 2026 08:16
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.

1 participant