Commit Graph

122 Commits

Author SHA1 Message Date
dependabot[bot] c1f7de06e9
build(deps): bump actions/setup-go from 4 to 5 (#7234)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to
5.
2024-01-04 09:07:12 -05:00
Aaron Gable d84e8d08f2
Begin testing on go1.22rc1 (#7226)
Draft release notes: https://tip.golang.org/doc/go1.22
2023-12-20 11:41:35 -08:00
dependabot[bot] 260bbab2a9
build(deps): bump actions/github-script from 6 to 7 (#7174)
Bumps https://github.com/actions/github-script from 6 to 7.
- Release notes: https://github.com/actions/github-script/releases/tag/v7.0.0
- Commits: https://github.com/actions/github-script/compare/v6.4.1...v7.0.0
2023-12-12 13:25:19 -08:00
Aaron Gable 5e1bc3b501
Simplify the features package (#7204)
Replace the current three-piece setup (enum of feature variables, map of
feature vars to default values, and autogenerated bidirectional maps of
feature variables to and from strings) with a much simpler one-piece
setup: a single struct with one boolean-typed field per feature. This
preserves the overall structure of the package -- a single global
feature set protected by a mutex, and Set, Reset, and Enabled methods --
although the exact function signatures have all changed somewhat.

The executable config format remains the same, so no deployment changes
are necessary. This change does deprecate the AllowUnrecognizedFeatures
feature, as we cannot tell the json config parser to ignore unknown
field names, but that flag is set to False in all of our deployment
environments already.

Fixes https://github.com/letsencrypt/boulder/issues/6802
Fixes https://github.com/letsencrypt/boulder/issues/5229
2023-12-12 15:51:57 -05:00
Jacob Hoffman-Andrews a0e0bbdb24
boulder-tools: move install-go steps into Dockerfile (#7205)
Previously we made these a single `RUN` step in the Dockerfile to reduce
the size of the final image. Docker pulls all the dependent layers for
an image, which means that even if you delete intermediate build files
in a later `RUN` step, they still contribute to the overall download
size. You can work around that by deleting the intermediate files within
a single `RUN` step.

However, that has downsides: changing one Go dependency meant
downloading Go and all the other dependencies again. By moving these
back into `RUN` steps we get incremental builds, which are nice. And by
adding the builder pattern (`FROM ... AS godeps`), we can avoid having
intermediate files contribute to the overall image size.
2023-12-12 10:14:52 -05:00
Jacob Hoffman-Andrews c21b376623
Implement DoH for validation queries (#7178)
Fixes: #7141
2023-12-11 10:49:00 -08:00
Aaron Gable aa738b5a37
Stop testing on go1.21.4 (#7192) 2023-12-07 15:58:37 -08:00
Aaron Gable c45bfb8aed
Begin testing on go1.21.5 (#7185) 2023-12-05 11:16:55 -08:00
Aaron Gable dc2ef15ac8
CI: don't block on govulncheck, do block on vendorcheck (#7155)
Having govulncheck prevent a PR from merging means that circumstances
entirely outside our control can grind Boulder development to a halt
until they are addressed. When the vulnerability is within Go itself, it
prevents PRs from being merged until we do a production deploy, because
we want our CI to always match what is in production. This is too
strict.

This PR removes govulncheck from the set of jobs depended upon by our
Boulder CI Test Matrix meta-job. It also adds vendorcheck, which was
accidentally omitted in #7123.
2023-11-13 12:22:24 -05:00
Samantha 1bb8ef6e47
Upgrade from go1.21.3 to go1.21.4 (#7154) 2023-11-09 16:17:35 -05:00
Aaron Gable 19582cee4b
Remove go1.21.1 from CI (#7144)
We are running go1.21.3 in all environments.
2023-11-08 16:31:28 -08:00
dependabot[bot] 6d8e6e74f8
build(deps): bump actions/checkout from 3 to 4 (#7125)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
2023-11-03 09:53:57 -04:00
Matthew McPherrin 5b3c84d001
Remove the "netaccess" container from the docker-compose dev environment. (#7123)
Remove the "netaccess" container from the docker-compose dev
environment.

It isn't needed during a regular 'docker compose up' developer
environment, and only really serves as a way to use the same tools image
in CI. Two checks run during CI are the govulncheck and verifying go mod
tidy / go vendor. Neither of these checks require anything from the
custom image other than Golang itself, which can be provided directly
from the CI environment.

If a developer is working inside the existing containers, they can still
run `go mod tidy; go mod vendor` themselves, which is a standard Golang
workflow and thus is simpler than using the netaccess image via docker
compose.
2023-11-01 15:11:51 -07:00
Phil Porada d250a3d7e9
Update to go1.21.3 (#7114)
The [go1.21.3
release](https://groups.google.com/g/golang-announce/c/iNNxDTCjZvo)
contains updates to the `net/http` package for the [HTTP/2 rapid reset
bug](https://cloud.google.com/blog/products/identity-security/how-it-works-the-novel-http2-rapid-reset-ddos-attack).
The fixes in `x/net/http2` will be handled by [another
PR](https://github.com/letsencrypt/boulder/pull/7113).

The following CVEs are fixed in this release:
- [CVE-2023-39325](https://nvd.nist.gov/vuln/detail/CVE-2023-39325)
- [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487)
2023-10-12 15:08:42 -07:00
dependabot[bot] 98a3f14ff6
build(deps): bump docker/login-action from 2.2.0 to 3.0.0 (#7105)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 12:47:53 -04:00
Aaron Gable 58ec67c7a8
Remove go1.20 from CI (#7071)
We now deploy go1.21.1 in both Staging and in Prod.
2023-09-08 14:32:51 -04:00
Samantha b13174538d
go: Update go1.20.7 and go1.21rc4 to go1.20.8 and go1.21.1 (#7068) 2023-09-06 16:05:05 -04:00
Phil Porada 439517543b
CI: Run staticcheck standalone (#7055)
Run staticcheck as a standalone binary rather than as a library via
golangci-lint. From the golangci-lint help out,
> staticcheck (megacheck): It's a set of rules from staticcheck. It's
not the same thing as the staticcheck binary. The author of staticcheck
doesn't support or approve the use of staticcheck as a library inside
golangci-lint.

We decided to disable ST1000 which warns about incorrect or missing
package comments.

For SA4011, I chose to change the semantics[1] of the for loop rather
than ignoring the SA4011 lint for that line.

Fixes https://github.com/letsencrypt/boulder/issues/6988

1. https://go.dev/ref/spec#Continue_statements
2023-08-31 21:09:40 -07:00
Aaron Gable 4c6a875926
Remove defunct github actions workflows (#7027)
These workflows relied on old-style Personal Access Tokens. They've been
disabled for a while, and we have no intention of re-enabling them. The
add-to-project workflow in particular has been fully replaced by
Projects-native features.
2023-08-02 16:02:32 -07:00
Samantha 41c9c6b961
CI: Fix permissions for check-changes (#7029) 2023-08-02 17:28:17 -04:00
Aaron Gable 359d3f7a1d
Update CI to go1.20.7 and go1.21rc4 (#7028) 2023-08-02 14:26:43 -07:00
Aaron Gable 2ecd3700df
Revert "Install v2.20.0 of docker-compose-plugin" (#7019)
Reverts https://github.com/letsencrypt/boulder/pull/6997, which manually
installed a specific version of the docker compose cli plugin to work
around a bug in the version installed by default. The images now ship
the fixed version by default
(https://github.com/actions/runner-images/issues/7916#issuecomment-1649361508),
so we can remove the workaround.

Fixes https://github.com/letsencrypt/boulder/issues/6998
2023-08-02 16:24:50 -04:00
Samantha 686b2aa684
CI: Add GitHub workflow for detecting configuration changes (#7024)
(https://github.com/beautifulentropy/boulder/pull/33 to see it in
action)

Fixes #7021
2023-08-02 13:41:33 -04:00
dependabot[bot] 0a3ce04d38
build(deps): bump docker/login-action from 2.1.0 to 2.2.0 (#7017)
Bumps docker/login-action from 2.1.0 to 2.2.0.
- Release notes: https://github.com/docker/login-action/releases/tag/v2.2.0
- Diff: https://github.com/docker/login-action/compare/v2.1.0...v2.2.0
2023-08-01 09:39:40 -07:00
Jacob Hoffman-Andrews 04a4805042
tests: add explicit versions to Python dependencies (#6993)
This avoids a situation where building a fresh boulder-tools image
accidentally brings in a new version of codespell, which flags new
misspellings.
2023-07-20 11:20:26 -07:00
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
Aaron Gable 0b4d2f4a66
Reduce dependabot frequency (#6799) 2023-04-05 15:46:19 -04: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 581ea05d21
Separate release creation and asset upload (#6648)
Split creating a release and uploading build assets to that release into
two separate steps. This allows the release creation step to have the
"continue on error" flag set, so that whichever release job completes
first can create the release, while the slower one will fail, move on,
and still successfully upload its files.
2023-02-10 12:17:26 -05:00
Jacob Hoffman-Andrews 3783472b36
Release on only one Go version (#6637)
Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
2023-02-07 14:29:53 -08:00
Phil Porada 28214e331d
Quote Go version to prevent yaml interpreting value as a float (#6634) 2023-02-07 16:30:49 -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
Jacob Hoffman-Andrews 85e8f1f5cf
Change GHA release workflow to not use artifacts (#6590)
Fixes #6571
2023-01-19 14:30:26 -08: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