mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-28 15:21:29 +05:30
Compare commits
8 Commits
ed71c9e95d
...
v0.9.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 312e321de7 | |||
| 6fd0550317 | |||
| d930f0631a | |||
| 777084b6aa | |||
| ca5e83c83a | |||
| 7cd63786cf | |||
| 5fcff353e7 | |||
| 390d43e7e4 |
@@ -18,7 +18,7 @@ on:
|
||||
|
||||
env:
|
||||
DESTDIR: ./bin
|
||||
GO_VERSION: 1.25.9
|
||||
GO_VERSION: 1.26.3
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
|
||||
@@ -18,7 +18,7 @@ on:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@d89fe92d808a15e2b2ed5cdb62db7c172c31410d # v1.6.0
|
||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@64a0bfaf6e6bb1c448d6e4c42b11034ee7094f16 # v1.7.1
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# GO_VERSION sets the version of the golang base image to use.
|
||||
# It must be a valid tag in the docker.io/library/golang image repository.
|
||||
ARG GO_VERSION=1.25.9
|
||||
ARG GO_VERSION=1.26.3
|
||||
|
||||
# BASE_DEBIAN_DISTRO sets the golang base image debian variant to use.
|
||||
# It must be a valid variant in the docker.io/library/golang image repository.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# GO_VERSION sets the version of the golang base image to use.
|
||||
# It must be a valid tag in the docker.io/library/golang image repository.
|
||||
ARG GO_VERSION=1.25.9
|
||||
ARG GO_VERSION=1.26.3
|
||||
|
||||
# BASE_DEBIAN_DISTRO sets the golang base image debian variant to use.
|
||||
# It must be a valid variant in the docker.io/library/golang image repository.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux && cgo
|
||||
//go:build (linux || openbsd) && cgo
|
||||
|
||||
package secretservice
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux && cgo
|
||||
//go:build (linux || openbsd) && cgo
|
||||
|
||||
package secretservice
|
||||
|
||||
|
||||
+9
-15
@@ -5,7 +5,6 @@ package wincred
|
||||
import (
|
||||
"bytes"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
winc "github.com/danieljoos/wincred"
|
||||
"github.com/docker/docker-credential-helpers/credentials"
|
||||
@@ -54,9 +53,7 @@ func (h Wincred) Get(serverURL string) (string, string, error) {
|
||||
}
|
||||
|
||||
for _, attr := range g.Attributes {
|
||||
if strings.Compare(attr.Keyword, "label") == 0 &&
|
||||
bytes.Compare(attr.Value, []byte(credentials.CredsLabel)) == 0 {
|
||||
|
||||
if attr.Keyword == "label" && bytes.Equal(attr.Value, []byte(credentials.CredsLabel)) {
|
||||
return g.UserName, string(g.CredentialBlob), nil
|
||||
}
|
||||
}
|
||||
@@ -75,11 +72,10 @@ func getTarget(serverURL string) (string, error) {
|
||||
}
|
||||
|
||||
var targets []string
|
||||
for i := range creds {
|
||||
attrs := creds[i].Attributes
|
||||
for _, attr := range attrs {
|
||||
for _, cred := range creds {
|
||||
for _, attr := range cred.Attributes {
|
||||
if attr.Keyword == "label" && bytes.Equal(attr.Value, []byte(credentials.CredsLabel)) {
|
||||
targets = append(targets, creds[i].TargetName)
|
||||
targets = append(targets, cred.TargetName)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,16 +132,14 @@ func (h Wincred) List() (map[string]string, error) {
|
||||
}
|
||||
|
||||
resp := make(map[string]string)
|
||||
for i := range creds {
|
||||
attrs := creds[i].Attributes
|
||||
for _, attr := range attrs {
|
||||
if strings.Compare(attr.Keyword, "label") == 0 &&
|
||||
bytes.Compare(attr.Value, []byte(credentials.CredsLabel)) == 0 {
|
||||
|
||||
resp[creds[i].TargetName] = creds[i].UserName
|
||||
for _, cred := range creds {
|
||||
for _, attr := range cred.Attributes {
|
||||
if attr.Keyword == "label" && bytes.Equal(attr.Value, []byte(credentials.CredsLabel)) {
|
||||
resp[cred.TargetName] = cred.UserName
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
|
||||
Reference in New Issue
Block a user