Commit Graph
7551 Commits
Author SHA1 Message Date
Paul Holzinger 768072c6a8 Merge pull request #29572 from dexp007/main
compat/secrets: do not expose secret data on inspect endpoint
2026-08-19 15:55:51 +02:00
Davoud Azari b57e7075e2 compat/secrets: do not expose secret data on inspect endpoint
The Docker-compat secret inspect endpoint was incorrectly honoring
the showsecret query parameter, which could expose plaintext secret
data to clients using the Docker-compatible API.

This restricts showsecret to libpod-only requests. Docker-compat
clients always receive redacted secret data, matching Docker's own
behavior.

Add APIv2 tests covering the showsecret behavior on both the
Docker-compat and libpod endpoints, confirming secret data is never
returned from the compat endpoint while libpod continues to honor
the flag.

Fixes: #29570

Signed-off-by: Davoud Azari <davidmotral@gmail.com>
2026-08-19 14:30:37 +03:30
Matt Heon f63cf24b00 Merge pull request #29460 from RudraDudhat2509/fix/hyperv-vsock-ready-timeout
hyperv: add timeout to vsock ready wait
2026-08-19 05:11:28 -04:00
Jan Rodák c21fb45ac8 Merge pull request #29378 from danishprakash/fix-farm-build-tag
farm: handle tagged --tag references on build
2026-08-19 09:55:37 +02:00
Danish PrakashandKevin Crocombe 5745ac69e0 farm: handle tagged --tag references on build
podman farm build pushes each per-arch image to the registry by
appending `UnknownDigestSuffix` to the image specified using --tag. This
fails because a tag is not expected when UnknownDigestSuffix is used.
Parse the image reference and pass only the untagged image
reference when podman does this suffixed push to the registry.

Fixes #25039

Co-authored-by: Kevin Crocombe <kevin.crocombe@pegortech.co.uk>
Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2026-08-19 12:44:54 +05:30
Matt Heon 732e7c9d26 Merge pull request #29574 from CodeWithAK28/docs-manifest-api-params
pkg/api/server: document missing manifest push and create params
2026-08-18 15:21:05 -04:00
Paul Holzinger 4d055045e5 Merge pull request #29489 from ashley-cui/tmpfs
Compat v1.46: support HostConfig.Mounts.TmpfsOptions for containers/create
2026-08-18 15:37:15 +02:00
Anisha Khairnar baddf266c1 pkg/api/server: document missing manifest push and create params
The manifest push and create endpoints accept query parameters that
were never documented, so API users can't discover them.

Push was missing compressionFormat, compressionLevel, format and
removeSignatures. Create was missing annotation and annotations.
The wording matches the same parameters on the image push endpoint.
The deprecated v3 push and add endpoints are left alone.

Signed-off-by: Anisha Khairnar <anishakhairnar284@gmail.com>
2026-08-18 12:39:30 +05:30
Danish Prakash 598920feef Merge pull request #29322 from ROKUMATE/test-pkg-machine-env
pkg/machine/env: add tests for WithPodmanPrefix and dir prefixes
2026-08-18 10:08:39 +05:30
Jan Rodák 4b6873a5ef Merge pull request #29527 from vishnukothakapu/perf-strings-equalfold
Performance: Replace strings.ToLower with strings.EqualFold
2026-08-17 21:59:25 +02:00
Paul Holzinger 5b366f4b34 Merge pull request #29511 from vishnukothakapu/perf-regexp-mustcompile
Performance: Hoist regexp.MustCompile out of functions
2026-08-17 12:53:04 +02:00
Ashley Cui 8e63c695f2 Compat v1.46: Support HostConfig.Mounts.TmpfsOptions for containers/create
POST /containers/create now takes Options as part of HostConfig.Mounts.TmpfsOptions to set options for tmpfs mounts.

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-08-14 21:14:49 -04:00
Matt Heon a2409076ef Merge pull request #29523 from ROKUMATE/docs-swagger-kube-play-params
pkg/api/server: document noHostname and noPodPrefix kube play params
2026-08-14 18:36:10 -04:00
Vishnu Kothakapu 0a2350324a Performance: Replace strings.ToLower with strings.EqualFold
Replaces unnecessary heap allocations for case-insensitive equality
checks with standard library strings.EqualFold.

Fixes: #29526
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-15 02:17:47 +05:30
Vishnu Kothakapu e3797d95b1 Performance: Use delayed regex compilation
Replaces regexp.MustCompile with regexp.Delayed from go.podman.io/storage/pkg/regexp
for global regular expressions. This avoids compiling regular expressions
during the global init scope, improving startup performance for all commands.

Tests are kept using regexp.MustCompile where applicable.

Fixes: #29510
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-14 21:14:17 +05:30
Jan Rodák b4aadcdd1a Merge pull request #29502 from vishnukothakapu/refactor-err-error
Refactor: Remove redundant err.Error() in pkg/machine
2026-08-14 16:06:58 +02:00
Jan Rodák cb7553bade Merge pull request #29494 from nXtCyberNet/issue/ci
added errorlint
2026-08-14 15:02:05 +02:00
ROKUMATE 4a7be9e307 pkg/machine/env: add tests for WithPodmanPrefix
Fixes: #29314
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-14 17:28:31 +05:30
ROKUMATE 0928ec5376 pkg/api/server: document noHostname and noPodPrefix kube play params
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-14 15:56:02 +05:30
Matt Heon 05b3b7220b Merge pull request #29159 from jiwahn/fix-kube-seccomp-profile
kube: use native seccompProfile fields
2026-08-13 21:55:50 -04:00
nXtCyberNet f76d9de01a added errorlint
Fixes: #29488
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
2026-08-14 01:35:03 +05:30
Brent Baude 3c2f492e87 Merge pull request #29509 from ROKUMATE/fix-trust-parseuids-panic
pkg/trust: prevent panic on malformed GPG uid/pub lines
2026-08-13 14:48:52 -05:00
Vishnu Kothakapu d5f84c7167 Refactor: Remove redundant err.Error() in pkg/machine
When passing an error to fmt.Errorf or logrus with formatting verbs like
%v or %w, it is not necessary to explicitly call err.Error(). The format
functions will automatically call the Error() method because the value
implements the error interface. Removing these explicit calls makes the
code cleaner and more idiomatic.

Fixes: #29501
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-14 01:09:08 +05:30
ROKUMATE d212fc842d pkg/trust: prevent panic on malformed GPG uid/pub lines
Fixes: #29508
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-13 23:51:56 +05:30
Jiwoo Ahn bf8df1f057 kube: use native seccompProfile fields
Fixes: #27501
Signed-off-by: Jiwoo Ahn <ikwydls1314@gmail.com>
2026-08-13 16:54:23 +09:00
Ashley Cui d2ae516a39 api: Fix tmpfs mode when setting size
Fixed a bug where setting tmpfs size automatically set mode to 0000

Signed-off-by: Ashley Cui <acui@redhat.com>
2026-08-12 19:27:14 -04:00
Vishnu Kothakapu 82c44cdcaa Refactor: Replace static fmt.Errorf with errors.New in pkg/systemd
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-12 22:21:04 +05:30
Matt Heon cbd17f7459 Merge pull request #29473 from ROKUMATE/swagger-checkpoint-createimage
pkg/api: document the createImage checkpoint query parameter
2026-08-12 10:26:11 -04:00
ROKUMATE 944fa71129 pkg/api: document the createImage checkpoint query parameter
Fixes: #29472
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-12 17:33:54 +05:30
Matt Heon b85a2c7f39 Merge pull request #29459 from vishnukothakapu/refactor-machine-error-wrap
Refactor: use %w for error wrapping in pkg/machine
2026-08-12 06:27:23 -04:00
Rudra Dudhat dd28c14f8c hyperv: add timeout to vsock ready wait
ListenSetupWait() waited on errChan with no timeout, so podman machine
init/start could hang forever if the guest never signaled ready. Added
waitForReady(errChan, timeout) with a 30 second bound. Full details in
the issue.

Fixes: #29455

Signed-off-by: Rudra Dudhat <contact.rdudhat@gmail.com>
2026-08-12 14:28:26 +05:30
Matt Heon 0d43350b9c Merge pull request #29466 from ROKUMATE/fix-machine-volume-unknown-opt-log
pkg/machine/vmconfigs: log unknown volume option instead of printing to stdout
2026-08-11 19:27:13 -04:00
ROKUMATE d591b83fce pkg/machine/vmconfigs: log unknown volume option instead of printing to stdout
Fixes: #29465
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-12 03:41:19 +05:30
Vishnu Kothakapu 2dac3a97fb Refactor: use %w for error wrapping in pkg/machine
Signed-off-by: Vishnu Kothakapu <vishnukothakapu27@gmail.com>
2026-08-12 02:23:44 +05:30
Paul Holzinger 6bf6a37555 Merge pull request #29289 from satwiksps/fix-swagger-warnings
swagger: fix deprecated alias annotations and model name collisions
2026-08-11 14:59:43 +02:00
Paul Holzinger 2ab2dbfa55 Merge pull request #29282 from ROKUMATE/test-pkg-channel
pkg/channel: add tests for the channel WriteCloser
2026-08-11 14:57:22 +02:00
Jan Rodák 6394caebcd Merge pull request #29417 from sahilnyk/quadlet-umask
quadlet: add Umask= key to set container umask without PodmanArgs
2026-08-11 14:05:30 +02:00
Satwik Sai Prakash Sahoo 05929acd90 swagger: fix deprecated alias annotations and model name collisions
Replace deprecated swagger:alias with swagger:model for ImagePullStatus
and ArtifactPullStatus. Add explicit swagger:model annotations with
unique names to Podman types that collide with vendor types
(DriverData, PruneReport, RootFS, Secret, ThrottleDevice, WeightDevice,
Version) to resolve colliding model name warnings from go-swagger.

The types from libpod/define use a Libpod prefix, matching LibpodInfo
which already does that. Apart from the prefix the names are the ones
go-swagger derives on its own, so the annotations mostly just make the
naming explicit so the tool stops warning about it.

This does not close #29199 entirely. The two remaining name collisions
(Mount and Summary) are each between two vendored types, so they cannot
be controlled from the Podman side, and the dropped-ref-sibling
warnings are a separate problem.

Related: #29199
Signed-off-by: Satwik Sai Prakash Sahoo <sahoospsatwik@gmail.com>
2026-08-10 22:14:47 +05:30
Riccardo Paolo Bestetti 86d1507130 set up default IDMappings when none are set and userns=auto
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
2026-08-10 17:52:03 +02:00
Salih Muhammed aec2f54ec6 quadlet: expand %N specifier in the Pod key
The Pod key of a .container unit accepts systemd specifiers, but handlePod
looked the referenced pod up in the units map using the raw value, so
"Pod=%N.pod" failed with "quadlet pod unit %N.pod does not exist" instead
of resolving to the pod named after the container's service.

Expand %N to the container's service name before the lookup, matching the
existing handling in GetContainerResourceName. Since %N is the service
name, setting ServiceName= lets the container and pod unit files use
different names.

Add e2e cases for both combinations: a pod named after the container
file, and a pod named after a ServiceName that differs from the file
name.

Fixes: #29108
Signed-off-by: Salih Muhammed <root@lr0.org>
2026-08-09 04:23:53 -04:00
Matt Heon 55c2d1c490 Merge pull request #25161 from danishprakash/empty-ignore-file
build: pass ignore file to buildah to consider empty ignore files
2026-08-07 07:57:30 -04:00
Sahil NayakandTom Sweeney bda5521804 quadlet: add Umask= key to set container umask without PodmanArgs
Fixes: #25278

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Sahil Nayak <contactsahilpnayak@gmail.com>
2026-08-07 16:17:35 +05:30
Matt Heon 0ad5459fab Merge pull request #29145 from ROKUMATE/feat-playkube-warn-unknown-keys
podman kube play: add --validate=ignore|warn|strict flag
2026-08-06 18:21:03 -04:00
Matt Heon 615e69fdb6 Merge pull request #29300 from prayag0one4/fix/issue-3-volumes-mountcount
volumes: propagate error from MountCount in VolumeMounted
2026-08-05 20:43:00 -04:00
Matt Heon 90f7fdfe8f Merge pull request #29336 from Aryanbhargava18/fix/mac-provider-test-flake
pkg/machine: remove unused InstalledProviders function
2026-08-05 11:07:55 -04:00
ROKUMATE 0d09e609e4 add validate flag to podman kube play
ignore warn and strict modes for unknown yaml fields and kinds
ignore is the default and skips them warn reports them strict fails
warnings are returned in the play report so they show up in the cli and over the api for tools like podman desktop

Closes #18332

Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
2026-08-05 17:42:40 +05:30
Matt Heon de06abeb56 Merge pull request #29327 from aiburegit/main
rootless: fix heap-buffer-overflow in preexec hooks
2026-08-04 20:42:07 -04:00
Aryanbhargava18 c8e8cb23cc pkg/machine: remove unused provider functions
The InstalledProviders and SupportedProviders functions were only
used in their own tests and were otherwise dead code. Removing them
entirely cleans up the API surface.

Signed-off-by: Aryanbhargava18 <aryanbhargava644@gmail.com>
2026-08-04 15:09:41 +05:30
Artem Krasovskiy f8b059fed9 rootless: fix heap-buffer-overflow in preexec hooks
Remove an unnecessary null byte write after copying preexec hook names.
The write was performed one byte past the allocated buffer because the
filename copy already included the string terminator.

Signed-off-by: Artem Krasovskiy <aibure@altlinux.org>
2026-07-29 10:27:49 +03:00
Rajkaran 2f9f412822 Merge branch 'podman-container-tools:main' into fix-swagger-artifact-annotations 2026-07-28 16:38:34 +05:30