From 92ab11b4d25ee7c633a6ff2552b1321c294d405e Mon Sep 17 00:00:00 2001 From: Francesco Renzi Date: Thu, 2 Feb 2023 08:28:34 +0000 Subject: [PATCH] Use UUID v5 for client identifiers (#2241) --- github/actions/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github/actions/client.go b/github/actions/client.go index 63c9ed16..2d3c7906 100644 --- a/github/actions/client.go +++ b/github/actions/client.go @@ -3,6 +3,7 @@ package actions import ( "bytes" "context" + "crypto/sha256" "crypto/tls" "crypto/x509" "encoding/base64" @@ -185,7 +186,7 @@ func (c *Client) Identifier() string { ) } - return uuid.NewMD5(uuid.NameSpaceOID, []byte(identifier)).String() + return uuid.NewHash(sha256.New(), uuid.NameSpaceOID, []byte(identifier), 6).String() } func (c *Client) Do(req *http.Request) (*http.Response, error) {