このページでは、 Google Cloudで実行される Container-Optimized OS のセキュリティ機能の概要を説明します。
OS のセキュリティ
Container-Optimized OS from Google は Chromium OS に基づいており、本番環境サービスの実行向けに適切に構成されたプラットフォームを提供するために、いくつかのセキュリティ設計の原則が実装されています。
最小限の OS フットプリント
これは、Container-Optimized OS のセキュリティの中核をなすものです。Container-Optimized OS はコンテナの実行向けに最適化されており、またコンテナは自身の依存関係をパッケージ化しているため、不要なパッケージをカットすることで OS の攻撃範囲を最小限に抑えることができます。
不変のルート ファイルシステムと確認済みブート
Container-Optimized OS のルート ファイルシステムは、常に読み取り専用としてマウントされます。
また、そのチェックサムはビルド時に計算済みであり、ブートのたびにカーネルによって確認されます。 このメカニズムによって、ローカルを永続的に変更してマシンを所有する攻撃を防ぐことができます。さらに、他のいくつかのマウントはデフォルトで実行不可能になっています。詳細については、ファイルシステムをご覧ください。
ステートレス構成
読み取り専用のルート ファイルシステムは、セキュリティ面では優れていますが、システムが使いにくくなります。たとえば、システムにログインするには、ユーザーを作成して追加する機能が必要です。この問題に対処するため、Google は、/etc/ が書き込み可能であってもステートレスになるようにルート ファイルシステムをカスタマイズしています。これにより実行時に構成設定を書き込むことができますが、これらの設定は再起動時に維持されません。したがって、Container-Optimized OS ノードは再起動するたびにクリーンな状態から起動します。ユーザーのホーム ディレクトリ、ログ、Docker イメージなどの特定のデータはルート ファイルシステムの一部ではないため、再起動を行っても維持されます。
セキュリティが強化されたカーネル
Container-Optimized OS では、Chromium OS に含まれている Integrity Measurement Architecture(IMA)、監査、Kernel Page Table Isolation(KPTI)、Linux セキュリティ モジュール(LSM)など、複数のセキュリティ強化カーネル機能が有効になっています。さらに、Container-Optimized OS は、よりきめ細かいセキュリティ ポリシーを適用できるようにする、seccomp や AppArmor などのセキュリティ機能をサポートしています。
セキュリティが中心のデフォルト
Container-Optimized OS は、複数の機能にセキュリティを考慮したデフォルト値を提供することで、さらなるレベルの強化を実現しています。これには、ptrace と非特権 BPF の無効化、ファイアウォールのロックダウンなどを行う sysctl 設定などが含まれます。
これらのデフォルトが一連のインスタンスに自動的に適用されることにより、クラスタ、プロジェクト、組織の全体的なセキュリティ保護に役立ちます。
自動更新
Container-Optimized OS の自動更新機能により、実行中の VM にセキュリティ パッチをタイムリーに配信できます。Container-Optimized OS が Kubernetes Engine によって管理されている場合は、ノードの自動アップグレードを利用することにより、セキュリティと安定性のバランスが実現されます。
ファイルシステム
以下に Container-Optimized OS ノードイメージのファイルシステムのパスの一覧を示し、その特性や推奨される使用方法を説明します。
イメージを開発、構築、デプロイする際、Container-Optimized OS チームでは、全体的に Chromium OS と Google 両方の長年の経験に基づき、OS 自体のさまざまな強化機能に加え、ソフトウェアのサプライ チェーンも重要視するとともにインフラストラクチャのセキュリティを優先しています。
Google でのソースからの構築
Linux カーネル自体を含む Container-Optimized OS の各パッケージは、ChromiumOS コード リポジトリのソースから構築されています。これは、OS に何が組み込まれるか、どの人物がチェックインしたか、どのバージョンに導入されたかなどを、Container-Optimized OS チームが正確に把握していることを意味します。このため、脆弱性が発見された場合は、どのレベルでも、すばやくパッケージにパッチを適用して更新できます。
継続的な脆弱性(CVE)のスキャンと対応
CVE スキャン システムにより、OS のカーネルやパッケージに脆弱性が発見された場合は、必ず Container-Optimized OS チームにアラートが通知されます。これは、Android と Chromium OS の脆弱性検出に使用されているのと同じシステムです。Container-Optimized OS チームは、パッチ適用リリースの作成を優先して対応します。また、Container-Optimized OS チームは、Google のインシデント対応チームと連携して、Container-Optimized OS の幅広いセキュリティ パッチを迅速に提供します。
テストと認定プロセス
新しい Container-Optimized OS イメージを Google Cloud に公開する前に、syzkaller によるカーネルのファズテスト、クラスタレベルの Kubernetes テスト、Compute Engine の機能との統合テスト、複数のパフォーマンス ベンチマークなど、複数のレベルでイメージをテストしています。これにより、リリースの安定性と品質を確保しています。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eContainer-Optimized OS minimizes the attack surface by having a minimal OS footprint, as it is designed primarily to run containers and trims unnecessary packages.\u003c/p\u003e\n"],["\u003cp\u003eThe root filesystem in Container-Optimized OS is immutable, mounted as read-only, and verified at boot to prevent unauthorized modifications, enhancing system integrity.\u003c/p\u003e\n"],["\u003cp\u003eContainer-Optimized OS uses a stateless configuration for settings in the \u003ccode\u003e/etc/\u003c/code\u003e directory, allowing runtime customization without persisting changes across reboots, thus starting from a clean state each time.\u003c/p\u003e\n"],["\u003cp\u003eThe OS enables several security-hardening kernel features, including IMA, Audit, KPTI, and LSMs, along with security-centric defaults like disabling ptrace and unprivileged BPF, and securing the firewall.\u003c/p\u003e\n"],["\u003cp\u003eContainer-Optimized OS ensures timely security patch delivery via automatic updates, and prioritizes infrastructure security by building from source, employing continuous vulnerability scanning, and using a rigorous testing and qualification process before image releases.\u003c/p\u003e\n"]]],[],null,["# Security Overview\n\nThis page provides an overview of the security features of\nContainer-Optimized OS running on Google Cloud.\n\nOS Security\n-----------\n\nBased on [Chromium OS](https://www.chromium.org/chromium-os), Container-Optimized OS from Google\nimplements several security design principles to provide a well-configured\nplatform for running production services.\n\n### Minimal OS footprint\n\nThis is at the core of Container-Optimized OS security. Since\nContainer-Optimized OS is optimized to run containers and containers package\ntheir own dependencies, we can trim unnecessary packages and thus minimize the\nOS attack surface.\n\n### Immutable root filesystem and verified boot\n\nThe Container-Optimized OS root filesystem is always mounted as read-only.\nAdditionally, its checksum is computed at build time and verified by the kernel\non each boot. This mechanism prevents against attackers from \"owning\" the\nmachine through permanent local changes. Additionally, several other mounts are\nnon-executable by default. See [Filesystem](#filesystem) for details.\n\n### Stateless configuration\n\nWhile having a read-only root filesystem is good for security, it makes the\nsystem difficult to use. For example, we need to be able to create and add users\nin order to log in to the system. To address this, we customize the root\nfilesystem such that `/etc/` is writable but stateless. This allows you to write\nconfiguration settings at run time, but those settings do not persist across\nreboots. Thus, every time a Container-Optimized OS node reboots, it starts from\na clean slate. Certain data, such as users' home directories, logs, and Docker\nimages, persist across reboots, as they are not part of the root filesystem.\n\n### Security-hardened kernel\n\nContainer-Optimized OS enables several security-hardening kernel features,\nincluding Integrity Measurement Architecture (IMA), Audit, Kernel Page Table\nIsolation (KPTI), and some Linux Security Modules (LSMs) from Chromium OS.\nAdditionally, Container-Optimized OS supports security features like\n[seccomp](https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt)\nand\n[AppArmor](https://gitlab.com/apparmor/apparmor/wikis/home/)\nthat make it possible to enforce finer grained security policies.\n\n### Security-centric defaults\n\nContainer-Optimized OS provides another level of hardening by providing\nsecurity-minded default values for several features. This includes things such as [sysctl\nsettings](https://cos.googlesource.com/cos/overlays/board-overlays/+/refs/heads/master/project-lakitu/chromeos-base/chromeos-base/files/00-sysctl.conf)\nthat disable ptrace and unprivileged BPF, lock down the firewall, and so on.\nThese defaults, when automatically applied to a fleet of instances, help secure\nthe entire cluster, project, and organization.\n\n### Automatic updates\n\nContainer-Optimized OS's automatic updates feature allows timely delivery of\nsecurity patches to running VMs. When Container-Optimized OS is managed by\nKubernetes Engine,\n[node auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/node-auto-upgrades)\nstrike a balance between security and stability.\n\n### Filesystem\n\n\nThe following is a list of paths in the Container-Optimized OS node image file\nsystem, along with their properties and recommended usage:\n\n### Firewall\n\nBy default, Container-Optimized OS is configured to drop all incoming TCP/UDP\nconnections except SSH on port 22. See [Configuring the Host\nFirewall](/container-optimized-os/docs/how-to/firewall) on how to change the\ndefault to open up more ports.\n\n### Instance access\n\nBy default, Container-Optimized OS does not contain any accessible user\naccounts.\n\nUser accounts and SSH keys are managed through\n[instance or project metadata](/compute/docs/instances/adding-removing-ssh-keys)\nor [OS Login](/compute/docs/instances/managing-instance-access).\n\n\nOS Login lets you to manage access to instances using IAM. It allows for finer\ngrained access control (sudo versus non-sudo), identifiable SSH keys, and\norganizational login policy.\n\n\nThe SSH daemon is configured to disallow password-based authentication and to\ndisallow root logins.\n\nHowever, this does not prevent the users from gaining root privileges using sudo\nafter login unless the user account is managed with OS Login.\n\n\nInfrastructure Security\n-----------------------\n\nIn addition to various hardening features in the OS itself, the\nContainer-Optimized OS team also takes the software supply chain seriously and\nprioritizes infrastructure security when developing, building, and deploying\nimages, based on years of experience from both Chromium OS and Google in\ngeneral.\n\n### Built from source at Google\n\nEach package in Container-Optimized OS, including the Linux kernel itself, is\nbuilt from source from ChromiumOS code repositories. This means that we know\nexactly what is going into the OS, who checked it in, in which version it was\nintroduced, etc. This also lets us quickly patch and update any package in case\na vulnerability is discovered, at any level.\n\n### Continuous vulnerability (CVE) scanning and response\n\nA CVE-scanning system alerts us whenever a vulnerability is discovered in the\nkernel or any package of the OS. This is the same system used to detect\nvulnerabilities in Android and Chromium OS. The Container-Optimized OS team\nresponds with priority to make patched releases. The Container-Optimized OS team\nalso works with Google's incident response team to make wider security patches\navailable quickly in Container-Optimized OS.\n\n### Testing and qualification process\n\nBefore we publish a new Container-Optimized OS image to Google Cloud, we test it\nat multiple levels---including kernel fuzz testing by\n[syzkaller](https://github.com/google/syzkaller),\ncluster-level Kubernetes tests, integration testing with Compute Engine features,\nand several performance benchmarks. This ensures the stability and quality of\nour releases."]]