Skip to content

fix(ci): verify SSH host keys in reusable mirror workflow - #769

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/mirror-ssh-verification-762
Sep 12, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
fix/mirror-ssh-verification-762

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Fixes #762 - Verify SSH host keys in reusable mirror workflow

Replaces unchecked ssh-keyscan output with verification against approved,
pinned SSH host fingerprints before git push.

  • Each mirror job verifies host fingerprint before push
  • GitLab, Bitbucket, Codeberg: default fingerprints with override via vars
  • SourceHut, Disroot, Gitea: require explicit fingerprint via vars
  • Uses StrictHostKeyChecking=yes with verified known_hosts
  • Mirror jobs fail closed on fingerprint mismatch
  • GitLab mirror remains advisory (continue-on-error)
  • Added documentation in docs/MIRROR-HOST-VERIFICATION.adoc
  • Added regression tests in scripts/tests/science-ci-security-test.*

Replaces unchecked ssh-keyscan output with verification against approved,
pinned SSH host fingerprints before git push.

- Each mirror job verifies host fingerprint before push
- GitLab, Bitbucket, Codeberg: default fingerprints with override via vars
- SourceHut, Disroot, Gitea: require explicit fingerprint via vars
- Uses StrictHostKeyChecking=yes with verified known_hosts
- Mirror jobs fail closed on fingerprint mismatch
- GitLab mirror remains advisory (continue-on-error)
- Added documentation in docs/MIRROR-HOST-VERIFICATION.adoc
- Added regression tests in scripts/tests/science-ci-security-test.*

Fixes #762

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: eae87269-aae9-4fd6-b84c-abfe855ef9b7

📥 Commits

Reviewing files that changed from the base of the PR and between 1f3eef6 and fed2736.

📒 Files selected for processing (4)
  • .github/workflows/mirror-reusable.yml
  • docs/MIRROR-HOST-VERIFICATION.adoc
  • scripts/tests/science-ci-security-test.rb
  • scripts/tests/science-ci-security-test.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 4394a3b into main Sep 12, 2026
22 of 25 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath deleted the fix/mirror-ssh-verification-762 branch September 12, 2026 11:18
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.

Verify SSH host keys in reusable mirror workflow

1 participant