Commit Graph

68 Commits

Author SHA1 Message Date
Aaron Gable 944a865f0d
Install v2.20.0 of docker-compose-plugin (#6997)
Work around the bug[1] in docker-compose-plugin v2.19.1, which is
included in the current github actions ubuntu 20.04 runner image[2].

[1] https://github.com/docker/compose/issues/10777
[2] https://github.com/actions/runner-images/issues/7916

Part of https://github.com/letsencrypt/boulder/issues/6998
2023-07-13 17:33:38 -04:00
Phil Porada c7dc3a8d72
Test against go1.20.6 (#6987)
This version includes a fix that seems relevant to us:

> The HTTP/1 client did not fully validate the contents of the Host
header. A maliciously crafted Host header could inject additional
headers or entire requests. The HTTP/1 client now refuses to send
requests containing an invalid Request.Host or Request.URL.Host value.
> 
> Thanks to Bartek Nowotarski for reporting this issue.
> 
> Includes security fixes for CVE-2023-29406 and Go issue
https://go.dev/issue/60374
2023-07-11 12:50:42 -07:00
Phil Porada 947e199016
Add govulncheck to CI (#6963)
Fixes https://github.com/letsencrypt/boulder/issues/6354

Runs
[govulncheck](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck) in
a one-shot container so that PR creation, updates to a PR, and merges
to main can contact the govuln API and check for known vulnerabilities.

Lastly, upgrades the version of golangci-lint to the [latest available
(v1.53.3)](https://github.com/golangci/golangci-lint/releases).

---------

Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
2023-07-11 09:51:20 -04:00
dependabot[bot] 0337fb81e6
build(deps): bump docker/login-action from 2.1.0 to 2.2.0 (#6973)
Bumps https://github.com/docker/login-action from 2.1.0 to 2.2.0.

- Release notes: https://github.com/docker/login-action/releases/tag/v2.2.0
- Commits: https://github.com/docker/login-action/compare/v2.1.0...v2.2.0
2023-07-05 10:43:00 -07:00
Aaron Gable cc596bd4eb
Begin testing on go1.21rc2 with loopvar experiment (#6952)
Add go1.21rc2 to the matrix of go versions we test against.

Add a new step to our CI workflows (boulder-ci, try-release, and
release) which sets the "GOEXPERIMENT=loopvar" environment variable if
we're running go1.21. This experiment makes it so that loop variables
are scoped only to their single loop iteration, rather than to the whole
loop. This prevents bugs such as our CAA Rechecking incident
(https://bugzilla.mozilla.org/show_bug.cgi?id=1619047). Also add a line
to our docker setup to propagate this environment variable into the
container, where it can affect builds.

Finally, fix one TLS-ALPN-01 test to have the fake subscriber server
actually willing to negotiate the acme-tls/1 protocol, so that the ACME
server's tls client actually waits to (fail to) get the certificate,
instead of dying immediately. This fix is related to the upgrade to
go1.21, not the loopvar experiment.

Fixes https://github.com/letsencrypt/boulder/issues/6950
2023-06-26 16:35:29 -07:00
Aaron Gable 8224fad20b
Update to go1.20.5 (#6946)
We are already running go1.20.5 in production.
2023-06-20 14:55:37 -07:00
Aaron Gable 26adec08cc
Remove go1.20.3 from CI (#6898)
We are no longer be using go1.20.3 in prod.
2023-05-22 14:47:33 -07:00
Phil Porada f8f45f90a9
Test and build release on go1.20.4 (#6862)
[Go 1.20.4](https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU)
contains a security updates for the html/template package, which we use
in `//cmd/bad-key-revoker`.
2023-05-04 10:55:02 -04:00
Aaron Gable d6192e7c56
Stop testing go1.20.2 (#6809)
Staging and Prod have fully upgraded to go1.20.3, per IN-8865.
2023-04-10 11:00:25 -07:00
Phil Porada 8824e347fd
Golang 1.20.3 security release upgrade (#6793)
Release notes: https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8

This update includes fixes for excessive memory usage when parsing
headers in the net/http package.
2023-04-04 15:33:34 -07:00
Aaron Gable 7199a88b6b
Remove go1.20.1 from CI (#6742) 2023-03-15 13:08:22 -04:00
Aaron Gable 46be4927fb
Test and build releases on go1.20.2 (#6723)
Go 1.20.2 contains a security update to the ScalarMult method in the
crypto/elliptic package, which we use inside our goodkey package.
2023-03-08 13:54:07 -08:00
Jacob Hoffman-Andrews 8f322d14e8
Update boulder-tools to 2023-02-22 (#6684) 2023-02-22 11:10:53 -08:00
Aaron Gable 1c785e75fc
Remove go1.19 from CI (#6671)
Go 1.20.1 is now deployed everywhere. Removing go 1.19 from CI will
allow us to begin adopting various go 1.20-only features that we want,
such as the new crypto/ecdh package.
2023-02-16 17:22:03 -05:00
Jacob Hoffman-Andrews f662332bcf
Speed up builds of boulder-tools images. (#6663)
Only build arm64 images for one version of Go.

Split build.sh into two scripts: build.sh (which installs apt and
Python) and install-go.sh (which installs a specific Go version and Go
dependencies). This allows reusing a cached layer for the build.sh step
across multiple Go versions.

Remove installation of fpm from build.sh. This is no longer needed since
#6669 and allows us to get rid of `rpm`, `ruby`, and `ruby-dev`.

Remove apt dependency on pkg-config, libtool, autoconf, and automake.
These were introduced in
https://github.com/letsencrypt/boulder/pull/4832 but aren't needed
anymore because we don't build softhsm2 ourselves (we get it from apt).

Remove apt dependency on cmake, libssl-dev, and openssl. I'm not totally
sure what these were needed for but they're not needed anymore.

Running this locally on my laptop for our current 3 GO_CI_VERSIONS and 1
GO_DEV_VERSION takes 23 minutes of wall time, dominated by the cross
build for arm64.
2023-02-16 09:35:39 -08:00
Jacob Hoffman-Andrews 72b32fd1e8
Remove make-artifacts from test.sh (#6669)
The code path is now adequately tested in CI with try-release.yml. This
means it will no longer be automatically tested locally with `./t.sh`,
but it can be manually tested locally with `./tools/make-assets.sh`.

Also, to ensure CI has similar coverage to the old make-artifacts phase,
change make-deb.sh to make-assets.sh, and have it make all of rpm, deb,
and tar.

Change release.yml so it uploads the .tar.gz as well as the .deb.
2023-02-15 15:38:21 -08:00
Phil Porada 28c5595ec6
Golang 1.19.6/1.20.1 security release upgrade (#6659)
Golang 1.19.6/1.20.1 security update release notes: https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E
2023-02-14 16:36:29 -05:00
Aaron Gable 18216a7ea8
Run CI tests on go1.20 (#6550)
Add go1.20 as a new version to run tests on, and to build release
artifacts from. Fix one test which was failing because it was
accidentally relying on consistent (i.e. unseeded) non-cryptographic
random number generation, which go1.20 now automatically seeds at import
time.

Update the version of golangci-lint used in our docker containers to the
new version that has go1.20 support. Remove a number of nolint comments
that were required due to an old version of the gosec linter.
2023-02-03 11:57:07 -08:00
Phil Porada c091e64aa3
Switch from docker-compose to "docker compose" (#6599)
Switch from standalone docker-compose binary to the "docker compose" subcommand everywhere.
2023-01-30 15:04:52 -05:00
Aaron Gable 86622654fc
Run tests on go1.19.5 (#6576)
Run go1.19.5 alongside go1.19.2 for a while.

Fixes #6574
2023-01-11 11:37:02 -08:00
dependabot[bot] 172384e545
build(deps): bump docker/login-action from 2.0.0 to 2.1.0 (#6447)
Bumps [docker/login-action](https://github.com/docker/login-action) from
2.0.0 to 2.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/login-action/releases">docker/login-action's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Ensure AWS temp credentials are redacted in workflow logs by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a
href="https://github-redirect.dependabot.com/docker/login-action/issues/275">#275</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.6.0 to 1.10.0 (<a
href="https://github-redirect.dependabot.com/docker/login-action/issues/252">#252</a>
<a
href="https://github-redirect.dependabot.com/docker/login-action/issues/292">#292</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0 (<a
href="https://github-redirect.dependabot.com/docker/login-action/issues/298">#298</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr-public</code> from 3.53.0 to 3.186.0
(<a
href="https://github-redirect.dependabot.com/docker/login-action/issues/299">#299</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/login-action/compare/v2.0.0...v2.1.0">https://github.com/docker/login-action/compare/v2.0.0...v2.1.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f4ef78c080"><code>f4ef78c</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/docker/login-action/issues/299">#299</a>
from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li>
<li><a
href="9ad4ce3929"><code>9ad4ce3</code></a>
Update generated content</li>
<li><a
href="884eadd4f8"><code>884eadd</code></a>
Bump <code>@​aws-sdk/client-ecr-public</code> from 3.53.0 to
3.186.0</li>
<li><a
href="a266232f5c"><code>a266232</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/docker/login-action/issues/298">#298</a>
from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li>
<li><a
href="f97efcfbf9"><code>f97efcf</code></a>
Update generated content</li>
<li><a
href="5ae789beac"><code>5ae789b</code></a>
Bump <code>@​aws-sdk/client-ecr</code> from 3.53.0 to 3.186.0</li>
<li><a
href="71c23b5b34"><code>71c23b5</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/docker/login-action/issues/292">#292</a>
from docker/dependabot/npm_and_yarn/actions/core-1.10.0</li>
<li><a
href="6401d70aab"><code>6401d70</code></a>
Update generated content</li>
<li><a
href="67e8909cc6"><code>67e8909</code></a>
Bump <code>@​actions/core</code> from 1.9.1 to 1.10.0</li>
<li><a
href="21f251affc"><code>21f251a</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/docker/login-action/issues/275">#275</a>
from crazy-max/redact-aws-creds</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/login-action/compare/v2.0.0...v2.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=2.0.0&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 15:54:16 -08:00
Aaron Gable 410732e8a7
Remove go1.18 from testing (#6459)
We are no longer running on go1.18 in production.
2022-10-21 14:55:37 -07:00
Aaron Gable 6b1857d4b0
Switch to using go1.18.7 and go1.19.2 in tests (#6437)
Fixes #6434
2022-10-18 09:45:44 -07:00
Jacob Hoffman-Andrews 582b5e346f
Make caa-log-checker run over docker logs (#6388)
This uncovered a bug! The stdout logger was truncating the microseconds part
of its timestamp if the last digit was zero. Fixed that. Also coerced the
stdout logger to use UTC.

To run the checker over our integration test logs, I changed t.sh to use
an explicit name for the container that runs boulder during the tests,
and pulled logs from that container after the tests.
2022-09-26 14:59:15 -07:00
Aaron Gable 6d3a9d17d2
Update to go1.18.6/1.19.1 for net security fixes (#6353)
Update to go1.18.6/1.19.1 for net security fixes.

Fix typos found by newer codespell.
2022-09-06 12:45:22 -07:00
Aaron Gable 00734a6edf
Stop rsyslog from de-duplicating log lines (#6291)
When rsyslog receives multiple identical log lines in a row, it can
collapse those lines into a single instance of the log line and a
follow-up line saying "message repeated X times". However, that
rsyslog-generated line does not contain our log line checksum, so it
immediately causes log-validator to complain about the line. In
addition, the rsyslog docs themselves state that this feature is a
misfeature and should never be turned on. Despite this, Ubuntu turns the
feature on by default when the rsyslog package is installed from apt.

Add an additional command to our dockerfile which overwrites Ubuntu's
default setting to disable this misfeature, and update our test
environment to use the new docker image.

Fixes #6252
2022-08-11 12:37:16 -07:00
Aaron Gable d1b211ec5a
Start testing on go1.19 (#6227)
Run the Boulder unit and integration tests with go1.19.

In addition, make a few small changes to allow both sets of
tests to run side-by-side. Mark a few tests, including our lints
and generate checks, as go1.18-only. Reformat a few doc
comments, particularly lists, to abide by go1.19's stricter gofmt.

Causes #6275
2022-08-10 15:30:43 -07:00
Aaron Gable 305f5b1bc0
Stop testing on go1.18.1 (#6258)
Prod has been updated to 1.18.4.
2022-08-02 13:20:38 -07:00
Aaron Gable b3c42639c1
Update Boulder to go1.18.4 (#6240)
Version go1.18.4 contains a number of security fixes related
to stack exhaustion in a variety of standard library packages,
some of which we (directly or indirectly) rely on.

Full release notes are at:
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE/m/3SeTTJs9AwAJ
2022-07-22 11:14:47 -07:00
dependabot[bot] 99dcb9a5b3
Bump docker/login-action from 1.8.0 to 2.0.0 (#6118)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.8.0 to 2.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.8.0...v2.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-31 15:35:52 -07:00
Jacob Hoffman-Andrews 3e01ffe8bf
Revert "Add GitHub Action for golangci-lint (#5973)" (#6138)
This reverts commit 5fe5859c38.

Per #5973:

> we will eventually want to go back to doing this in boulder-tools, so it's easy
> to run the lints locally. But this is useful so we can unblock testing on go 1.18beta2.
2022-05-25 14:35:39 -07:00
dependabot[bot] fd57e39414
Bump actions/checkout from 2 to 3 (#6107)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 14:36:27 -07:00
Aaron Gable 9b4ca235dd
Update boulder-tools dependencies (#6129)
Update:
- golangci-lint from v1.42.1 to v1.46.2
- protoc from v3.15.6 to v3.20.1
- protoc-gen-go from v1.26.0 to v1.28.0
- protoc-gen-go-grpc from v1.1.0 to v1.2.0
- fpm from v1.14.0 to v1.14.2

Also remove a reference to go1.17.9 from one last place.

This does result in updating all of our generated .pb.go files, but only
to update the version number embedded in each file's header.

Fixes #6123
2022-05-20 14:24:01 -07:00
Aaron Gable f958d479f9
Stop testing on go1.17 (#6126)
We are using exclusively go1.18 in our deployment environments.
2022-05-18 08:40:29 -07:00
nathannaveen d40edc1933
Set permissions for GitHub actions (#6044)
Explicitly restrict the permissions used by the boulder-ci workflow jobs.
2022-05-10 13:24:30 -07:00
Samantha bafe45f301
Update Go to 1.17.9 and 1.18.1 (#6047)
go1.17.9 (released 2022-04-12) includes security fixes to the crypto/elliptic and encoding/pem packages, as well as bug fixes to the linker and runtime. See the [Go 1.17.9 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.17.9+label%3ACherryPickApproved) on our issue tracker for details.

go1.18.1 (released 2022-04-12) includes security fixes to the crypto/elliptic, crypto/x509, and encoding/pem packages, as well as bug fixes to the compiler, linker, runtime, the go command, vet, and the bytes, crypto/x509, and go/types packages. See the [Go 1.18.1 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.18.1+label%3ACherryPickApproved) on our issue tracker for details.
2022-04-12 19:32:42 -07:00
Jacob Hoffman-Andrews 7d00d9fbcf
Use go1.18 in CI, and fix up Docker image (#6002)
- Remove GOPATH-style path structure, which isn't needed with Go
modules.
- Remove check for existing of docker buildx builder instance, since it
was unreliable.
2022-03-21 12:24:13 -07:00
Jacob Hoffman-Andrews 6395701244
Update CI to test go1.18beta2 (#5982)
This requires using GODEBUG to enable a couple of thing turned off by go1.18 (TLS 1.0/1.1, SHA-1 CSRs).

Also add help for a failure mode of cross builds.
2022-03-09 13:42:15 -08:00
Jacob Hoffman-Andrews 5fe5859c38
Add GitHub Action for golangci-lint (#5973)
Adapted from https://github.com/golangci/golangci-lint-action#how-to-use.
Uses the same version we've been using in boulder-tools.

Part of #5946

Note: we will eventually want to go back to doing this in boulder-tools,
so it's easy to run the lints locally. But this is useful so we can
unblock testing on go 1.18beta2.
2022-02-28 09:55:26 -08:00
Andrew Gabbitas 3bb3421631
Remove go 1.17.5 from test matrix (#5940) 2022-02-12 12:03:23 -07:00
Andrew Gabbitas fcb817897c
Add go1.17.7 to the test matrix (#5939) 2022-02-10 17:50:46 -07:00
Aaron Gable ad0e56ec4a
Remove test coverage on go1.17 (#5882) 2022-01-14 16:22:24 -08:00
Samantha 7d4facc403
test: Install arm64 protobuf for arm64 docker images (#5880) 2022-01-13 13:45:38 -08:00
Samantha 8a1b51f81b
Use go install for dep binaries when building docker (#5858)
Update the way our docker build script installs the binaries we rely on
at runtime to avoid "go get" deprecation warnings.

Fixes #5744
2021-12-16 19:02:46 -08:00
Aaron Gable c88640c816
Run tests on Go 1.17.5 (#5845)
Build a new docker container for the new Go 1.17.5 security release,
which includes a fix for the `net/http` package. Update our CI to run
tests on both our current and the new go versions.
2021-12-10 14:44:23 -08:00
Jacob Hoffman-Andrews dfc3ea434f
Tidy up CI (#5806)
Remove goreleaser since we're not currently using it.
Remove the script that moves PRs from master to main because it hasn't
been needed in practice.

Set persist-credentials: true for Boulder CI.
2021-11-17 19:18:52 -08:00
Jacob Hoffman-Andrews 803d6cfbf6
Fix leftover test.sh in matrix. (#5730) 2021-10-20 08:23:00 -07:00
Jacob Hoffman-Andrews ac125dc60f
Make test matrix results more readable (#5711)
Right now when looking at a list of Boulder CI test results, they all
say:

boulder_ci_tests (go_1.17_2021-...

Which is not very informative as to which type of test failed. This
shortens the test name to "ci", and also changes the invoked command so
more of it fits on the screen. That involves adding two new scripts,
t.sh and tn.sh, which each run `docker-compose run ... test.sh`. tn.sh
runs it with the appropriate flags to use config-next.
2021-10-14 16:15:57 -07:00
Andrew Gabbitas 258e0cf7c1
Remove go 1.16.6 from testing (#5636)
Fixes: #5585
2021-09-07 15:34:54 -06:00
Andrew Gabbitas 9fd55b6e39
Update Boulder CI to golang 1.17 (#5608)
Part of #5585
2021-08-26 14:34:36 -07:00