Commit Graph

382 Commits

Author SHA1 Message Date
dependabot[bot]
2c8ee29ade chore(deps): bump github.com/moby/term (#23587)
Bumps [github.com/moby/term](https://github.com/moby/term) from 0.0.0-20210619224110-3f7ff695adc6 to 0.5.0.
- [Commits](https://github.com/moby/term/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/moby/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 11:47:23 -04:00
dependabot[bot]
1ba16f11ec chore(deps): bump github.com/containernetworking/cni from 1.1.2 to 1.2.3 (#23701)
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.1.2 to 1.2.3.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.1.2...v1.2.3)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 11:45:57 -04:00
dependabot[bot]
8e6ccf38ff chore(deps): bump github.com/docker/docker (#23731)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 27.0.2+incompatible to 27.1.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v27.0.2...v27.1.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 11:41:54 -04:00
Deniz Onur Duzgun
7a2c70e3f6 deps: bump azidentity to v1.7.0 (#23664) 2024-07-22 15:03:19 -04:00
dependabot[bot]
cf6ce224b3 chore(deps): bump github.com/hashicorp/go-checkpoint (#23588) 2024-07-19 15:13:43 +01:00
Tim Gross
857f20e0ba deps: update go-kms-wrapping and Azure SDK (#23622)
I'm pulling this out to a shared PR between the two, because it'll make
backporting easier.

Closes: #23621
Closes: #23589
2024-07-18 10:18:42 -04:00
Tim Gross
c970d22164 keyring: support external KMS for key encryption key (KEK) (#23580)
In Nomad 1.4.0, we shipped support for encrypted Variables and signed Workload
Identities, but the key material is protected only by a AEAD encrypting the
KEK. Add support for Vault transit encryption and external KMS from major cloud
providers. The servers call out to the external service to decrypt each key in
the on-disk keystore.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Fixes: https://github.com/hashicorp/nomad/issues/14852
2024-07-18 09:42:28 -04:00
dependabot[bot]
81a5eed99b chore(deps): bump github.com/container-storage-interface/spec (#23514)
Bumps [github.com/container-storage-interface/spec](https://github.com/container-storage-interface/spec) from 1.7.0 to 1.10.0.
- [Release notes](https://github.com/container-storage-interface/spec/releases)
- [Commits](https://github.com/container-storage-interface/spec/compare/v1.7.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/container-storage-interface/spec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:56:03 -05:00
dependabot[bot]
9381febedb chore(deps): bump github.com/klauspost/cpuid/v2 from 2.2.5 to 2.2.8 (#23513)
Bumps [github.com/klauspost/cpuid/v2](https://github.com/klauspost/cpuid) from 2.2.5 to 2.2.8.
- [Release notes](https://github.com/klauspost/cpuid/releases)
- [Changelog](https://github.com/klauspost/cpuid/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/cpuid/compare/v2.2.5...v2.2.8)

---
updated-dependencies:
- dependency-name: github.com/klauspost/cpuid/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:55:00 -05:00
dependabot[bot]
4ccc613165 build(deps): bump github.com/gorilla/handlers from 1.5.1 to 1.5.2 (#23356)
Bumps [github.com/gorilla/handlers](https://github.com/gorilla/handlers) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/gorilla/handlers/releases)
- [Commits](https://github.com/gorilla/handlers/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/gorilla/handlers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:54:07 -05:00
dependabot[bot]
83b5a4cbfd chore(deps): bump github.com/shoenig/go-landlock from 1.2.0 to 1.2.1 (#23512)
Bumps [github.com/shoenig/go-landlock](https://github.com/shoenig/go-landlock) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/shoenig/go-landlock/releases)
- [Commits](https://github.com/shoenig/go-landlock/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/shoenig/go-landlock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 07:53:31 -05:00
dependabot[bot]
a01c688984 chore(deps): bump github.com/hashicorp/go-envparse (#23471)
Bumps [github.com/hashicorp/go-envparse](https://github.com/hashicorp/go-envparse) from 0.0.0-20180119215841-310ca1881b22 to 0.1.0.
- [Release notes](https://github.com/hashicorp/go-envparse/releases)
- [Commits](https://github.com/hashicorp/go-envparse/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-envparse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 09:30:49 +02:00
dependabot[bot]
ec294dab1d chore(deps): bump github.com/docker/docker (#23472)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.0.2+incompatible to 27.0.2+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.0.2...v27.0.2)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  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>
2024-07-01 09:29:57 +02:00
Tim Gross
bd2a2ce33c deps: update Consul API and consul-template (#23436)
* Upgrade consul-template to 0.39.0 to allow template queries of admin
  partitions and sameness groups.
* Upgrade our Consul API to 1.29.1 because it's required for CT, and to remove
  the replacement pinned version we were using to pick up some newer Consul API
  features we needed in 1.7.0.

Ref: https://hashicorp.atlassian.net/browse/NET-10153
2024-06-26 08:49:35 -04:00
dependabot[bot]
c5b7f6b3c5 chore(deps): bump github.com/hashicorp/go-getter from 1.7.4 to 1.7.5 (#23434)
Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml)
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 16:43:02 -04:00
dependabot[bot]
3dc7fdaad6 chore(deps): bump github.com/hashicorp/go-retryablehttp (#23428)
Bumps [github.com/hashicorp/go-retryablehttp](https://github.com/hashicorp/go-retryablehttp) from 0.7.2 to 0.7.7.
- [Changelog](https://github.com/hashicorp/go-retryablehttp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/go-retryablehttp/compare/v0.7.2...v0.7.7)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-retryablehttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 09:04:49 -04:00
dependabot[bot]
a80ebe2c15 chore(deps): bump github.com/docker/docker (#20460)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.0.1+incompatible to 26.0.2+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.0.1...v26.0.2)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 16:53:29 -04:00
Tim Gross
d9a10a6298 deps: update runc to 1.1.13 (#23331)
Update `runc` to 1.1.13 to pick up build support for Go 1.22.4+, in order to
ensure we've resolved errors cloning processes into Linux namespaces for
libcontainer (`exec` driver) with new versions of Go and older but still
supported versions of glibc.

This changeset has two minor quirks:

* Testing shows that the reported issues is already resolved on `main` by
  upgrading to Go 1.22.4 without this dependency bump, at least for glibc 2.31.
  Upgrading the dependency should make sure there isn't another glibc version
  where the problem will still appear.

* This version of `runc` refers to fields in `cilium/ebpf` which are not present
  in more recent versions of that library. So in order to build, we have to
  downgrade `cilium/ebpf`. Fortunately, `runc` is the only consumer of that
  transitive dependency.

Closes: https://github.com/hashicorp/nomad/issues/20212
Ref: https://hashicorp.atlassian.net/browse/NET-10078
2024-06-14 14:38:44 -04:00
Tim Gross
c99428d553 build: update to go1.22.4 (#23172)
Update Go toolchain to 1.22.4, which addresses two vulnerabilities in the Go
stdlib.

* CVE-2024-24789: impacts handling of certain types of invalid zip files, which
  could be exploited to create a zip file with unexpected contents. This could
  potentially impact Nomad users of `artifact` blocks who download untrusted
  artifacts.
* CVE-2024-24790: impacts parsing of IPv4-mapped IPv6 addresses.
2024-06-05 09:03:15 -04:00
Charlie Voiselle
180bab892d Update hcl/v2 to latest patched version v2.20.2-0.20240517235513-55d9c02d147d (#22439) 2024-05-31 15:42:17 -04:00
Tim Gross
623486b302 deps: vendor containernetworking/plugins functions for net NS utils (#20556)
We bring in `containernetworking/plugins` for the contents of a single file,
which we use in a few places for running a goroutine in a specific network
namespace. This code hasn't needed an update in a couple of years, and a good
chunk of what we need was previously vendored into `client/lib/nsutil`
already.

Updating the library via dependabot is causing errors in Docker driver tests
because it updates a lot of transient dependencies, and it's bringing in a pile
of new transient dependencies like opentelemetry. Avoid this problem going
forward by vendoring the remaining code we hadn't already.

Ref: https://github.com/hashicorp/nomad/pull/20146
2024-05-13 09:10:16 -04:00
James Rasell
cd9e032855 deps: upgrade hashicorp/cap to v0.6.0 (#20517) 2024-05-03 15:30:48 +01:00
dependabot[bot]
b25de662a1 chore(deps): bump github.com/docker/docker from 25.0.2+incompatible to 26.0.1+incompatible (#20389)
* chore(deps): bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 25.0.2+incompatible to 26.0.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v25.0.2...v26.0.1)

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

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

* include changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-04-18 11:35:09 -04:00
Tim Gross
e4fe564bba deps: update golang.org/x/net (#20434)
Although Nomad does not use HTTP2, vulnerability scans detect our version of
`golang.org/x/net` as having an HPACK DoS vuln (GHSA-4v7x-pqxf-cx7m). Upgrade
the library so as to quiet the alerts.

Fixes: https://github.com/hashicorp/nomad-enterprise/issues/1423
2024-04-18 10:34:35 -04:00
Tim Gross
745d1dbe10 deps: update go-getter (#20391) 2024-04-15 16:59:53 -04:00
Seth Hoenig
ae6c4c8e3f deps: purge use of old x/exp packages (#20373) 2024-04-12 08:29:00 -05:00
Tim Gross
c3e7b13d54 deps: update consul-template to 0.37.4 to fix resource leak (#20234)
A Nomad user reported an issue where template runner `View.poll` goroutines were
being leaked when using templates with many dependencies. This resource leak was
fixed in consul-template 0.37.4.

Fixes: https://github.com/hashicorp/nomad/issues/20163
2024-03-27 11:51:34 -04:00
Michael Schurter
23e4b7c9d2 Upgrade go-msgpack to v2 (#20173)
Replaces #18812

Upgraded with:
```
find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/go-msgpack\/codec"/"github.com\/hashicorp\/go-msgpack\/v2\/codec/" '{}' ';'
find . -name '*.go' -exec sed -i s/"github.com\/hashicorp\/net-rpc-msgpackrpc"/"github.com\/hashicorp\/net-rpc-msgpackrpc\/v2/" '{}' ';'
go get
go get -v -u github.com/hashicorp/raft-boltdb/v2
go get -v github.com/hashicorp/serf@5d32001edfaa18d1c010af65db707cdb38141e80
```

see https://github.com/hashicorp/go-msgpack/releases/tag/v2.1.0
for details
2024-03-21 11:44:23 -07:00
Luke Kysow
9c3bbd191a Bump consul-template to 0.37.2 (#20105) 2024-03-08 14:56:35 -05:00
Tim Gross
ac366521f2 deps: upgrade protobuf lib to 1.33.0 (#20100)
Although Nomad is not vulnerable to CVE-2024-24786 because it's configured to
discard unknown messages during unmarshaling, we should upgrade so that
third-party vulnerability scanners don't detect the vulnerable version and
complain.

Also update go1.22.1 changelog entry to include CVEs
2024-03-08 10:55:55 -05:00
Seth Hoenig
55b0795866 build: upgrade to go1.22 (#20066)
* build: upgrade to go1.22

* add cl

* build: use codecgen from go-msgpack v1.1.5+base32 and stringer 0.18.0

for compatability with go1.22

* ci: update golangci-lint to 1.56.2

* build: update hclogvet for go1.22

* build: bump to go1.22.1
2024-03-06 09:54:04 -06:00
Seth Hoenig
4d83733909 tests: swap testify for test in more places (#20028)
* tests: swap testify for test in plugins/csi/client_test.go

* tests: swap testify for test in testutil/

* tests: swap testify for test in host_test.go

* tests: swap testify for test in plugin_test.go

* tests: swap testify for test in utils_test.go

* tests: swap testify for test in scheduler/

* tests: swap testify for test in parse_test.go

* tests: swap testify for test in attribute_test.go

* tests: swap testify for test in plugins/drivers/

* tests: swap testify for test in command/

* tests: fixup some test usages

* go: run go mod tidy

* windows: cpuset test only on linux
2024-02-29 12:11:35 -06:00
Tim Gross
df86503349 template: sandbox template rendering
The Nomad client renders templates in the same privileged process used for most
other client operations. During internal testing, we discovered that a malicious
task can create a symlink that can cause template rendering to read and write to
arbitrary files outside the allocation sandbox. Because the Nomad agent can be
restarted without restarting tasks, we can't simply check that the path is safe
at the time we write without encountering a time-of-check/time-of-use race.

To protect Nomad client hosts from this attack, we'll now read and write
templates in a subprocess:

* On Linux/Unix, this subprocess is sandboxed via chroot to the allocation
  directory. This requires that Nomad is running as a privileged process. A
  non-root Nomad agent will warn that it cannot sandbox the template renderer.

* On Windows, this process is sandboxed via a Windows AppContainer which has
  been granted access to only to the allocation directory. This does not require
  special privileges on Windows. (Creating symlinks in the first place can be
  prevented by running workloads as non-Administrator or
  non-ContainerAdministrator users.)

Both sandboxes cause encountered symlinks to be evaluated in the context of the
sandbox, which will result in a "file not found" or "access denied" error,
depending on the platform. This change will also require an update to
Consul-Template to allow callers to inject a custom `ReaderFunc` and
`RenderFunc`.

This design is intended as a workaround to allow us to fix this bug without
creating backwards compatibility issues for running tasks. A future version of
Nomad may introduce a read-only mount specifically for templates and artifacts
so that tasks cannot write into the same location that the Nomad agent is.

Fixes: https://github.com/hashicorp/nomad/issues/19888
Fixes: CVE-2024-1329
2024-02-08 10:40:24 -05:00
hc-github-team-nomad-core
c03c735c99 Backport of deps: update dependencies indirectly bringing in older runc into release/1.7.x #19866
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-02-08 10:40:24 -05:00
hc-github-team-nomad-core
af7cf79df7 Backport of chore(deps): bump github.com/opencontainers/runc from 1.1.10 to 1.1.12 into release/1.7.x #19862
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-08 10:40:24 -05:00
Tim Gross
f1637bdd5f deps: update dependencies indirectly bringing in older runc (#19863)
Although Nomad itself is not vulnerable to CVE-2024-21626, we want to update
dependencies that bring in the vulnerable packages so as not to trip
vulnerability scanners. Update `containerd` and `go-dockerclient` as well as the
various transitive dependencies these bring in.
2024-02-02 16:08:22 -05:00
dependabot[bot]
b94a193c8a chore(deps): bump github.com/opencontainers/runc from 1.1.10 to 1.1.12 (#19851)
* chore(deps): bump github.com/opencontainers/runc from 1.1.10 to 1.1.12

Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.10 to 1.1.12.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.12/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.10...v1.1.12)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
...

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

* add changelog entry

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-02-02 10:18:53 -05:00
dependabot[bot]
af2cdc98a5 chore(deps): bump golang.org/x/sync from 0.4.0 to 0.6.0 (#19792) 2024-01-22 07:32:21 +00:00
dependabot[bot]
d62280941d chore(deps): bump github.com/hashicorp/go-immutable-radix/v2 (#19734) 2024-01-15 10:27:31 +00:00
dependabot[bot]
40bbddf3d8 chore(deps): bump github.com/prometheus/client_golang (#19733) 2024-01-15 08:24:43 +00:00
dependabot[bot]
f3bc9c7c41 chore(deps): bump github.com/docker/docker (#19672) 2024-01-09 08:24:20 +00:00
dependabot[bot]
398b5000c1 chore(deps): bump github.com/hashicorp/go-plugin from 1.4.10 to 1.6.0 (#19646)
Co-authored-by: James Rasell <jrasell@hashicorp.com>
2024-01-08 08:26:34 +00:00
dependabot[bot]
37af843b01 chore(deps): bump github.com/opencontainers/runc from 1.1.8 to 1.1.10 (#19289) 2024-01-05 09:57:54 +00:00
dependabot[bot]
c2e6d8aee2 build(deps): bump github.com/containerd/containerd from 1.6.18 to 1.6.26 (#19531) 2024-01-05 09:29:14 +00:00
dependabot[bot]
b2f640346d build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#19514) 2023-12-19 11:17:48 +00:00
Luiz Aoqui
099ee06a60 Revert "deps: update go-metrics to v0.5.3 (#19190)" (#19374)
* Revert "deps: update go-metrics to v0.5.3 (#19190)"

This reverts commit ddb060d8b3.

* changelog: add entry for #19374
2023-12-08 08:46:55 -05:00
Luiz Aoqui
ddb060d8b3 deps: update go-metrics to v0.5.3 (#19190)
Update `go-metrics` to v0.5.3 to pick
https://github.com/hashicorp/go-metrics/pull/146.
2023-11-28 12:37:57 -05:00
dependabot[bot]
73746cc199 chore(deps): bump google.golang.org/grpc from 1.55.0 to 1.59.0 (#18908) 2023-11-27 09:07:17 +00:00
dependabot[bot]
2bbce293ad chore(deps): bump github.com/hashicorp/go-kms-wrapping/v2 (#19175) 2023-11-27 08:41:01 +00:00
dependabot[bot]
36b74496a5 chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#19146)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 20:20:45 -05:00