SELinux labelling does not get disabled when using Podman machines

オープン
#1,347 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@darshpatel1052 がすでに取り組んでいます。

2026年11月3日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
40/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
devtools

調査の方向性

Start with isUsingSELinuxLabels() for image builds and getPodmanArgs() for container run args, both named in the issue. Check how cliHost and dockerCLI are used there and whether podman info can replace the getenforce check. Done means Podman machines and remote Podman get the SELinux decision from the correct host, with tests covering the changed branches.

索引モデルが issue の本文から書いたものです。

説明

Since #1045, SELinux labelling is supposed to get disabled for devcontainers when using Podman. However, this only works when Podman runs directly on the same (Linux) host as the devcontainers CLI. It is never applied with a Podman machine (the default on macOS and Windows) and the decision is made on the wrong host when Podman is remote (e.g. through an SSH tunnel) or a Podman machine runs on Linux.

Consider the current code of isUsingSELinuxLabels() for image builds. Container run args have a similar issue in getPodmanArgs().

return params.cliVariant === CLIVariant.Podman && cliHost.platform === 'linux'
	&& (await runCommandNoPty({
		exec: cliHost.exec,
		cmd: 'getenforce',
		output,
		print: true,
	})).stdout.toString().trim() !== 'Disabled'
	&& (await dockerCLI({
		...toExecParameters(params),
		print: true,
	}, 'info', '-f', '{{.Host.Security.SELinuxEnabled}}')).stdout.toString().trim() === 'true';

Neither will cliHost.platform always be "linux", nor will running getenforce on the local host always yield the right result. On macOS, getenforce doesn't exist, so the call throws and returns false.

The correct way would probably be to always use podman info and remove the preceding checks.

Potentially related: #1071

主要言語
TypeScript
スター
3k
フォーク
473
平均マージ
10時間 31分
マージ済み PR(30日)
9

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/cli のほかの issue

devcontainers/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。