-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide configuration option to disallow omitting known_hosts #3283
Conversation
/kind feature |
/assign @sbwsg |
The following is the coverage report on the affected files.
|
@imjasonh @sbwsg The previous PR is merged automatically due to my fault. This is the new one. Sorry I messed up the previous PR when trying to squash the commits into one. It's because I merged the master branch after my first commit and submitted several commits after that. Therefore, it became a little bit tricky to squash these separate commits into one. I guess I pushed the same code as master branch by mistake which caused tekton-robot merged the pr automatically. Anyway I managed to squash them now. Sorry again for the inconvenience! |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
2083f3b
to
59fc9a1
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more minor suggested change but I think this is ready!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbwsg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on the affected files.
|
This commit closes tektoncd#2981 Prior to this commit when a Git SSH secret does not include a known_hosts field, Tekton will accept any public key that an SSH/Git server returns. This could be a security concern and may not be an organization's desired behavior. This commit introduces a feature flag `require-git-ssh-secret-known-hosts`: the default value is false. When the flag is true, `known_host` field must be included in Git SSH Secret. `checkGitSSHSecret()` will check the type of every secrets. If the type of the secret is `kubernetes.io/ssh-auth` and `require-git-ssh-secret-known-hosts` is true, `checkGitSSHSecret` will validate whether `known_hosts` field is in the secret data. If `known_hosts` is not found, it will emit an error which ceases the creation of the pod.
a783486
to
ee3cb3d
Compare
The following is the coverage report on the affected files.
|
/lgtm |
Changes
This commit closes #2981
Prior to this commit when a Git SSH secret does not include a known_hosts field, Tekton will accept any public key that an SSH/Git server returns. This could be a security concern and may not be an organization's desired behavior.
This commit introduces a feature flag
require-git-ssh-secret-known-hosts
: the default value is false. When the flag is true,known_host
field must be included in Git SSH Secret.checkGitSSHSecret()
will check the type of every secrets. If the type of the secret iskubernetes.io/ssh-auth
andrequire-git-ssh-secret-known-hosts
is true,checkGitSSHSecret
will validate whetherknown_hosts
field is in the secret data. Ifknown_hosts
is not found, it will emit an error which ceases the creation of the pod.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes