Repository navigation
Add WireGuard SSH GitHub Action - #5
Merged
Merged
Conversation
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.
Why
Deployments need SSH access to servers that restrict ingress to trusted source addresses. GitHub-hosted runner egress addresses are dynamic and published in broad ranges, so they are not a practical narrow SSH allowlist.
Investigation
Existing deployment workflows connect through WireGuard and use a split tunnel to reach the deployment host. The reusable action needs to run on the Ubuntu runner host to configure its routes, keep the private peer configuration out of logs, and remove the tunnel after the job.
Decision
Add a JavaScript action under a repository subdirectory so consumers can reference it directly with
truecms/sentinel-actions/wireguard-ssh@<reviewed-ref>. Keep VPN configuration separate from SSH credentials, verify the target IPv4 route and reachability before deployment, bound setup and name resolution, and register a separate post entrypoint for cleanup.What changed
wireguard-sshaction with validated inputs, private temporary configuration storage, route and handshake checks, TCP reachability verification, and post-job cleanup.Where
wireguard-ssh/action.yml— action metadata and inputs for direct repository use.wireguard-ssh/index.jsandpost.js— tunnel setup, route verification, and cleanup.wireguard-ssh/examples/deploy.yml— end-to-end workflow example to copy into a deployment repository.tests/wireguard-ssh.test.js— input, route, timeout, secret-file, and cleanup coverage.Validation
node --check wireguard-ssh/index.js && node --check wireguard-ssh/post.js— passed.node --test tests/wireguard-ssh.test.js— 8 tests passed.shellcheck scripts/*.sh */scan.sh tests/*/stubs/* examples/drupal-db-image/*.sh— passed.bats tests/*/*.bats— 63 tests passed.git diff --check— passed.