Skip to content

Commit

Permalink
fix: ecr credential helper hash check (#668)
Browse files Browse the repository at this point in the history
Issue #, if available: #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 <alvajus@amazon.com>
  • Loading branch information
pendo324 committed Oct 31, 2023
1 parent b094751 commit 4b1b0a2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions pkg/dependency/credhelper/cred_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,24 @@ func newDeps(
finchPath := fmt.Sprintf("/Users/%s/.finch/", user)

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

hcEcr := helperConfig{
binaryName: "docker-credential-ecr-login", credHelperURL: credHelperURLEcr,
hash: hashEcr, installFolder: installFolder,
finchPath: finchPath,
binaryName: "docker-credential-ecr-login",
credHelperURL: credHelperURLEcr,
installFolder: installFolder,
finchPath: finchPath,
}

if arch == "arm64" {
hcEcr.hash = hashARM64
} else {
hcEcr.hash = hashAMD64
}

configs["ecr-login"] = hcEcr

for _, helper := range fc.CredsHelpers {
Expand Down

0 comments on commit 4b1b0a2

Please sign in to comment.