Commit Graph

11435 Commits

Author SHA1 Message Date
Joyce Brum
b79dcabd67 chore: enable Scorecard Github Action
Signed-off-by: Joyce Brum <joycebrumu.u@gmail.com>
2022-09-20 14:36:40 -03:00
Akhil Mohan
8f4c23b69f
retry request on writer reset
when a put request is retried due to the response from registry,
the body of the request should be seekable. A dynamic pipe is added
to the body so that the content of the body can be read again.
Currently a maximum of 5 resets are allowed, above which will fail the
request. A new error ErrReset is introduced which informs that a
reset has occured and request needs to be retried.

also added tests for Copy() and push() to test the new functionality

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2022-09-20 22:09:11 +05:30
Kazuyoshi Kato
a37c64b20c Refactor CRI fuzzers
pkg/cri/sbserver/cri_fuzzer.go and pkg/cri/server/cri_fuzzer.go were
mostly the same.

This commit merges them together and move the unified fuzzer to
contrib/fuzz again to sort out dependencies. pkg/cri/ shouldn't consume
cmd/.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-09-19 22:14:11 +00:00
Derek McGowan
58701f87c7
Merge pull request #7402 from nubificus/snapshotter/feat_add_ext2
Add ext2 fs support to devmapper snapshotter
2022-09-19 10:37:08 -07:00
Kazuyoshi Kato
bf26140d94 Fix LogURIGenerator on Windows
Checking / is not the right way to distinguish an absolute path in
Windows.

Fixes #5786.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-09-19 10:00:18 -07:00
Fu Wei
333698a34d
Merge pull request #7396 from AdamKorcz/fuzz3
Fuzzing: Instrument with new sanitizers
2022-09-19 23:15:20 +08:00
Fu Wei
e94e5b7fb4
Merge pull request #7397 from kzys/remove-deps
Upgrade fuzzing-related packages to reduce dependencies
2022-09-19 23:13:44 +08:00
Phil Estes
a1e4a94694
Merge pull request #7393 from Iceber/skip_verify
remotes/docker/config: Skipping TLS verification for localhost
2022-09-19 10:53:56 -04:00
Anastassios Nanos
adfbda464b Add ext2 fs support to devmapper snapshotter
Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
2022-09-19 09:21:26 +00:00
Kazuyoshi Kato
f0fbc8dfdc Upgrade fuzzing-related packages to reduce dependencies
github.com/AdaLogics/go-fuzz-headers and
github.com/AdamKorcz/go-118-fuzz-build have less dependencies in
the last versions.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-09-15 23:25:03 +00:00
AdamKorcz
e7c593edd0 Fuzzing: Instrument with new sanitizers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-09-15 23:59:13 +01:00
Kazuyoshi Kato
290ef2b43f
Merge pull request #7395 from kaovilai/SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653
Replace github.com/emicklei/go-restful package, versions <2.16.0
2022-09-15 15:05:18 -07:00
Brian Goff
9cdf9f6c6c Use jq and only show failed tests on summary
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-09-14 23:31:32 +00:00
Brian Goff
34ad96babd CI: Output a summary using GITHUB_SUMMARY
Uses teststat to parse the go test json and output markdown which will
be posted as a summary to the github action run.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-09-14 23:30:47 +00:00
Tiger Kaovilai
524d3aca80 github.com/emicklei/go-restful CWE-285: Improper Authorization
https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-09-14 14:38:00 -04:00
Iceber Gu
3cfde732e1 remotes/docker/config: Skipping TLS verification for localhost
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2022-09-13 17:40:23 +08:00
Samuel Karp
f4095a6876
Merge pull request #7386 from mxpv/no-same-owner 2022-09-09 21:52:41 -07:00
Derek McGowan
5bedf3fca3
Merge pull request #7328 from liubin/add-privileged-without-host-devices
ctr: add privileged-without-host-devices for run command
2022-09-09 20:58:16 -07:00
Derek McGowan
3f3db4021a
Merge pull request #7341 from my-git9/imagepull2
chore: matching the casing of other flags for ctr's pull command
2022-09-09 20:52:36 -07:00
Maksym Pavlenko
0f51aa874d Add NoSameOwner option when unpacking tars
When unpacking a TAR archive, containerd preserves file's owner:
https://github.com/containerd/containerd/blob/main/archive/tar.go#L384

In some cases this behavior is not desired. In current implementation we
avoid `Lchown` on Windows. Another case when this should be skipped is
when using native snapshotter on darwin and running as non-root user.

This PR extracts a generic option - `WithNoSameOwner` (same as
`tar --no-same-owner`) to skip `Lchown` when its not required.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-09 17:07:26 -07:00
Kevin Parsons
de509c0682
Merge pull request #6901 from dcantah/add-wcowhyp-runtime
windows: Add runhcs-wcow-hypervisor runtimeclass to the default config
2022-09-08 10:53:12 -07:00
xin.li
b2a7183a83 matching the casing of other flags for ctr's pull command.
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-09-08 22:07:35 +08:00
Derek McGowan
dbd3c8c5b8
Merge pull request #7370 from wzshiming/fix/missing-close 2022-09-07 08:19:41 -07:00
Fu Wei
99ee82d0b6
Merge pull request #7374 from soulseen/update-cdi-version 2022-09-07 13:37:41 +08:00
Davanum Srinivas
4a6d8d319b
Merge pull request #7372 from thaJeztah/bump_golang_1.19.1
Update to go 1.19.1, 1.18.6 to address CVE-2022-27664, CVE-2022-32190
2022-09-06 22:08:47 -04:00
xiaoyang zhu
829dd2145f update cdi version to v0.5.1
Signed-off-by: xiaoyang zhu <zhuxiaoyang1996@gmail.com>
2022-09-07 09:34:55 +08:00
Fu Wei
e8dd962bb4
Merge pull request #7373 from thaJeztah/bump_x_net 2022-09-07 08:00:54 +08:00
Kazuyoshi Kato
db28354cb5
Merge pull request #7371 from estesp/remove-unused
Remove unused variable from images action
2022-09-06 15:22:31 -07:00
Sebastiaan van Stijn
0f743ce4ff
vendor: golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
Update to the latest version that contains a fix for CVE-2022-27664;
f3363e06e7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-06 22:46:21 +02:00
Sebastiaan van Stijn
8f2bbd5e8f
Update to go 1.19.1, 1.18.6 to address CVE-2022-27664, CVE-2022-32190
From the mailing list:

We have just released Go versions 1.19.1 and 1.18.6, minor point releases.
These minor releases include 2 security fixes following the security policy:

- net/http: handle server errors after sending GOAWAY
  A closing HTTP/2 server connection could hang forever waiting for a clean
  shutdown that was preempted by a subsequent fatal error. This failure mode
  could be exploited to cause a denial of service.

  Thanks to Bahruz Jabiyev, Tommaso Innocenti, Anthony Gavazzi, Steven Sprecher,
  and Kaan Onarlioglu for reporting this.

  This is CVE-2022-27664 and Go issue https://go.dev/issue/54658.

- net/url: JoinPath does not strip relative path components in all circumstances
  JoinPath and URL.JoinPath would not remove `../` path components appended to a
  relative path. For example, `JoinPath("https://go.dev", "../go")` returned the
  URL `https://go.dev/../go`, despite the JoinPath documentation stating that
  `../` path elements are cleaned from the result.

  Thanks to q0jt for reporting this issue.

  This is CVE-2022-32190 and Go issue https://go.dev/issue/54385.

Release notes:

go1.19.1 (released 2022-09-06) includes security fixes to the net/http and
net/url packages, as well as bug fixes to the compiler, the go command, the pprof
command, the linker, the runtime, and the crypto/tls and crypto/x509 packages.
See the Go 1.19.1 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.19.1+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-06 22:41:55 +02:00
Kazuyoshi Kato
217aa160cf
Merge pull request #7291 from lengrongfu/feat_client_defaultnamespace
feature: use client default namespace
2022-09-06 11:54:11 -07:00
Kazuyoshi Kato
d99e62d8e5
Merge pull request #7367 from thaJeztah/cleanup_todo_comment
integration: TestUpdateContainerResources_MemoryLimit: remove TODO comment
2022-09-06 08:38:10 -07:00
Shiming Zhang
6ce0f6a264 Fix missing close
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
2022-09-06 22:56:40 +08:00
Phil Estes
8575a0d6f8
Remove unused variable from images action
Ran actionlint against all our actions and it found this variable that
is based on a non-existent property (there is no matrix definition in
this action yaml). The variable is also unused so simply removing it.

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-09-06 10:38:05 -04:00
lengrongfu
5e57d463df feature: use client default namespace
Signed-off-by: rongfu.leng <1275177125@qq.com>
2022-09-06 22:18:28 +08:00
Fu Wei
851bfe8c06
Merge pull request #7359 from lengrongfu/feat_upgrade_pause_version 2022-09-06 18:38:22 +08:00
lengrongfu
3c0e6c40ad feat: upgrade registry.k8s.io/pause version
Signed-off-by: rongfu.leng <1275177125@qq.com>
2022-09-06 15:59:20 +08:00
Fu Wei
50a201b6c2
Merge pull request #7361 from dcantah/epoll-ev-rm 2022-09-06 07:36:29 +08:00
Samuel Karp
f3086f3f94
Merge pull request #7369 from fuweid/fuweid/remove-zuul 2022-09-05 13:38:43 -07:00
Wei Fu
f9166aa53e .zuul: remove the zuul because it is offline
The [Openlab][1] has deprecated zuul jobs. We don't see any active the
zuul jobs in PR. Remove it and we need to seek new solution for ARM64
CI test.

[1]: <https://github.com/theopenlab>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-09-05 23:42:54 +08:00
Sebastiaan van Stijn
e041d1a2c1
integration: TestUpdateContainerResources_MemoryLimit: remove TODO comment
This comment was added in 09a0c9471b when the
Windows integration tests were enabled. The PR (microsoft/hcsshim#931) was
merged, and part of hcsshim v0.9.0, and support for resource limits on Windows
was added in 2bc77b8a28, so it looks like this
comment is no longer current.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-05 09:52:29 +02:00
Daniel Canter
3a2197f5fe metrics/cgroups/v1: Remove unused event parameter
The event parameter wasn't actually used when processing oom events,
likely because it's only ever available for reads.

Additionally clarify flush is for eventfds, and point to where the
buffer size of 8 is coming from.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-09-02 20:38:09 -07:00
Kazuyoshi Kato
edd59aa360
Merge pull request #7356 from estesp/lint-timeout
Update golangci-lint timeout to match config
2022-09-01 13:32:52 -07:00
Phil Estes
3d7a93fed8
Merge pull request #7345 from zouyee/red
delete redundent import alias and and type conversion
2022-09-01 16:03:08 -04:00
Phil Estes
bfb280fb35
Update golangci-lint timeout to match config
Our GitHub Actions CI timeout setting was different than the config
file; we are now getting somewhat regular timeouts on the Windows
linting jobs so this should solve that and give us room in case runs
start taking longer

Signed-off-by: Phil Estes <estesp@amazon.com>
2022-09-01 14:55:55 -04:00
Phil Estes
0f1a14a402
Merge pull request #7350 from kzys/timer-windows
Make checkContainerTimestamps less strict on Windows
2022-09-01 11:14:41 -04:00
Kazuyoshi Kato
407703f092 Make checkContainerTimestamps less strict on Windows
This assertion is flaky on Windows.
Because of Go, Windows' time.Now resolution is lower than Linux.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-31 17:37:57 +00:00
zounengren
344b25995b delete redundent import alias and and type conversion
Signed-off-by: zounengren <zouyee1989@gmail.com>
2022-08-31 21:36:24 +08:00
Samuel Karp
1bb39b833e
Merge pull request #7346 from kzys/fuzz-enable 2022-08-30 22:33:43 -07:00
Samuel Karp
f6348684c8
Merge pull request #7326 from pacoxu/patch-4 2022-08-30 21:59:42 -07:00