
ビルドからランタイムまでのすべてを保護する、オープンソースのクラウドネイティブセキュリティ
オープンソースのクラウドネイティブセキュリティおよびポリシープロジェクト
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
bash -c "$(curl -sSL https://install.mondoo.com/sh)"
Windows```powershell 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;
手動インストールを希望する場合、cnspec パッケージは [releases](https://github.com/mondoohq/cnspec/releases) にあります。
## ポリシーを使用したスキャンの実行
`cnspec scan` サブコマンドを使用して、ローカルおよびリモートのターゲットに設定ミスや脆弱性がないかチェックします。
### ローカルスキャン
このコマンドは、ローカルマシンのセキュリティを評価します:```bash
cnspec scan local
スキャンするリモートターゲットを指定することもできます。例:```bash
cnspec scan docker image ubuntu:22.04
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
cnspec scan aws
cnspec scan aws ec2 instance-connect root@i-1234567890abcdef0
cnspec scan k8s cnspec scan k8s manifest.yaml
export GITHUB_TOKEN=<personal_access_token> cnspec scan github repo <org/repo>
[:books: 詳細については、cnspec のドキュメントをお読みください。](https://mondoo.com/docs/cnspec)
### ポリシー
cnspec ポリシーは、ポリシー・アズ・コードの概念に基づいて構築されています。cnspec には、サポートされているすべてのターゲット向けに構成されたデフォルトのセキュリティポリシーが付属しています。デフォルトポリシーは、このリポジトリの `content` ディレクトリで利用できます。
## 脆弱性スキャン
cnspec は幅広いプラットフォームの脆弱性をスキャンします。脆弱性スキャンはコンテナイメージに限定されず、ビルド時および実行時にも機能します。

注: 脆弱性スキャンには、クライアントが Mondoo Platform にログインしている必要があります。
### 例```bash
# 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
cnspec は、アサーションを探索するためのインタラクティブシェルも提供しています。これは、セキュリティポリシーが使用するアサーションを理解したり、独自のポリシーを作成したりするのに役立ちます。また、ローカルおよびリモートのターゲットとオンザフライで対話する優れた方法でもあります。
cnspec shell local
シェルは、cnspecを支えるリソースに関する情報を提供する `help` コマンドを備えています。引数なしで `help` を実行すると、利用可能なすべてのリソースとそのフィールドが一覧表示されます。また、`help <resource>` を実行すると、特定のリソースについてより詳細な情報を取得できます。例えば:```bash
cnspec> help ports
ports: TCP/IP ports on the system
list []port: List of all TCP/IP ports
listening []port: All listening ports
シェルはオートコンプリートを使用するため、簡単に探索できます。
シェル内に入ったら、次のようなMQLアサーションを入力できます:```coffeescript
ports.listening.none( port == 23 )
ターミナルをクリアするには、`clear` と入力します。
終了するには、CTRL + D を押すか、`exit` と入力します。
## Mondoo Platform で重要なリスクを優先順位付け
Mondoo の統合セキュリティプラットフォームは、ビジネスに最も高いリスクをもたらす脆弱性と設定ミスを検出し、優先順位を付けます。Mondoo のセキュリティデータファブリックは、インフラストラクチャ固有のコンテキスト内で、すべての検出事項の脅威と露出を分析します。無関係なセキュリティアラートの洪水ではなく、Mondoo はセキュリティ態勢に即座かつ大きな影響を与える方法を示します。
始めるには、[お問い合わせください](https://mondoo.com/contact)。
Mondoo Platform について学ぶには、[Mondoo Platform ドキュメント](https://mondoo.com/docs)を読むか、[mondoo.com](https://mondoo.com) にアクセスしてください。
### cnspec を Mondoo Platform に登録する
cnspec を Mondoo Platform で使用するには、[Mondoo App でトークンを生成](https://mondoo.com/docs/cnspec/install/registration)し、次を実行します:```bash
cnspec login --token TOKEN
認証が完了すると、任意のターゲットをスキャンできます:```bash cnspec scan
cnspec はスキャン結果を `STDOUT` と Mondoo Platform に返します。
Mondoo Platform のアカウントがあれば、ポリシーをアップロードできます:```bash
cnspec bundle upload mypolicy.mql.yaml
cnspec ポリシーは、単純な YAML ファイルであり、フリートに対する任意のセキュリティルールやベストプラクティスを表現できます。
いくつかの例は、このリポジトリの examples フォルダにあります。これらのポリシーはいずれも実行できます:```bash
cnspec scan local -f examples/example.mql.yaml
独自のポリシーを作成したり、cnspec コミュニティにポリシーを還元することに興味がある場合は、Mondoo の[ポリシー作成ガイド](https://mondoo.com/docs/cnspec/write-policies/write-intro)をお読みください。
## サポートされているターゲット| ターゲット | プロバイダー | 例 |
| ------------------------------ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Active Directory ドメイン | `activedirectory` | `cnspec scan activedirectory --dc DC_HOSTNAME --user USER --password PASSWORD` |
| Alibaba Cloud アカウント | `alicloud` | `cnspec scan alicloud --access-key-id KEY_ID --access-key-secret KEY_SECRET` |
| Ansible プレイブック | `ansible` | `cnspec shell ansible YOUR_PLAYBOOK.yml` |
| Apache Cassandra クラスター | `cassandra` | `cnspec scan cassandra HOST --user USER --ask-pass` |
| Arista ネットワークデバイス | `arista` | `cnspec scan arista DEVICE_PUBLIC_IP --ask-pass` |
| Atlassian 組織 | `atlassian admin` | `cnspec shell atlassian admin --admin-token YOUR_TOKEN` |
| Auth0 テナント | `auth0` | `cnspec scan auth0 --domain TENANT_DOMAIN --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| AWS アカウント | `aws` | `cnspec scan aws` |
| AWS CloudFormation テンプレート | `cloudformation` | `cnspec scan cloudformation cloudformation_file.json` |
| AWS EC2 EBS スナップショット | `aws ec2 ebs snapshot` | `cnspec scan aws ec2 ebs snapshot SNAPSHOTID` |
| AWS EC2 EBS ボリューム | `aws ec2 ebs volume` | `cnspec scan aws ec2 ebs volume VOLUMEID` |
| AWS EC2 Instance Connect | `aws ec2 instance-connect` | `cnspec scan aws ec2 instance-connect ec2-user@INSTANCEID` |
| AWS EC2 インスタンス | `ssh` | `cnspec scan ssh user@host` |
| Bicep ファイルと ARM テンプレート | `bicep` | `cnspec scan bicep BICEP_FILE_OR_PATH` |
| Bitwarden 組織 | `bitwarden` | `cnspec scan bitwarden --client-id organization.UUID --client-secret CLIENT_SECRET` |
| ブロックデバイス | `device` | `cnspec scan device --lun LOGICAL_UNIT_NUMBER` |
| Check Point 管理サーバー | `checkpoint` | `cnspec scan checkpoint --hostname HOSTNAME --api-key API_KEY` |
| Cisco Catalyst デバイス | `ciscocatalyst` | `cnspec scan ciscocatalyst HOSTNAME --user USER --ask-pass` |
| Claude AI プラットフォームアカウント | `claude` | `cnspec scan claude --admin-token ADMIN_API_KEY` |
| ClickHouse Cloud 組織 | `clickhousecloud` | `cnspec scan clickhousecloud --organization-id ORG_ID --api-key KEY_ID --ask-secret` |
| ClickHouse サーバー | `clickhousedb` | `cnspec scan clickhousedb HOST --user USER --ask-pass` |
| Cloudflare アカウント | `cloudflare` | `cnspec scan cloudflare --token ACCESS_TOKEN` |
| Confluence ユーザー | `atlassian confluence` | `cnspec shell atlassian confluence --host YOUR_HOST_URL --user USER --user-token YOUR_TOKEN` |
| コンテナイメージ | `container`, `docker` | `cnspec scan container ubuntu:latest` |
| コンテナレジストリ | `container registry` | `cnspec scan container registry index.docker.io/library/rockylinux:8` |
| Databricks アカウント | `databricks` | `cnspec scan databricks --account-id ACCOUNT_ID --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| Datadog アカウント | `datadog` | `cnspec scan datadog --api-key API_KEY --app-key APP_KEY` |
| DigitalOcean アカウント | `digitalocean` | `cnspec scan digitalocean --token API_TOKEN` |
| DNS レコード | `host` | `cnspec scan host mondoo.com` |
| Dockerfile | `docker` | `cnspec shell docker file FILENAME` |
| Dropbox Business チーム | `dropbox` | `cnspec scan dropbox --token TEAM_ACCESS_TOKEN` |
| Elasticsearch クラスター | `elasticsearch` | `cnspec scan elasticsearch HOST --user USER --ask-pass` |
| F5 BIG-IP システム | `bigip` | `cnspec scan bigip --hostname HOSTNAME --username USER --ask-pass` |
| ファイルシステム | `filesystem` | `cnspec scan filesystem MOUNT_PATH` |
| FortiOS デバイス | `fortios` | `cnspec scan fortios --hostname HOSTNAME --token API_TOKEN` |
| GitHub 組織 | `github org` | `cnspec scan github org mondoohq` |
| GitHub リポジトリ | `github repo` | `cnspec scan github repo mondoohq/cnspec` |
| GitLab グループ | `gitlab` | `cnspec scan gitlab --group mondoohq` |
| Google Cloud プロジェクト | `gcp` | `cnspec scan gcp` |
| Google Workspace | `google-workspace` | `cnspec scan google-workspace --customer-id CUSTOMER_ID --impersonated-user-email EMAIL --credentials-path JSON_FILE` |
| Grafana 組織 | `grafana` | `cnspec scan grafana --url GRAFANA_URL --token API_TOKEN` |
| HashiCorp Cloud Platform | `hcp` | `cnspec scan hcp --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| Helm チャート | `helm` | `cnspec scan helm CHART_PATH` |
| Hetzner Cloud プロジェクト | `hetzner` | `cnspec scan hetzner --token API_TOKEN` |
| Hugging Face ネームスペース | `huggingface` | `cnspec scan huggingface --token API_TOKEN --namespace NAMESPACE --namespace-type org` |
| IBM Db2 データベース | `db2` | `cnspec scan db2 HOST --database DATABASE --user USER --ask-pass` |
| IoT デバイス | `opcua` | `cnspec shell opcua` |
| IP アドレス情報 | `ipinfo` | `cnspec shell ipinfo` |
| IPMI インターフェース | `ipmi` | `cnspec scan ipmi user@host` |
| Iru テナント | `iru` | `cnspec scan iru --subdomain SUBDOMAIN --token API_TOKEN` |
| Jamf Pro アカウント | `jamf` | `cnspec scan jamf --client-id CLIENT_ID --client-secret CLIENT_SECRET --instance-domain INSTANCE_URL` |
| JFrog Artifactory インスタンス | `artifactory` | `cnspec scan artifactory --url ARTIFACTORY_URL --token ACCESS_TOKEN` |
| Jira プロジェクト | `atlassian jira` | `cnspec shell atlassian jira --host YOUR_HOST_URL --user USER --user-token YOUR_TOKEN` |
| JumpCloud 組織 | `jumpcloud` | `cnspec scan jumpcloud --api-key API_KEY` |
| Juniper Junos デバイス | `junos` | `cnspec scan junos --hostname DEVICE_IP --username USER_NAME --identity-file SSH_IDENTITY_FILE` |
| Keycloak サーバー | `keycloak` | `cnspec scan keycloak --url KEYCLOAK_URL --realm REALM --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| Kubernetes クラスターノード | `local`, `ssh` | `cnspec scan ssh user@host` |
| Kubernetes クラスター | `k8s` | `cnspec scan k8s` |
| Kubernetes マニフェスト | `k8s` | `cnspec scan k8s manifest.yaml` |
| Kubernetes ワークロード | `k8s` | `cnspec scan k8s --discover pods,deployments` |
| Kustomize オーバーレイ | `kustomize` | `cnspec scan kustomize OVERLAY_PATH` |
| Linux ホスト | `local`, `ssh` | `cnspec scan local` または<br></br>`cnspec scan ssh user@host` |
| macOS ホスト | `local`, `ssh` | `cnspec scan local` または<br></br>`cnspec scan ssh user@IP_ADDRESS` |
| Microsoft 365 テナント | `ms365` | `cnspec scan ms365 --tenant-id TENANT_ID --client-id CLIENT_ID --certificate-path PEM_FILE` |
| Microsoft Azure インスタンス | `ssh` | `cnspec scan ssh user@host` |
| Microsoft Azure サブスクリプション | `azure` | `cnspec scan azure --subscription SUBSCRIPTION_ID` |
| Microsoft SQL Server インスタンス | `mssql` | `cnspec scan mssql HOST --user USER --ask-pass` |
| MikroTik RouterOS デバイス | `mikrotik` | `cnspec scan mikrotik user@host --ask-pass` |
| Mistral AI ワークスペース | `mistral` | `cnspec scan mistral --token API_KEY --workspace WORKSPACE_ID` |
| Model Context Protocol サーバー | `mcp` | `cnspec scan mcp http http://localhost:8080/mcp` |
| Mondoo Platform | `mondoo` | `cnspec scan mondoo` |
| MongoDB Atlas 組織 | `mongodbatlas` | `cnspec scan mongodbatlas --org-id ORG_ID --public-key PUBLIC_KEY --private-key PRIVATE_KEY` |
| MongoDB サーバー | `mongo` | `cnspec scan mongo HOST --user USER --ask-pass` |
| MySQL および MariaDB サーバー | `mysqldb` | `cnspec scan mysqldb HOST --user USER --ask-pass` |
| Neon 組織 | `neon` | `cnspec scan neon --token API_KEY` |
| Netlify アカウント | `netlify` | `cnspec scan netlify --token ACCESS_TOKEN` |
| SSH 経由のネットワークデバイス | `nd-ssh` | `cnspec scan nd-ssh user@host --ask-pass` |
| NextDNS アカウント | `nextdns` | `cnspec scan nextdns --api-key API_KEY` |
| Nmap ネットワークスキャン | `nmap` | `cnspec shell nmap host IP_ADDRESS` |
| Nutanix Prism Central | `nutanix` | `cnspec scan nutanix --endpoint ENDPOINT --user USER --ask-pass` |
| Okta 組織 | `okta` | `cnspec scan okta --token TOKEN --organization ORGANIZATION` |
| Ollama インスタンス | `ollama` | `cnspec scan ollama --host OLLAMA_URL` |
| OpenAI アカウント | `openai` | `cnspec scan openai --token ADMIN_API_KEY --organization ORG_ID` |
| OpenSearch クラスター | `opensearch` | `cnspec scan opensearch HOST --user USER --ask-pass` |
| OpenStack プロジェクト | `openstack` | `cnspec scan openstack --cloud CLOUDS_YAML_ENTRY` |
| Oracle Cloud Interface (OCI) | `oci` | `cnspec scan oci` |
| Oracle Database | `oracledb` | `cnspec scan oracledb HOST --service SERVICE_NAME --user USER --ask-pass` |
| PAN-OS ファイアウォール | `panos` | `cnspec scan panos --hostname HOSTNAME --username USER --ask-pass` |
| Portainer インスタンス | `portainer` | `cnspec scan portainer PORTAINER_URL --access-token ACCESS_TOKEN` |
| PostgreSQL サーバー | `postgresdb` | `cnspec scan postgresdb HOST --user USER --ask-pass` |
| Proxmox VE ハイパーバイザー | `proxmox` | `cnspec scan proxmox --host PROXMOX_URL --token API_TOKEN` |
| Redfish 管理コントローラー | `redfish` | `cnspec scan redfish user@host --ask-pass` |
| Redis および Valkey サーバー | `redisdb` | `cnspec scan redisdb HOST --ask-pass` |
| 実行中のコンテナ | `docker` | `cnspec scan docker CONTAINER_ID` |
| Shodan 検索エンジン | `shodan` | `cnspec shell shodan` |
| Slack チーム | `slack` | `cnspec scan slack --token TOKEN` |
| Snowflake アカウント | `snowflake` | `cnspec scan snowflake --account ACCOUNT_ID --region REGION --user USER --role ROLE --token TOKEN` |
| ソフトウェア依存関係 | `depsdev` | `cnspec scan depsdev PATH_TO_GO_MOD` |
| ウェブサイトの SSL 証明書 | `host` | `cnspec scan host mondoo.com` |
| STACKIT プロジェクト | `stackit` | `cnspec scan stackit --project-id PROJECT_ID --service-account-key-path KEY_FILE` |
| サブドメイン | `networkdiscovery` | `cnspec scan networkdiscovery mondoohq.com --discover subdomains` |
| Tailscale ネットワーク | `tailscale` | `cnspec scan tailscale --token ACCESS_TOKEN` |
| Terraform HCL | `terraform` | `cnspec scan terraform HCL_FILE_OR_PATH` |
| Terraform プラン | `terraform plan` | `cnspec scan terraform plan plan.json` |
| Terraform ステート | `terraform state` | `cnspec scan terraform state state.json` |
| Together AI アカウント | `together` | `cnspec scan together --token API_KEY` |
| Ubiquiti UniFi コントローラー | `unifi` | `cnspec scan unifi --hostname HOSTNAME --username USER --ask-pass` |
| Vagrant 仮想マシン | `vagrant` | `cnspec scan vagrant HOST` |
| Vercel アカウント | `vercel` | `cnspec scan vercel --token ACCESS_TOKEN` |
| vLLM 推論サーバー | `vllm` | `cnspec scan vllm ENDPOINT` |
| VMware Cloud Director | `vcd` | `cnspec shell vcd --user USER --host HOST --ask-pass` |
| VMware vSphere | `vsphere` | `cnspec scan vsphere user@domain@host --ask-pass` |
| Weaviate ベクターデータベース | `weaviate` | `cnspec scan weaviate HOST --api-key API_KEY` |
| Windows ホスト | `local`, `ssh`, `winrm` | `cnspec scan local`、<br></br>`cnspec scan ssh Administrator@IP_ADDRESS --ask-pass` または<br></br>`cnspec scan winrm Administrator@IP_ADDRESS --ask-pass` |
| Zoom アカウント | `zoom` | `cnspec scan zoom --account-id ACCOUNT_ID --client-id CLIENT_ID --client-secret CLIENT_SECRET` |## エージェントスキル
cnspecには、コーディングエージェントにMQLの専門知識とポリシーナビゲーション機能を提供するエージェントスキルが含まれています。スキルはClaude Code、Cursor、Gemini CLI、Codexで動作します。
| スキル | 説明 |
|-------|-------------|
| [mql](https://github.com/mondoohq/cnspec/blob/main/skills/mql) | 構文ガイダンス、プラットフォーム固有のパターン、スキーマ検出を備えたMQLクエリ開発 |
| [policy-graph](https://github.com/mondoohq/cnspec/blob/main/skills/policy-graph) | グラフコマンドを使用したポリシーバンドルのナビゲーション — 検索、コンプライアンスマッピングの追跡、構造の探索 |
インストール手順と詳細については、[skills/README.md](https://github.com/mondoohq/cnspec/blob/main/skills/README.md)を参照してください。
## 次のステップは?
cnspecには、インフラストラクチャ全体の脆弱性テストから、情報収集や監査人向けのレポート作成まで、さまざまなことができます。カスタムポリシーを使用すれば、cnspecは関心のあるあらゆるコンポーネントをスキャンできます!
以下をご覧ください:
- [cnspecドキュメント](https://mondoo.com/docs/cnspec)
- [Policy as code](https://mondoo.com/docs/cnspec/write-policies/write-intro)
- [MQL](https://github.com/mondoohq/mql)、当社のオープンソースでクラウドネイティブなアセットインベントリフレームワーク
- [MQL入門](https://mondoohq.github.io/mql-intro/index.html)
- [MQLリソースパック](https://mondoo.com/docs/mql/resources)
- cnspecをHashiCorp Packerと統合する[HashiCorp Packerプラグイン](https://github.com/mondoohq/packer-plugin-mondoo)!
## コミュニティに参加しましょう!
私たちの目標は、インフラストラクチャのすべてのレイヤーを保護することです。サポートが必要な場合や、cnspecの開発に参加したい場合は、今すぐ[コミュニティ](https://github.com/orgs/mondoohq/discussions)に参加して、一緒に成長させていきましょう!
## 開発
cnspecのビルドとコントリビューションについては、[開発ドキュメント](https://github.com/mondoohq/cnspec/blob/main/docs/development.md)を参照してください。
## 法的情報
- **著作権:** 2018-2026, Mondoo, Inc.
- **ライセンス:** BUSL 1.1
- **作者:** Christoph Hartmann, Dominik Richter
| プラットフォーム | バージョン |
|---|
| Alpine | 3.10 - 3.24 |
| AlmaLinux | 8, 9, 10 |
| Amazon Linux | 1, 2, 2023 |
| Arch Linux | Rolling |
| 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 |