Commit Graph

311 Commits

Author SHA1 Message Date
Luca Comellini
c5fff10fe7
Bump golangci-lint to v1.50.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-12-12 22:48:55 -08:00
Maksym Pavlenko
36641eade6
Merge pull request #7794 from austinvazquez/upgrade-github-actions-packages
Upgrade GitHub actions packages in release workflow
2022-12-11 10:37:34 -08:00
Austin Vazquez
66f71ea4d5 Enable GitHub Actions local Linux CI runs
Sync package index and automatic yes to apt repository prompts.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-12-11 04:37:21 +00:00
Austin Vazquez
14a38e12b7
Upgrade GitHub actions packages in release workflow
Resolve NodeJS 12 and command deprecation warnings by upgrading
docker/setup-buildx-action and crazy-max/ghaction-github-runtime
packages.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-12-10 07:58:35 +00:00
Sebastiaan van Stijn
85776d2c67
update to go1.19.4, go1.18.9
Includes security fixes for net/http (CVE-2022-41717, CVE-2022-41720),
and os (CVE-2022-41720).

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

- os, net/http: avoid escapes from os.DirFS and http.Dir on Windows

  The os.DirFS function and http.Dir type provide access to a tree of files
  rooted at a given directory. These functions permitted access to Windows
  device files under that root. For example, os.DirFS("C:/tmp").Open("COM1")
  would open the COM1 device.
  Both os.DirFS and http.Dir only provide read-only filesystem access.

  In addition, on Windows, an os.DirFS for the directory \(the root of the
  current drive) can permit a maliciously crafted path to escape from the
  drive and access any path on the system.

  The behavior of os.DirFS("") has changed. Previously, an empty root was
  treated equivalently to "/", so os.DirFS("").Open("tmp") would open the
  path "/tmp". This now returns an error.

  This is CVE-2022-41720 and Go issue https://go.dev/issue/56694.

- net/http: limit canonical header cache by bytes, not entries

  An attacker can cause excessive memory growth in a Go server accepting
  HTTP/2 requests.

  HTTP/2 server connections contain a cache of HTTP header keys sent by
  the client. While the total number of entries in this cache is capped,
  an attacker sending very large keys can cause the server to allocate
  approximately 64 MiB per open connection.

  This issue is also fixed in golang.org/x/net/http2 vX.Y.Z, for users
  manually configuring HTTP/2.

  Thanks to Josselin Costanzi for reporting this issue.

  This is CVE-2022-41717 and Go issue https://go.dev/issue/56350.

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

And the milestone on the issue tracker:
https://github.com/golang/go/issues?q=milestone%3AGo1.19.4+label%3ACherryPickApproved

Full diff: https://github.com/golang/go/compare/go1.19.3...go1.19.4

The golang.org/x/net fix is in 1e63c2f08a

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-06 22:48:09 +01:00
Austin Vazquez
8c035d3873 Resolve warnings in Windows GitHub Actions periodic workflows
Upgrade actions/github-script from v3 to v6 to resolve Node.js 12
and `set-output` command warnings.
Upgrade google-github-actions/upload-cloud-storage from v0.8.0 to
v0.10.4 to resolve `set-output` command warnings.
Upgrade actions/checkout from v2 to v3 to resolve Node.js 12 warnings.
Remove references to `set-output` command from workflow.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-11-23 03:34:55 +00:00
Kazuyoshi Kato
49251e4de6
Merge pull request #7707 from austinvazquez/resolve-scorecards-workflow-warnings
Resolve Scorecards GitHub Actions workflow warnings
2022-11-21 10:48:32 -08:00
Austin Vazquez
5a7c108ba4 Resolve Scorecards GitHub Actions workflow warnings
Allow actions/checkout in scorecards workflow to use v3.1.0 commit.
Resolves `save-state` command usage warnings.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-11-21 16:21:57 +00:00
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