diff --git a/go.mod b/go.mod index 84cd7916a8..1d036528a2 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/Microsoft/go-winio v0.4.17 github.com/Microsoft/hcsshim v0.8.23 - github.com/billgraziano/dpapi v0.3.0 + github.com/billgraziano/dpapi v0.4.0 github.com/containernetworking/cni v0.8.1 github.com/docker/docker v20.10.8+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -107,7 +107,6 @@ require ( ) require ( - github.com/gofrs/uuid v3.3.0+incompatible // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index ffb4fb6b58..70b53ffa57 100644 --- a/go.sum +++ b/go.sum @@ -104,8 +104,8 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/billgraziano/dpapi v0.3.0 h1:mZ9No/GUuYpgE1X3CEFeKM2TkIPYkEluCrAALfes4Co= -github.com/billgraziano/dpapi v0.3.0/go.mod h1:gi1Lin0jvovT53j0EXITkY6UPb3hTfI92POaZgj9JBA= +github.com/billgraziano/dpapi v0.4.0 h1:t39THI1Ld1hkkLVrhkOX6u5TUxwzRddOffq4jcwh2AE= +github.com/billgraziano/dpapi v0.4.0/go.mod h1:gi1Lin0jvovT53j0EXITkY6UPb3hTfI92POaZgj9JBA= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= diff --git a/vendor/github.com/billgraziano/dpapi/README.md b/vendor/github.com/billgraziano/dpapi/README.md index bb615937ce..ff29e682bd 100644 --- a/vendor/github.com/billgraziano/dpapi/README.md +++ b/vendor/github.com/billgraziano/dpapi/README.md @@ -34,7 +34,7 @@ It creates a file named `domain.computer.user.stable.json` on the first run. On References ---------- -* [DPAPI on Wikipedia](https://en.wikipedia.org/wiki/Data_Protection_API) +* [Data Protection API](https://en.wikipedia.org/wiki/Data_Protection_API) (wikipedia.org) * [Windows Data Protection](https://docs.microsoft.com/en-us/previous-versions/ms995355(v=msdn.10)?redirectedfrom=MSDN) (microsoft.com) * [Troubleshooting the DPAPI](https://support.microsoft.com/en-us/help/309408/how-to-troubleshoot-the-data-protection-api-dpapi) (microsoft.com) * [CryptProtectData function](https://docs.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata) (microsoft.com) diff --git a/vendor/github.com/billgraziano/dpapi/dpapi.go b/vendor/github.com/billgraziano/dpapi/dpapi.go index 29966855c6..9b2636305b 100644 --- a/vendor/github.com/billgraziano/dpapi/dpapi.go +++ b/vendor/github.com/billgraziano/dpapi/dpapi.go @@ -39,16 +39,19 @@ func newBlob(d []byte) *dataBlob { func (b *dataBlob) toByteArray() []byte { d := make([]byte, b.cbData) + /* #nosec# G103 */ copy(d, (*[1 << 30]byte)(unsafe.Pointer(b.pbData))[:]) return d } func (b *dataBlob) zeroMemory() { zeros := make([]byte, b.cbData) + /* #nosec# G103 */ copy((*[1 << 30]byte)(unsafe.Pointer(b.pbData))[:], zeros) } func (b *dataBlob) free() error { + /* #nosec# G103 */ _, err := windows.LocalFree(windows.Handle(unsafe.Pointer(b.pbData))) if err != nil { return errors.Wrap(err, "localfree") @@ -94,8 +97,10 @@ func encryptBytes(data []byte, entropy []byte, cf cryptProtect) ([]byte, error) ) if len(entropy) > 0 { + /* #nosec# G103 */ r, _, err = procEncryptData.Call(uintptr(unsafe.Pointer(newBlob(data))), 0, uintptr(unsafe.Pointer(newBlob(entropy))), 0, 0, uintptr(cf), uintptr(unsafe.Pointer(&outblob))) } else { + /* #nosec# G103 */ r, _, err = procEncryptData.Call(uintptr(unsafe.Pointer(newBlob(data))), 0, 0, 0, 0, uintptr(cf), uintptr(unsafe.Pointer(&outblob))) } if r == 0 { @@ -134,8 +139,10 @@ func decryptBytes(data, entropy []byte, cf cryptProtect) ([]byte, error) { err error ) if len(entropy) > 0 { + /* #nosec# G103 */ r, _, err = procDecryptData.Call(uintptr(unsafe.Pointer(newBlob(data))), 0, uintptr(unsafe.Pointer(newBlob(entropy))), 0, 0, uintptr(cf), uintptr(unsafe.Pointer(&outblob))) } else { + /* #nosec# G103 */ r, _, err = procDecryptData.Call(uintptr(unsafe.Pointer(newBlob(data))), 0, 0, 0, 0, uintptr(cf), uintptr(unsafe.Pointer(&outblob))) } if r == 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5be82609ce..cc5665c1b5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -42,7 +42,7 @@ github.com/avast/retry-go/v3 # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile -# github.com/billgraziano/dpapi v0.3.0 +# github.com/billgraziano/dpapi v0.4.0 ## explicit; go 1.14 github.com/billgraziano/dpapi # github.com/cespare/xxhash/v2 v2.1.1