Repository navigation
CORE-6214: let Terraform Checks fetch private git modules over SSH - #172
Conversation
run_terraform_checks took no secrets, so init:terraform couldn't download module sources from private github.com repositories, such as [email protected]:OpenSesame/devops-terraform-modules.git//... that identity-infrastructure uses. Repo Checks' Terraform job would always fail at Initialize there, and a contract exception doesn't help because CI still runs init. run_terraform_checks now takes an optional ORG_READ_ONLY_SSH_KEY. When it is set, configure-github-ssh 1.0.0 installs it with GitHub's pinned host keys just before Initialize, as run_repo_validation and tf_plan_single_root do, and the key and SSH config are removed right after, so Validate, tflint and Checkov never run with the org key installed. If SSH setup fails, Initialize and Validate are skipped. Without the secret the job behaves as before. run_repo_checks passes the secret it already declares for Standard through to the Terraform job. Releases run_terraform_checks 1.1.0 and run_repo_checks 1.1.0, which calls it from the same commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
TagsThe following tags will be created on main after merge 🏷️ |
✅ Semgrep Security Scan Passed🎉 No security issues found! View run |
|
Claude Code wrote Code Rabbit and I reviewed. No direct AWS prod access. Merging without additional human review. |
PR Summary
Jira: https://opensesame.atlassian.net/browse/CORE-6214
Description of Changes
CORE-6214 moves OpenSesame/identity-infrastructure onto Repo Checks. Its Terraform roots and
terraform/modules/common-configuse module sources from the privateOpenSesame/devops-terraform-modulesrepository over SSH.run_terraform_checks1.0.3 takes nosecrets, so
init:terraformcan't download them, and the Terraform job would always fail atInitialize there. A contract exception doesn't help, because CI still runs init.
run_terraform_checks1.1.0:ORG_READ_ONLY_SSH_KEYsecret;configure-github-ssh1.0.0, which pins GitHub's hostkeys, just before Initialize, as
run_repo_validationandtf_plan_single_rootdo;tflint and Checkov never run with the org key installed;
run_repo_checks1.1.0 passes theORG_READ_ONLY_SSH_KEYsecret it already declares for Standardthrough to the Terraform job.
The READMEs, including the
run_terraform_checksContract section, and both changelogs are updated.Versioning
v:wf/run_terraform_checks/1.1.0v:wf/run_repo_checks/1.1.0Both are minor bumps: a new optional secret, with no change when it isn't passed.
Dependencies of PR
None. identity-infrastructure's CORE-6214 Repo Checks onboarding needs this released first.
Testing
npm run checkpasses: actionlint, zizmor, markdownlint, prettier, eslint and 293 tests.the cleanup runs between Initialize and Validate/Lint/Scan, and that Repo Checks passes the
secret to the Terraform job.
PR will do that.
🤖 Generated with Claude Code
Summary by CodeRabbit