Commit Graph

77 Commits

Author SHA1 Message Date
4a2e3c4a9b Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
go1.11.13 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.11.13 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.13

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aed09dc7eb
Component: cli
2019-08-14 03:07:24 +02:00
63b8b89aea Bump Go to 1.11.12
go1.11.12 (released 2019/07/08) includes fixes to the compiler and the linker.
See the Go 1.11.12 milestone on our issue tracker for details:

 https://github.com/golang/go/issues?q=milestone%3AGo1.11.12

Full diff: https://github.com/golang/go/compare/go1.11.11...go1.11.12

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: e065aa2798
Component: cli
2019-07-23 15:31:36 -07:00
dd8eddb4df Bump golang 1.11.11
go1.11.11 (released 2019/06/11) includes a fix to the crypto/x509 package.
See the Go 1.11.11 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.11

full diff: https://github.com/golang/go/compare/go1.11.10...go1.11.11

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9bd840b234
Component: cli
2019-06-14 12:55:09 +02:00
692e7c8cb9 Bump Golang 1.11.10
go1.11.10 (released 2019/05/06) includes fixes to the runtime and the linker.
See the Go 1.11.10 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.10

Full diff: https://github.com/golang/go/compare/go1.11.9...go1.11.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b8fe5cea3d
Component: cli
2019-06-14 12:53:40 +02:00
0e0ce7c2e9 Bump Golang 1.11.9
go1.11.9 (released 2019/04/11) fixes an issue where using the prebuilt
binary releases on older versions of GNU/Linux led to failures when linking
programs that used cgo. Only Linux users who hit this issue need to update.

See golang/go#31293 for details

Full diff: https://github.com/golang/go/compare/go1.11.8...go1.11.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1b3ed84535
Component: cli
2019-06-14 12:53:34 +02:00
26819ff0ff [18.09] Bump Golang 1.11.7
go1.11.7 (released 2019/04/05) includes fixes to the runtime and the net
packages. See the Go 1.11.7 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.11.7

Full diff: https://github.com/golang/go/compare/go1.11.6...go1.11.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 85a73e440e
Component: cli
2019-06-14 12:53:31 +02:00
4e4eee19c9 Bump Golang 1.11.6
go1.11.6 (released 2019/03/14) includes fixes to cgo, the compiler, linker,
runtime, go command, and the crypto/x509, encoding/json, net, and net/url
packages. See the Go 1.11.6 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.11.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1500105975)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9959062d9a
Component: cli
2019-06-14 12:53:27 +02:00
7bdc68cd32 Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e9d1d3b07)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dcc8f14cad
Component: cli
2019-06-14 12:53:24 +02:00
73bc01b037 Bump Golang 1.11.4 (includes fix for CVE-2018-16875)
go1.11.4 (released 2018/12/14) includes fixes to cgo, the compiler, linker,
runtime, documentation, go command, and the net/http and go/types packages. It
includes a fix to a bug introduced in Go 1.11.3 that broke go get for import
path patterns containing "...".

See the Go 1.11.4 milestone for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.4+label%3ACherryPickApproved

go1.11.3 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit deaf6e13ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a378a00954
Component: cli
2019-06-14 12:53:21 +02:00
f03dd88c90 Bump Go to 1.11.2
go1.11.2 (released 2018/11/02) includes fixes to the compiler, linker,
documentation, go command, and the database/sql and go/types packages.

See the milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 58f0bfcf51)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 534c774fab
Component: cli
2019-06-14 12:53:18 +02:00
1b195edabf Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 166856ab1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 206ea57da8
Component: cli
2019-06-14 12:53:07 +02:00
d81b1cb7eb Bump Go to 1.11.1
Release notes: https://golang.org/doc/devel/release.html#go1.11

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9412739186)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dbd66addb9
Component: cli
2019-06-14 12:53:01 +02:00
4dba9e73a5 Update to shellcheck v0.6.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ff107b313a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a5296c8f1
Component: cli
2019-03-26 14:33:39 +01:00
6006ae7e52 Use official shellcheck image
This patch switches the shellcheck image to use the official image
from Docker Hub.

Note that this does not yet update shellcheck to the latest version (v0.5.x);
Shellcheck v0.4.7 added some new checks, which makes CI currently fail, so will
be done in a follow-up PR. Instead, the v0.4.6 version is used in this PR, which
is closest to the same version as was installed in the image before this change;

```
docker run --rm docker-cli-shell-validate shellcheck --version
ShellCheck - shell script analysis tool
version: 0.4.4
license: GNU General Public License, version 3
website: http://www.shellcheck.net
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 388646eab0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b59752479b
Component: cli
2019-03-26 14:26:45 +01:00
69d2858460 Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 166856ab1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8997667aa2
Component: cli
2019-03-26 14:26:01 +01:00
37fd1a0d0a [18.09] Bump Golang 1.10.8 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c71aa11c0a
Component: cli
2019-01-24 02:07:03 +01:00
130caf6e0e connhelper: add e2e
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9b148db87a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 719508a935
Component: cli
2018-12-17 17:22:58 +01:00
c86a836fc4 Bump Golang 1.10.6 (CVE-2018-16875)
go1.10.6 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.10.6 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.10.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6c3a10aaed
Component: cli
2018-12-14 01:41:33 +01:00
9ff11286df Bump Go to 1.10.5
go1.10.5 (released 2018/11/02) includes fixes to the go command, linker,
runtime and the database/sql package. See the milestone on the issue
tracker for details:

List of changes; https://github.com/golang/go/issues?q=milestone%3AGo1.10.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 871d24d3fc
Component: cli
2018-11-30 21:59:54 +01:00
e5e1355bb7 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f250152bf4
Component: cli
2018-09-20 12:01:20 -07:00
199effc58c Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44ca0901d1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 76c09259db
Component: cli
2018-08-29 15:19:34 +02:00
f4a7b44342 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: fd2f1b3b66
Component: cli
2018-08-20 09:42:05 -07:00
71a73ab18c Update gometalinter to v2.0.6 and remove alexkohler/nakedret
alexkohler/nakedret is now installed by default with gometalinter,
so it's no longer needed to install this manually

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f3811e865e
Component: cli
2018-07-13 11:17:43 +02:00
b17401d002 Bump Golang to 1.10.3
go1.10.3 (released 2018/06/05) includes fixes to the go command, and the
crypto/tls, crypto/x509, and strings packages. In particular, it adds minimal
support to the go command for the vgo transition. See the Go 1.10.3 milestone
on our issue tracker for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1c71c957cb
Component: cli
2018-06-11 11:13:13 -07:00
35713286b5 Make e2e test image
- Build image that contains everything needed to run e2e tests
- Add ability to run e2e tests against an endpoint

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6b38918ce4
Component: cli
2018-05-29 13:39:31 +02:00
2b328bedc5 Update vndr commit to latest
Some fixes and it also preserves directories with *.c files now.

See a6e196d8b4...1fc68ee0c8

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 08d6c18570
Component: cli
2018-05-24 09:39:22 +02:00
c0eb53edfc Bump Golang to 1.10.2
Go 1.10 release notes: https://golang.org/doc/go1.10

Go 1.10: https://github.com/golang/go/issues?q=milestone%3AGo1.10
Go 1.10.1: https://github.com/golang/go/issues?q=milestone%3AGo1.10.1
Go 1.10.2: https://github.com/golang/go/issues?q=milestone%3AGo1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee7aa76cff
Component: cli
2018-05-14 16:04:13 +02:00
33403f2a86 Bump Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
net/http/pprof package. See the Go 1.9.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d3b8ceb52c
Component: cli
2018-04-05 10:02:23 -07:00
3d78b27c6b Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c0588a9c8f
Component: cli
2018-03-20 20:13:27 -04:00
0aa2494ead Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8b00c5cfd8
Component: cli
2018-03-19 10:02:40 +01:00
51450d870a Replace go-bindata with esc
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b127b8d927
Component: cli
2018-02-12 14:23:19 -05:00
940ea8083a Bump golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b32599761f
Component: cli
2018-02-08 00:56:12 -08:00
33c438d7c6 Bump Go to 1.9.3
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: d89f5fa731
Component: cli
2018-01-29 13:43:59 -05:00
077b817634 Bump Go to 1.9.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ffc7648322
Component: cli
2018-01-24 14:25:13 -08:00
3fa889eb3f Add dockerfile for building on non-amd64 platforms
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02ca1c8573
Component: cli
2018-01-18 13:16:58 -05:00
1433c3b1eb Bump Go to 1.9.2
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6859a7387b
Component: cli
2017-11-29 09:16:03 +01:00
dbab169d62 Bump Go to 1.8.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bc8282a235
Component: cli
2017-10-31 21:04:59 +01:00
6a1f8e5780 Merge pull request #633 from seemethere/switch_to_multi_arch_images
Switch to golang:1.8.4-alpine3.6
Upstream-commit: 50e1161744
Component: cli
2017-10-26 17:08:08 -07:00
9797d6fc52 Update to multi-arch image for golang
golang:1.8.4-alpine does not have multi-arch images available in the
manifest. (s390x, ppc64le, etc.)

This makes it so that if you are trying to compile on different
arches you aren't forced to have to write your own Dockerfile and can
instead use the one bundled with the CLI repo.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 9d1d9f2fa3
Component: cli
2017-10-26 11:42:13 -07:00
2b624e8f54 Update gometalinter
and enable the new WarnUnmatchedDirective to warn if a nolint is unnecessary.
remove some unnecessary nolint

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c0d004f7cf
Component: cli
2017-10-26 12:21:02 -04:00
0f96be35a7 Add nakedret linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dbd96badb6
Component: cli
2017-10-12 11:48:51 -04:00
8990f67e9c get e2e working with notary service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ade675d36c
Component: cli
2017-10-10 11:19:02 -07:00
d57a85ccfd update e2e tests for content trust tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6e3bafd06b
Component: cli
2017-10-10 11:19:02 -07:00
35d18f8b33 Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains security fixes;
https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6b35e98a61
Component: cli
2017-10-05 18:43:33 +02:00
5edb9ec08c Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Includes a fix to cleanup unused vendor-directories

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 368b639e7e
Component: cli
2017-09-29 14:58:05 +02:00
f321e1ed9d Update gometalinter
The update includes bug fixes in gometalinter and updates to linters, which
discovered more linter problems.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d956386b2d
Component: cli
2017-09-26 12:33:35 -04:00
847cb8e0df Add a Jenkinsfile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 63d76065bb
Component: cli
2017-08-16 10:46:43 -04:00
581aa22bc8 Add scripts for setting up e2e test environment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 26418a12fb
Component: cli
2017-08-16 10:35:56 -04:00
b4e14f104b Set DISABLE_WARN_OUTSIDE_CONTAINER in the Dockerfile so that we don't spend 10s sleeping in CI
also add time to validate check

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 058733969c
Component: cli
2017-08-15 14:34:43 -04:00
0d587285b1 Add "build" dir to PATH in dev-container
This makes running the client easier inside
the container; allowing to use just `docker`
instead of `build/docker`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7a0b49df23
Component: cli
2017-08-05 03:24:21 +02:00