Commit Graph

17020 Commits

Author SHA1 Message Date
Samuel Karp
f4e7944625 cri/config: use ScrubLogs by default on Windows
The io.containerd.runhcs.v1 shim can scrub sensitive information from
logs it emits. Since v0.15.0-rc.2 this is done by default, but older
branches still require the option to be explicitly enabled. Explicitly
enable the scrubbing by default for the CRI configuration.

See also: https://github.com/microsoft/hcsshim/pull/2725

Google-Bug-Id: 481375460
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2026-07-24 00:06:30 -07:00
Maksym Pavlenko
ffcf715dfa Merge pull request #13343 from containerd/dependabot/go_modules/github.com/fsnotify/fsnotify-1.10.1
build(deps): bump github.com/fsnotify/fsnotify from 1.9.0 to 1.10.1
2026-07-23 22:15:51 +00:00
dependabot[bot]
b1085e19b7 build(deps): bump github.com/fsnotify/fsnotify from 1.9.0 to 1.10.1
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.9.0 to 1.10.1.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.9.0...v1.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-23 20:53:25 +00:00
Maksym Pavlenko
a82706307a Merge pull request #13187 from bitoku/cri-list-streaming
cri: add streaming RPCs
2026-07-23 18:10:55 +00:00
Mike Brown
857237845d Merge pull request #13453 from liggitt/binary-env-main
Handle []byte envvar value for CRI
2026-07-23 17:37:44 +00:00
Maksym Pavlenko
f2e253ffaa Merge pull request #13820 from containerd/dependabot/go_modules/github.com/erofs/go-erofs-0.3.1
build(deps): bump github.com/erofs/go-erofs from 0.3.0 to 0.3.1
2026-07-23 16:09:44 +00:00
Ayato Tokubi
47c7085d22 cri: add streaming RPCs
Add server-streaming variants of CRI list RPCs (StreamContainers,
StreamPodSandboxes, StreamContainerStats, StreamPodSandboxStats,
StreamPodSandboxMetrics, StreamImages) that send results in batches
of 5000 items.

Signed-off-by: Ayato Tokubi <atokubi@redhat.com>
2026-07-23 09:57:59 -05:00
Jordan Liggitt
b824ddc0b5 Handle []byte envvar value
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2026-07-23 10:39:48 -04:00
Jordan Liggitt
78abbfb7f7 update to v0.36.x kubernetes dependencies
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2026-07-23 10:39:43 -04:00
Maksym Pavlenko
4c9842f35e Merge pull request #13790 from halaney/ahalaney/shim-leak-error
shim_load: Consider shim leaked only if we can't find pids
2026-07-22 16:48:07 +00:00
Maksym Pavlenko
e05f673e27 Merge pull request #13827 from mxpv/windows
Fix flaky CI on windows
2026-07-22 15:24:59 +00:00
Samuel Karp
55e47e129a Merge pull request #13812 from ningmingxiao/bump_nri
build: bump github.com/containerd/nri
2026-07-22 05:52:20 +00:00
Maksym Pavlenko
dd654ecca0 Fix does not contain \x00 on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-07-21 21:39:27 -07:00
Maksym Pavlenko
5c620e984f Fix NET/network CI failure on Windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-07-21 21:00:34 -07:00
Maksym Pavlenko
51bf0959da Merge pull request #13819 from containerd/dependabot/go_modules/api/golang.org/x/net-0.55.0
build(deps): bump golang.org/x/net from 0.51.0 to 0.55.0 in /api
2026-07-22 02:41:28 +00:00
Maksym Pavlenko
820d0f6c0f Merge pull request #13821 from samuelkarp/fix-debug-address-default-doc
docs: correct default for [debug] address
2026-07-22 02:39:41 +00:00
Derek McGowan
dd5596b08d Merge pull request #13813 from mxpv/cache
erofs: support warm image cache
2026-07-21 23:37:37 +00:00
Samuel Karp
49084c3a03 Merge pull request #12942 from samuelkarp/threat-model
docs: add threat model and triage guide
2026-07-21 19:34:33 +00:00
Maksym Pavlenko
82a47efe92 Support dmverity
Add a --dmverity flag to `ctr images build-erofs-cache`. When set, each cached
erofs blob is dm-verity formatted (the hash tree is appended in place) and a
.dmverity sidecar is written alongside it. This is required when the erofs
snapshotter runs with dmverity_mode=on, which rejects cache hits that lack a
sidecar; without it such layers would have to be formatted out-of-band.

Extract the differ's dm-verity formatting into a shared dmverity.FormatLayer so
the differ and the cache builder share one implementation; the differ's
formatDmverityLayer now delegates to it.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-07-21 10:07:08 -07:00
Maksym Pavlenko
f52e748f16 ctr: add build-erofs-cache to populate the erofs layer cache
Add `ctr images build-erofs-cache <image> <cache_dir>`, which reads an
already-pulled image's layers from the content store, converts each into a
directly-mountable erofs blob, and writes them under
<cache_dir>/<algorithm>/<hex>.erofs keyed by the layer's diffID. This
populates the directory the erofs snapshotter's layer_content_cache reads
on pull; because the key is the source diffID, layers shared across images
converge on one blob. No converted image is produced.

Extract the per-layer uncompress + mkfs.erofs step out of LayerConvertFunc
into an exported ConvertLayerToErofs so the image converter and the cache
builder share a single conversion path.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-07-21 09:43:41 -07:00
Maksym Pavlenko
728093bdca snapshots/erofs: source pre-converted layers from a content cache
Add a layer_content_cache option to the erofs snapshotter: a directory of
pre-converted, diffID-keyed erofs layer blobs (in production a read-only
mountpoint-s3/FUSE mount) that the snapshotter sources layers from on pull
instead of downloading and converting them per node.

On an image-layer extraction Prepare, if the layer's blob is present in the
cache the snapshotter stages it as a symlink, commits it as the target
chainID in the same transaction, and returns ErrAlreadyExists. This uses the
existing remote-snapshot protocol, so containerd skips both the layer
download and the tar->erofs conversion; no core changes are needed. Any miss
(cache disabled, no snapshot.ref/diff-id labels, blob absent, unreadable
cache) falls through to the normal path, so pulls keep working.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-07-21 09:43:41 -07:00
Samuel Karp
1a7d78e0b9 docs: correct default for [debug] address
The debug server plugin returns ErrSkipPlugin when its address is empty
and the default configuration emitted by 'containerd config default'
sets the address to an empty string.

Assisted-by: Claude Code (Opus 4.8)
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2026-07-20 22:39:09 -07:00
Samuel Karp
3a3eddcbf9 docs: add threat model and triage guide
This commit introduces a comprehensive threat model, and security
triage guide, and operator guidelines based on the code, documentation
and a review of the published GitHub Security Advisories (GHSAs)

Assisted-by: gemini-cli
Assisted-by: Antigravity
Assisted-by: Claude Code (Opus 4.8)
Co-authored-by: Vinayak Goyal <vinayakankugoyal@gmail.com>
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2026-07-20 22:13:03 -07:00
dependabot[bot]
6e4c6acc0d build(deps): bump github.com/erofs/go-erofs from 0.3.0 to 0.3.1
Bumps [github.com/erofs/go-erofs](https://github.com/erofs/go-erofs) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/erofs/go-erofs/releases)
- [Commits](https://github.com/erofs/go-erofs/compare/v0.3.0...v0.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 03:46:50 +00:00
dependabot[bot]
52c5f1f64e build(deps): bump golang.org/x/net from 0.51.0 to 0.55.0 in /api
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.51.0 to 0.55.0.
- [Commits](https://github.com/golang/net/compare/v0.51.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 03:46:38 +00:00
Samuel Karp
10b42e4ed5 Merge pull request #13806 from containerd/dependabot/go_modules/golang-x-017d72eac4
build(deps): bump golang.org/x/mod from 0.37.0 to 0.38.0 in the golang-x group
2026-07-20 22:11:17 +00:00
Akihiro Suda
4b730651ee Merge pull request #13688 from containerd/dependabot/github_actions/actions/attest-build-provenance-4.1.1
build(deps): bump actions/attest-build-provenance from 4.1.0 to 4.1.1
2026-07-20 20:54:55 +00:00
Andrew Halaney
54a5a606cb shim_load: Consider shim leaked only if we can't find pids
Right now the statement is treating any error from the shim as leaking
(len(pInfo == 0 is true for any error). It seems the intent was to only
treat shims this way if the error was not found, or if there's
legitimately no pids associated with the shim. Let's fix that up to
avoid orphaning shims that just had a small error in reading pids.

Link: https://github.com/containerd/containerd/issues/13784
Signed-off-by: Andrew Halaney <ahalaney@netflix.com>
2026-07-20 13:38:01 -05:00
ningmingxiao
5d35f9ef97 build: bump github.com/containerd/nri
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2026-07-20 11:00:24 -05:00
Maksym Pavlenko
c792ddd46d Merge pull request #13754 from dgdegraaf/fix-fsmount-selinux
fsmount: Fix selinux mount parameter parsing
2026-07-20 00:24:48 +00:00
Maksym Pavlenko
0ed30a42b9 Merge pull request #13810 from containerd/dependabot/github_actions/github/codeql-action/upload-sarif-4.37.0
build(deps): bump github/codeql-action/upload-sarif from 4.36.2 to 4.37.0
2026-07-19 06:06:54 +00:00
Maksym Pavlenko
956be807ee Merge pull request #13765 from containerd/dependabot/github_actions/docker/setup-buildx-action-4.2.0
build(deps): bump docker/setup-buildx-action from 4.1.0 to 4.2.0
2026-07-19 01:57:53 +00:00
Maksym Pavlenko
9a2d8419eb Merge pull request #13772 from containerd/dependabot/github_actions/docker/login-action-4.4.0
build(deps): bump docker/login-action from 4.2.0 to 4.4.0
2026-07-19 01:57:39 +00:00
Maksym Pavlenko
55306d97b3 Merge pull request #13807 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.4.3
build(deps): bump github.com/pelletier/go-toml/v2 from 2.4.2 to 2.4.3
2026-07-19 01:53:20 +00:00
Maksym Pavlenko
ac180cff7b Merge pull request #13811 from containerd/dependabot/github_actions/actions/stale-10.4.0
build(deps): bump actions/stale from 10.3.0 to 10.4.0
2026-07-18 21:54:37 +00:00
Akihiro Suda
29edc6e8b7 Merge pull request #13741 from thaJeztah/rm_go_reportcard
README: remove Go Report Card badge
2026-07-18 06:29:46 +00:00
Maksym Pavlenko
820b8e7ec0 Merge pull request #13805 from AprilNEA/fix/overlay-mount-options-index-check
overlay: don't override a configured index mount option
2026-07-18 04:56:12 +00:00
dependabot[bot]
a4b1e9a44b build(deps): bump actions/stale from 10.3.0 to 10.4.0
Bumps [actions/stale](https://github.com/actions/stale) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](eb5cf3af3a...1e223db275)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-17 23:27:04 +00:00
dependabot[bot]
624c8e85bd build(deps): bump github/codeql-action/upload-sarif
Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.36.2 to 4.37.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8aad20d150...99df26d4f1)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-17 23:26:20 +00:00
dependabot[bot]
10e0d68a94 build(deps): bump github.com/pelletier/go-toml/v2 from 2.4.2 to 2.4.3
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.4.2...v2.4.3)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-17 23:23:22 +00:00
dependabot[bot]
9ead7c087d build(deps): bump golang.org/x/mod in the golang-x group
Bumps the golang-x group with 1 update: [golang.org/x/mod](https://github.com/golang/mod).


Updates `golang.org/x/mod` from 0.37.0 to 0.38.0
- [Commits](https://github.com/golang/mod/compare/v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-17 23:22:53 +00:00
Daniel De Graaf
dd2bcfc643 fsmount: Fix selinux mount parameter parsing
Because selinux contexts can contain commas, context strings may be
quoted in the single-syscall mount API. This quoting is not permitted
when using the fsconfig API, so strip the quotes when preparing the
system call arguments.

Signed-off-by: Daniel De Graaf <dgdegra@uwe.nsa.gov>
2026-07-17 08:51:13 -04:00
AprilNEA
5e25f36e5e overlay: don't override a configured index mount option
NewSnapshotter auto-appends "index=off" unless the configured
mount_options already carry an index option — but the check used
hasOption(..., "index", false), which compares against the literal
string "index". No valid mount option ever equals "index" (it is
always valued, "index=on"/"index=off"), so the append happened
unconditionally whenever the kernel exposes the overlay index
parameter.

Mount options are last-wins in the kernel, so a user-configured
"index=on" was silently overridden. Worse, configuring
mount_options = ["index=on", "nfs_export=on"] (the documented way to
make overlay mounts NFS-exportable) produced
"index=on,nfs_export=on,index=off", which the kernel rejects with
EINVAL (nfs_export=on conflicts with an explicit index=off) — breaking
every snapshot mount including image unpack.

Make hasOption match the key of a "key[=value]" option so callers need
not care whether the option takes a value, and add a regression test.

Signed-off-by: AprilNEA <github@sku.moe>
2026-07-17 16:04:32 +08:00
Mike Brown
cb23630be7 Merge pull request #13800 from SaloniRathi/fix-test-error-messages
core/mount/manager: improve TestMkdirHandler failure messages
2026-07-17 05:05:24 +00:00
SaloniRathi
807fbc13dc core/mount/manager: improve TestMkdirHandler failure messages
Signed-off-by: SaloniRathi <45892093+SaloniRathi@users.noreply.github.com>
2026-07-16 17:43:32 -05:00
Fu Wei
94aa7cdd48 Merge pull request #13801 from vvoland/work-shim2
core/runtime/v2: Preserve protobuf shim response bytes
2026-07-16 21:37:05 +00:00
Samuel Karp
4796c7b9d2 Merge pull request #13748 from mxpv/dev
Run CI against dev branches
2026-07-16 17:15:38 +00:00
Paweł Gronowski
dac4ea43f3 core/runtime/v2: Preserve protobuf shim response bytes
Shim start output was trimmed before protobuf decoding.
Because arbitrary protobuf fields may legitimately end with whitespace
bytes, including `\n`, trimming could corrupt metadata or capabilities
and cause decoding to fail.

Pass the raw command output to `parseStartResponse` and attempt protobuf
decoding before modifying the response.
Whitespace trimming now applies only to legacy JSON and plain-address
responses.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-07-16 19:03:21 +02:00
Samuel Karp
1ab181cb64 Merge pull request #13780 from mxpv/stale
Raise stale bot limits
2026-07-15 08:04:44 +00:00
Maksym Pavlenko
9e70782d9a Merge pull request #13792 from aysha-afrah26/tar-device-number-range
pkg/archive: reject out-of-range device numbers in layer headers
2026-07-14 19:19:18 +00:00