Skip to content

Commit 4b1b0a2

Browse files
authored
fix: ecr credential helper hash check (runfinch#668)
Issue #, if available: runfinch#663 *Description of changes:* *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Justin Alvarez <[email protected]>
1 parent b094751 commit 4b1b0a2

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Diff for: pkg/dependency/credhelper/cred_helper.go

+13-4
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,24 @@ func newDeps(
6767
finchPath := fmt.Sprintf("/Users/%s/.finch/", user)
6868

6969
const versionEcr = "0.7.0"
70-
const hashEcr = "sha256:ff14a4da40d28a2d2d81a12a7c9c36294ddf8e6439780c4ccbc96622991f3714"
70+
const hashARM64 = "sha256:ff14a4da40d28a2d2d81a12a7c9c36294ddf8e6439780c4ccbc96622991f3714"
71+
const hashAMD64 = "sha256:c978912da7f54eb3bccf4a3f990c91cc758e1494a8af7a60f3faf77271b565db"
7172
credHelperURLEcr := fmt.Sprintf("https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com"+
7273
"/%s/linux-%s/docker-credential-ecr-login", versionEcr, arch)
7374

7475
hcEcr := helperConfig{
75-
binaryName: "docker-credential-ecr-login", credHelperURL: credHelperURLEcr,
76-
hash: hashEcr, installFolder: installFolder,
77-
finchPath: finchPath,
76+
binaryName: "docker-credential-ecr-login",
77+
credHelperURL: credHelperURLEcr,
78+
installFolder: installFolder,
79+
finchPath: finchPath,
7880
}
81+
82+
if arch == "arm64" {
83+
hcEcr.hash = hashARM64
84+
} else {
85+
hcEcr.hash = hashAMD64
86+
}
87+
7988
configs["ecr-login"] = hcEcr
8089

8190
for _, helper := range fc.CredsHelpers {

0 commit comments

Comments
 (0)