-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Show Signer in commit lists and add basic trust #10425
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
Conversation
Show the avatar of the signer in the commit list pages as we do not enforce that the signer is an author or committer. This makes it clearer who has signed the commit. Also display commits signed by non-members differently from members and in particular make it clear when a non-member signer is different from the committer to help reduce the risk of spoofing. Signed-off-by: Andrew Thornton <[email protected]>
can you add a screenshot before/after? |
Signed-off-by: Andrew Thornton <[email protected]>
@6543 Screenshots are up |
Dark theme will probably need a few fixes as this introduces a lot of bright color rules. |
Codecov Report
@@ Coverage Diff @@
## master #10425 +/- ##
==========================================
- Coverage 43.68% 43.67% -0.02%
==========================================
Files 586 586
Lines 81467 81473 +6
==========================================
- Hits 35591 35584 -7
- Misses 41465 41478 +13
Partials 4411 4411
Continue to review full report at Codecov.
|
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
I've updated colors for dark theme and adjusted the less |
Signed-off-by: Andrew Thornton <[email protected]>
Small request: Can you make the red/green/yellow badges' text color either match the border color (except yellow on light theme, go orange there)? I think they would look better with a text color instead of dull grey. |
@silverwind I don't understand. |
So I'm not a fan of changing the colour of the shas - I think they would stand out too much. In terms of the slight vertical centering issue it's because of the height of the avatar. I think if we stick a few px padding-top that would sort it. |
I didn't adjust the view_list.tmpl - I've done that now. That should fix the problem. |
@lafriks I'm not sure how others do this - we should probably extend this functionality to include repository specific pubkeyrings +/- signed pubkeys. |
Why not use server wide keyring with also historical keys? |
It's an option, we probably want per repository settings though. I think these are for another PR - this one just establishes a very simple trust model - we can codify more complex ones in time. |
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.
I'm fine with the go part - I'll leafe js/css part to silverwind
Should really un-nest and share |
I think this PR is a huge improvement, but I see the problem with the updated keys. I agree it can be refined in a later PR. We've got a |
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.
Only a couple of nits. 👍
@silverwind I fixed it! -- oops I think that this little fix didn't make it in! I'll open another PR for it. |
@silverwind yes that's intentional if that's the server key. |
The alignment issue with the icons still persists for me. It's because there is a extra I think the |
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index c296eb7be..a1c8c133e 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -16,10 +16,11 @@
{{end}}
{{end}}
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSi
- <span class="shortsha">{{ShortSha .LatestCommit.ID.String
+ <span class="shortsha">{{ShortSha .LatestCommit.ID.String}}</span
+ <div class="ui detail icon button">
{{if .LatestCommit.Signature}}
{{if .LatestCommitVerification.Verified}}
- <div class="ui detail icon button" title=
+ <div title="{{if eq .LatestCommitVerifica
{{if ne .LatestCommitVerification
<i class="lock icon"></i>
<img class="ui signature
@@ -32,11 +33,10 @@
{{end}}
</div>
{{else}}
- <div class="ui detail icon button">
- <i title="{{$.i18n.Tr .LatestComm
- </div>
+ <i title="{{$.i18n.Tr .LatestCommitVerifi
{{end}}
{{end}}
+ </div>
</a>
{{template "repo/commit_status" .LatestCommitStatus}}
{{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }} |
Yes, that missing
Would move the cog 1px (or .5px) to the top so it's "more" centered. |
Backport go-gitea#10425 Backport go-gitea#10511 * Show Signer in commit lists and add basic trust (go-gitea#10425) Show the avatar of the signer in the commit list pages as we do not enforce that the signer is an author or committer. This makes it clearer who has signed the commit. Also display commits signed by non-members differently from members and in particular make it clear when a non-member signer is different from the committer to help reduce the risk of spoofing. Signed-off-by: Andrew Thornton <[email protected]> Fix the signing icon in the view_list.tmpl page (go-gitea#10511) Co-Authored-By: silverwind <[email protected]> Co-authored-by: guillep2k <[email protected]>
Backport #10425 Backport #10511 * Show Signer in commit lists and add basic trust (#10425) Show the avatar of the signer in the commit list pages as we do not enforce that the signer is an author or committer. This makes it clearer who has signed the commit. Also display commits signed by non-members differently from members and in particular make it clear when a non-member signer is different from the committer to help reduce the risk of spoofing. Signed-off-by: Andrew Thornton <[email protected]> Fix the signing icon in the view_list.tmpl page (#10511) Co-Authored-By: silverwind <[email protected]> Co-authored-by: guillep2k <[email protected]>
Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.
Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.
Signed-off-by: Andrew Thornton [email protected]
Screenshots
Verified Commits
Untrusted Commits (signed by committer who is not a member of the repository)
Unmatched Commits (signed by committer who is not a member of the repository and the committer and the signer are not matched)
Bad signature