diff --git a/docker/Dockerfile.flux b/docker/Dockerfile.flux index 30926ae23..d1dd76404 100644 --- a/docker/Dockerfile.flux +++ b/docker/Dockerfile.flux @@ -6,7 +6,7 @@ RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' gnupg # Add git hosts to known hosts file so we can use # StrickHostKeyChecking with git+ssh -RUN ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com >> /etc/ssh/ssh_known_hosts +RUN ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio.com >> /etc/ssh/ssh_known_hosts # Verify newly added known_hosts (man-in-middle mitigation) ADD ./verify_known_hosts.sh /home/flux/verify_known_hosts.sh diff --git a/docker/Dockerfile.helm-operator b/docker/Dockerfile.helm-operator index 04cfcd739..5f6a6939b 100644 --- a/docker/Dockerfile.helm-operator +++ b/docker/Dockerfile.helm-operator @@ -6,7 +6,7 @@ RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0' # Add git hosts to known hosts file so we can use # StrickHostKeyChecking with git+ssh -RUN ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com >> /etc/ssh/ssh_known_hosts +RUN ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio.com >> /etc/ssh/ssh_known_hosts # Add default SSH config, which points at the private key we'll mount COPY ./ssh_config /etc/ssh/ssh_config diff --git a/docker/verify_known_hosts.sh b/docker/verify_known_hosts.sh index 73092ccdf..e5bbbef45 100755 --- a/docker/verify_known_hosts.sh +++ b/docker/verify_known_hosts.sh @@ -7,7 +7,7 @@ known_hosts_file=${known_hosts_file:-/etc/ssh/ssh_known_hosts} # The heredoc below was generated by constructing a known_hosts using # -# ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com > ./known_hosts +# ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com vs-ssh.visualstudio.com > ./known_hosts # # then generating the sorted fingerprints with # @@ -17,7 +17,7 @@ known_hosts_file=${known_hosts_file:-/etc/ssh/ssh_known_hosts} # - github.com: https://help.github.com/articles/github-s-ssh-key-fingerprints/ # - gitlab.com: https://docs.gitlab.com/ee/user/gitlab_com/#ssh-host-keys-fingerprints # - bitbucket.org: https://confluence.atlassian.com/bitbucket/ssh-keys-935365775.html -# - ssh.dev.azure.com: sign in, then go to User settings -> SSH Public Keys +# - ssh.dev.azure.com & vs-ssh.visualstudio.com: sign in, then go to User settings -> SSH Public Keys # (this is where the public key fingerprint is shown; it's not a setting) fingerprints=$(mktemp -t) @@ -34,6 +34,7 @@ diff - "$fingerprints" <