
ビルドからランタイムまでのすべてを保護する、オープンソースのクラウドネイティブセキュリティ
オープンソースのクラウドネイティブなセキュリティおよびポリシープロジェクト
cnspecはインフラストラクチャ全体のセキュリティとコンプライアンスを評価します。パブリッククラウドおよびプライベートクラウド環境、Kubernetesクラスター、コンテナ、コンテナレジストリ、サーバー、エンドポイント、SaaS製品、Infrastructure as Code、APIなどにわたる脆弱性と設定ミスを検出します。
強力なPolicy as Codeエンジンであるcnspecは、Mondooのセキュリティデータファブリック上に構築されています。すぐに実行できるデフォルトのセキュリティポリシーが設定済みです。高速でシンプルに使えます!
bash -c "$(curl -sSL https://install.mondoo.com/sh)"
cnspec scan local

インストールスクリプトを使用して cnspec をインストールします:
Linux および macOS
bash -c "$(curl -sSL https://install.mondoo.com/sh)"
Windows
Set-ExecutionPolicy Unrestricted -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://install.mondoo.com/ps1'));
Install-Mondoo;
手動インストールを希望する場合は、releases で cnspec パッケージを入手できます。
cnspec scan サブコマンドを使用して、ローカルおよびリモートのターゲットに設定ミスや脆弱性がないかチェックします。
このコマンドは、ローカルマシンのセキュリティを評価します:
cnspec scan local
スキャンするリモートターゲットを指定することもできます。例:
# to scan a docker image:
cnspec scan docker image ubuntu:22.04
# scan public ECR registry
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/r6z5b8t4
cnspec scan docker image public.ecr.aws/r6z5b8t4
# to scan an AWS account using the local AWS CLI config
cnspec scan aws
# scan an EC2 instance with EC2 Instance Connect
cnspec scan aws ec2 instance-connect root@i-1234567890abcdef0
# to scan a Kubernetes cluster via your local kubectl config or a local manifest file
cnspec scan k8s
cnspec scan k8s manifest.yaml
# to scan a GitHub repository
export GITHUB_TOKEN=<personal_access_token>
cnspec scan github repo <org/repo>
📚 詳細については、cnspec のドキュメントをお読みください。
cnspec のポリシーは、ポリシー・アズ・コードの概念に基づいて構築されています。cnspec には、サポートされているすべてのターゲット向けに設定されたデフォルトのセキュリティポリシーが付属しています。デフォルトのポリシーは、このリポジトリの content ディレクトリで利用できます。
cnspec は幅広いプラットフォームの脆弱性をスキャンします。脆弱性スキャンはコンテナイメージに限定されず、ビルド時および実行時にも機能します。

注: 脆弱性スキャンには、クライアントが Mondoo Platform にログインしている必要があります。
# scan container image
cnspec vuln docker debian:12
# scan aws instance via EC2 instance connect
cnspec vuln aws ec2 instance-connect root@i-1234567890abcdef0
# scan instance via SSH
cnspec vuln ssh user@host
# scan windows via SSH or Winrm
cnspec vuln ssh user@host --ask-pass
cnspec vuln winrm user@host --ask-pass
# scan VMware vSphere ESXi hosts
cnspec vuln vsphere user@host --ask-pass
# scan Linux, Windows
cnspec vuln local
| プラットフォーム | バージョン |
|---|---|
| Alpine | 3.10 - 3.24 |
| AlmaLinux | 8, 9, 10 |
| Amazon Linux | 1, 2, 2023 |
| Arch Linux | ローリング |
| CentOS | 6, 7, 8, Stream |
| Debian | 8, 9, 10, 11, 12, 13 |
| Fedora | 30 - 44 |
| openSUSE | Leap 15, Leap 16 |
| Oracle Linux | 6, 7, 8, 9, 10 |
| Photon Linux | 2, 3, 4, 5 |
| Red Hat Enterprise Linux | 6, 7, 8, 9, 10 |
| Rocky Linux | 8, 9, 10 |
| SUSE Linux Enterprise | 12, 15, 16 |
| Ubuntu | 18.04, 20.04, 22.04, 24.04, 26.04 |
| VMware vSphere ESXi | 6, 7, 8, 9 |
| Windows | 10, 11, 2016, 2019, 2022, 2025 |
cnspec はアサーションを探索するためのインタラクティブシェルも提供します。セキュリティポリシーが使用するアサーションを理解したり、独自のポリシーを作成したりするのに役立ちます。また、ローカルおよびリモートのターゲットとその場でやり取りするのにも最適な方法です。
cnspec shell local
シェルは、cnspec を支えるリソースに関する情報を提供する help コマンドを備えています。引数なしで help を実行すると、利用可能なすべてのリソースとそのフィールドが一覧表示されます。また、help <resource> を実行すると、特定のリソースについてより詳細な情報を取得できます。例えば:
cnspec> help ports
ports: TCP/IP ports on the system
list []port: List of all TCP/IP ports
listening []port: All listening ports
シェルはオートコンプリートを使用するため、簡単に探索できます。
シェル内に入ったら、次のようなMQLアサーションを入力できます:
> ports.listening.none( port == 23 )
ターミナルをクリアするには、clear と入力します。
終了するには、CTRL + D を押すか、exit と入力します。
Mondoo の統合セキュリティプラットフォームは、ビジネスにとって最も高いリスクをもたらす脆弱性と設定ミスを検出し、優先順位付けします。Mondoo のセキュリティデータファブリックは、インフラストラクチャ固有のコンテキストの中で、あらゆる検出結果の脅威と露出を分析します。無関係なセキュリティアラートの洪水ではなく、Mondoo はセキュリティ態勢に即座かつ大きな影響を与える方法を示します。
始めるには、お問い合わせください。
Mondoo Platform について学ぶには、Mondoo Platform のドキュメントを読むか、mondoo.com にアクセスしてください。
cnspec を Mondoo Platform で使用するには、Mondoo App でトークンを生成してから、次を実行します:
cnspec login --token TOKEN
認証が完了すると、任意のターゲットをスキャンできます:
cnspec scan <target>
cnspec はスキャン結果を STDOUT と Mondoo Platform に返します。
Mondoo Platform のアカウントがあれば、ポリシーをアップロードできます:
cnspec bundle upload mypolicy.mql.yaml
cnspec ポリシーは、単なる YAML ファイルであり、フリートに対するあらゆるセキュリティルールやベストプラクティスを表現できます。
いくつかの例は、このリポジトリの examples フォルダにあります。これらのポリシーはいずれも実行できます:
cnspec scan local -f examples/example.mql.yaml
独自のポリシーを作成したり、ポリシーを cnspec コミュニティに還元することに興味がある場合は、Mondoo のポリシー作成ガイドをお読みください。