-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: Correctly verify signatures when targetRevision is a branch name #14214
Conversation
Signed-off-by: jannfis <jann@mistrust.net>
0029553
to
e0875aa
Compare
/cherry-pick 2.7 |
/cherry-pick release-2.7 |
Signed-off-by: jannfis <jann@mistrust.net>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #14214 +/- ##
==========================================
+ Coverage 49.64% 49.71% +0.06%
==========================================
Files 258 259 +1
Lines 44192 44301 +109
==========================================
+ Hits 21940 22023 +83
- Misses 20091 20113 +22
- Partials 2161 2165 +4
☔ View full report in Codecov by Sentry. |
Signed-off-by: jannfis <jann@mistrust.net>
/cherry-pick release-2.7 |
Cherry-pick failed with |
/cherry-pick release-2.8 |
…#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
…argoproj#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
…argoproj#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
… (cherry-pick #14214) (#14236) * fix: Correctly verify signatures when targetRevision is a branch name (#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net> * Update go.mod Signed-off-by: jannfis <jann@mistrust.net> * go mod tidy Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
… (cherry-pick argoproj#14214) (argoproj#14236) * fix: Correctly verify signatures when targetRevision is a branch name (argoproj#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net> * Update go.mod Signed-off-by: jannfis <jann@mistrust.net> * go mod tidy Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net> Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>
…argoproj#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
…argoproj#14214) * fix: Correctly verify signatures when targetRevision is a branch name Signed-off-by: jannfis <jann@mistrust.net> * Add more e2e tests Signed-off-by: jannfis <jann@mistrust.net> * Fix a bug and add unit test Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
Fixes #14009
During manifest rendering, Argo CD checks out the resolved SHA of the
targetRevision
. This leads the repository into a detached HEAD state, from where the branch name is not reachable.We do need to pass a tag name (i.e. the unresolved
targetRevision
) when validating signatures on a signed (annotated) tag though. So we'll have the repository server figure out whether atargetRevision
is specifying an annotated tag or not, and call the verification routines accordingly.Technically, we do not need
hack/git-verify-wrapper.sh
anymore. However, I'm going to replace the wrapper by Go code in a future PR, because this particular PR fixes a regression and needs to be cherry-picked.Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Please see Contribution FAQs if you have questions about your pull-request.