Commit Graph

303 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
b7b185c92f
update github.com/cpuguy83/go-md2man/v2 to v2.0.2
no significant updates, just keeping up with latest version

full diff: https://github.com/cpuguy83/go-md2man/compare/v2.0.1...v2.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-20 22:52:50 +01:00
Akihiro Suda
3fca677c19
Release: add static binaries
Fix issue 7296

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-12 03:52:37 +09:00
Derek McGowan
d1564fec5b
Merge pull request #7614 from huoqifeng/s390x
s390x: build and package s390x bin in release assets
2022-11-07 12:08:43 -08:00
Brian Goff
422a240666 Bump go version to 1.19.3
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-11-02 19:54:42 +00:00
Craig Ingram
a270d6e8ae
Harden GITHUB_TOKEN permissions
Signed-off-by: Craig Ingram <cjingram@google.com>
2022-11-01 10:56:38 -04:00
huoqifeng
98269c0619 s390x: initial enabler
Signed-off-by: huoqifeng <huoqif@cn.ibm.com>
2022-11-01 13:15:15 +08:00
Nashwan Azhari
7c77b3540d Add Workflow for running critest with Hyper-V Containers on Windows.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-10-26 13:33:45 +03:00
Austin Vazquez
be3987a92d Migrate away from GitHub actions set-output
Migrate from set-output call to write to new GITHUB_OUTPUT environment
file.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-10-24 22:48:42 +00:00
Akhil Mohan
ddb8a65be2
update codeql-action to v2
updating codeql github actions to v2, as v1 version will be deprecated
in Dec'22.

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2022-10-21 11:54:41 +05:30
Kazuyoshi Kato
a76d68ee48 Separate containerd logs in GitHub Actions' console
`::group::` groups containerd logs by default.

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Kazuyoshi Kato
878dbc7afa Upgrade actions/upload-artifact from v2 to v3
v2 uses Node.js 12.x which is EOL.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Mike Brown
3ce301ddee
Merge pull request #7349 from thaJeztah/gofmt_119
clean-up "nolint" comments, remove unused ones, update golangci-lint
2022-10-17 10:50:24 -05:00
Maksym Pavlenko
4839f1bdff Add timeouts to all CI jobs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-15 17:04:57 -07:00
Akihiro Suda
ea53e52fc0
CI: update GHA instances from Ubuntu 18.04 to 20.04
The release binaries are built using Ubuntu 18.04 in Docker on Ubuntu 20.04
for glibc compatibility reason (issue 7255).

Fix issue 7297

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-10-13 09:55:23 +09:00
Phil Estes
e7c8a5ab08
Move up actions versions to prep for deprecation
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-10-12 15:17:27 -04:00
Sebastiaan van Stijn
8b5df7d347
update golangci-lint to v1.49.0
Also remove "nolint" comments for deadcode, which is deprecated, and removed
from the defaults.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:41:01 +02:00
Sebastiaan van Stijn
54f2b51215
Update to go 1.19.2 to address CVE-2022-2879, CVE-2022-2880, CVE-2022-41715
From the mailing list:

We have just released Go versions 1.19.2 and 1.18.7, minor point releases.

These minor releases include 3 security fixes following the security policy:

- archive/tar: unbounded memory consumption when reading headers

  Reader.Read did not set a limit on the maximum size of file headers.
  A maliciously crafted archive could cause Read to allocate unbounded
  amounts of memory, potentially causing resource exhaustion or panics.
  Reader.Read now limits the maximum size of header blocks to 1 MiB.

  Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.

  This is CVE-2022-2879 and Go issue https://go.dev/issue/54853.

- net/http/httputil: ReverseProxy should not forward unparseable query parameters

  Requests forwarded by ReverseProxy included the raw query parameters from the
  inbound request, including unparseable parameters rejected by net/http. This
  could permit query parameter smuggling when a Go proxy forwards a parameter
  with an unparseable value.

  ReverseProxy will now sanitize the query parameters in the forwarded query
  when the outbound request's Form field is set after the ReverseProxy.Director
  function returns, indicating that the proxy has parsed the query parameters.
  Proxies which do not parse query parameters continue to forward the original
  query parameters unchanged.

  Thanks to Gal Goldstein (Security Researcher, Oxeye) and
  Daniel Abeles (Head of Research, Oxeye) for reporting this issue.

  This is CVE-2022-2880 and Go issue https://go.dev/issue/54663.

- regexp/syntax: limit memory used by parsing regexps

  The parsed regexp representation is linear in the size of the input,
  but in some cases the constant factor can be as high as 40,000,
  making relatively small regexps consume much larger amounts of memory.

  Each regexp being parsed is now limited to a 256 MB memory footprint.
  Regular expressions whose representation would use more space than that
  are now rejected. Normal use of regular expressions is unaffected.

  Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.

  This is CVE-2022-41715 and Go issue https://go.dev/issue/55949.

View the release notes for more information: https://go.dev/doc/devel/release#go1.19.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-04 20:58:06 +02:00
Samuel Karp
34d078e99f
Merge pull request #7192 from cpuguy83/test_summary 2022-09-26 15:28:33 -07:00
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
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
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
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
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
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
Kazuyoshi Kato
a3bfa58b00 Make oss-fuzz mandatory
It has been disabled since some fuzzers were coming from
cncf/cncf-fuzzing repository and keeping them up-to-date was difficult.

However, the external repository is no longer used from oss-fuzz since
https://github.com/google/oss-fuzz/pull/8360.

As like other unit/integration tests, we should maintain the fuzzers in
this repository and fix any failures.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-30 16:32:46 +00:00
Paco Xu
9525b3148a migrate from k8s.gcr.io to registry.k8s.io
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-08-24 13:46:46 +08:00
Daniel Canter
912d43b2bd Revert "Downgrade MinGW to version 10.2.0"
This reverts commit 1ef4bda433.

Previously we were downgrading mingw to work around an issue in the race
detector in Go on Windows when used with a newer version of GCC. The
issue was first reported here:

golang/go#46099

Shortly after the release of 1.19 someone had commented this issue was
solved for them, and after trying it out in some test runs on actions
machines, it seems to be the case. Disabling ASLR got things in order, and
PIE was disabled for -race builds in 1.19, so this is likely the reason
things work now:
0c7fcf6bd1.

The downgrade was mostly harmless except for two shortcomings:

1. It took quite a while for the package to get downloaded+installed.

2. Chocolatey would frequently fail to download with `The remote file
either doesn't exist, is unauthorized, or is forbidden for url ...
Exception calling "GetResponse" with "0" argument(s): "The request
was aborted: Could not create SSL/TLS secure channel."` Restarting the
failed run would often resolve this, but a 50-50 shot of things working
is not a great situation.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-08-18 15:18:49 -07:00
Samuel Karp
396d2a7e4e
ci: remove GOPROXY environment variable due to https://github.com/go-yaml/yaml/issues/887
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-08-15 13:00:49 -07:00
Maksym Pavlenko
23f66ece59
Merge pull request #7254 from mxpv/go
Switch to Go 1.19
2022-08-10 12:12:49 -07:00
Maksym Pavlenko
8add7e5d39 Rework permission handling in scripts
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-05 17:05:36 -07:00
Derek McGowan
de68174ec3
Merge pull request #7259 from samuelkarp/release-workflow
release workflow: increase timeout to 30 minutes & remove Go setup action
2022-08-05 16:57:07 -07:00
Samuel Karp
6ba91de840
release workflow: remove Go setup action
Release builds are performed from within a Dockerfile-defined
environment and do not require Go to be installed in the GitHub Actions
runner environment.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-08-05 10:09:30 -07:00
Samuel Karp
f8add9263a
release workflow: increase timeout to 30 minutes
In the 1.6.7 release, we saw significantly longer execution time for
producing builds that exceeded the previous timeout of 10 minutes,
causing the workflow to fail.  After increasing to 20 minutes in the
release/1.6 branch, we continued to see one failure (which succeeded on
retry).

Increase to 30 minutes to provide additional buffer for the build to
complete.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-08-05 10:08:04 -07:00
Akihiro Suda
4818610207
release: rollback Ubuntu to 18.04 (except for riscv64)
Partially revert 0e56e4f9ff

Rollback the build environment from Ubuntu 22.04 to 18.04, except for riscv64 that isn't supported by Ubuntu 18.04.

Fix issue 7255 (`1.6.7 can't be run on Ubuntu LTS 20.04 (GLIBC_2.34 not found)`)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-08-06 01:00:49 +09:00
Maksym Pavlenko
4a11a40189 Update golangci-lint to 1.48 with Go 1.19 support
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 18:16:17 -07:00
Maksym Pavlenko
ea66130295 Switch to Go 1.19
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 18:05:44 -07:00
Maksym Pavlenko
7787168ccc Use global env variable to specify Go version on CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 14:50:29 -07:00
Daniel Canter
e1c5d71c0c Update golang to 1.18.5, 1.17.13
Update Go runtime to 1.18.5 to address CVE-2022-32189.

Full diff:
https://github.com/golang/go/compare/go1.18.4...go1.18.5

--------------------------------------------------------

From the security announcement:
https://groups.google.com/g/golang-announce/c/YqYYG87xB10

We have just released Go versions 1.18.5 and 1.17.13, minor point
releases.

These minor releases include 1 security fixes following the security
policy:

encoding/gob & math/big: decoding big.Float and big.Rat can panic

Decoding big.Float and big.Rat types can panic if the encoded message is
too short.

This is CVE-2022-32189 and Go issue https://go.dev/issue/53871.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.18.5

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-08-02 11:54:45 -07:00
Maksym Pavlenko
6c14ca25d4 Fix cleanup in critest
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-29 13:44:14 -07:00
Derek McGowan
6acde90772
Merge pull request #7069 from fuweid/failpoint-in-runc-shimv2
test: introduce failpoint control to runc-shimv2 and cni
2022-07-26 23:12:20 -07:00
Baoshuo
f4d05f2073
chore: bump macos runner version
GitHub Action is sunsetting the macOS 10.15 Actions runner. It will stop working intermittently until being completely removed by 2022-8-30: https://github.blog/changelog/2022-07-20-github-actions-the-macos-10-15-actions-runner-image-is-being-deprecated-and-will-be-removed-by-8-30-22

Signed-off-by: Baoshuo Ren <i@baoshuo.ren>
2022-07-27 09:54:18 +08:00
Wei Fu
3c5e80b63e integration: Add injected failpoint testing for RunPodSandbox
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
Maksym Pavlenko
60f51c1aa3 Update and align golangci-lint version
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-15 13:22:06 -07:00
Fu Wei
c0f0627319
Merge pull request #7164 from mxpv/cri-fork 2022-07-15 15:19:28 +08:00
Maksym Pavlenko
b8e93774c1 Enable integration tests against sandboxed CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-13 12:02:06 -07:00
Sebastiaan van Stijn
4ffef752d0
update golang to 1.18.4, 1.17.12
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:

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

This update addresses:

CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.

Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4

From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE

We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:

- net/http: improper sanitization of Transfer-Encoding header

  The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
  a "chunked" encoding. This could potentially allow for request smuggling, but
  only if combined with an intermediate server that also improperly failed to
  reject the header as invalid.

  This is CVE-2022-1705 and https://go.dev/issue/53188.

- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
  containing a nil value for the X-Forwarded-For header, ReverseProxy would set
  the client IP as the value of the X-Forwarded-For header, contrary to its
  documentation. In the more usual case where a Director function set the
  X-Forwarded-For header value to nil, ReverseProxy would leave the header
  unmodified as expected.

  This is https://go.dev/issue/53423 and CVE-2022-32148.

  Thanks to Christian Mehlmauer for reporting this issue.

- compress/gzip: stack exhaustion in Reader.Read

  Calling Reader.Read on an archive containing a large number of concatenated
  0-length compressed files can cause a panic due to stack exhaustion.

  This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.

- encoding/xml: stack exhaustion in Unmarshal

  Calling Unmarshal on a XML document into a Go struct which has a nested field
  that uses the any field tag can cause a panic due to stack exhaustion.

  This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.

- encoding/xml: stack exhaustion in Decoder.Skip

  Calling Decoder.Skip when parsing a deeply nested XML document can cause a
  panic due to stack exhaustion. The Go Security team discovered this issue, and
  it was independently reported by Juho Nurminen of Mattermost.

  This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.

- encoding/gob: stack exhaustion in Decoder.Decode

  Calling Decoder.Decode on a message which contains deeply nested structures
  can cause a panic due to stack exhaustion.

  This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.

- path/filepath: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.

- io/fs: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.

- go/parser: stack exhaustion in all Parse* functions

  Calling any of the Parse functions on Go source code which contains deeply
  nested types or declarations can cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 11:59:05 +02:00
Gabriel Adrian Samfira
1ef4bda433
Downgrade MinGW to version 10.2.0
There is currently an issue in the race detector in Go on Windows when
used with a newer version of GCC. The issue was first reported here:

https://github.com/golang/go/issues/46099

Fixes #7104

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-06-27 22:40:08 +03:00
Nashwan Azhari
7002fc2c47 Ensure Windows Periodic workflow errors out while still uploading results.
This patch aims to ensure that any test failures in the Windows Periodic
workflow will lead to the workflow being marked as failed (red) while still
processing/uploading the JUnit result files to GCloud for them to show
up in testgrid.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-06-20 20:46:49 +03:00
Kazuyoshi Kato
55dd56e52b Make CI Fuzz optional
Until we merge cncf/cncf-fuzzing into this repository (see #7066),
we should keep this step optional.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-15 22:35:42 +00:00