
Eine quelloffene, cloud-native Sicherheitslösung zum Schutz von allem vom Build bis zur Laufzeit
Open-Source-Projekt für cloud-native Sicherheit und Richtlinien
cnspec bewertet die Sicherheit und Compliance Ihrer gesamten Infrastruktur. Es findet Schwachstellen und Fehlkonfigurationen in öffentlichen und privaten Cloud-Umgebungen, Kubernetes-Clustern, Containern, Container-Registries, Servern, Endpunkten, SaaS-Produkten, Infrastructure as Code, APIs und mehr.
Als leistungsstarke Policy-as-Code-Engine basiert cnspec auf dem Security Data Fabric von Mondoo. Es ist mit Standard-Sicherheitsrichtlinien vorkonfiguriert, die sofort einsatzbereit sind. Es ist sowohl schnell als auch einfach zu bedienen!
bash -c "$(curl -sSL https://install.mondoo.com/sh)" cnspec scan local

## Installation
Installiere cnspec mit unserem Installationsskript:
**Linux und macOS**```bash
bash -c "$(curl -sSL https://install.mondoo.com/sh)"
```powershell Set-ExecutionPolicy Unrestricted -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('')); Install-Mondoo;
Wenn Sie die manuelle Installation bevorzugen, finden Sie die cnspec-Pakete in unseren [releases](https://github.com/mondoohq/cnspec/releases).
## Einen Scan mit Richtlinien ausführen
Verwenden Sie den Unterbefehl `cnspec scan`, um lokale und entfernte Ziele auf Fehlkonfigurationen und Schwachstellen zu überprüfen.
### Lokaler Scan
Dieser Befehl bewertet die Sicherheit Ihres lokalen Rechners:```bash
cnspec scan local
Sie können auch Remote-Ziele zum Scannen angeben. Zum Beispiel:```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: Um mehr zu erfahren, lies die cnspec-Dokumentation.](https://mondoo.com/docs/cnspec)
### Richtlinien
cnspec-Richtlinien basieren auf dem Konzept von Policy as Code. cnspec wird mit Standard-Sicherheitsrichtlinien geliefert, die für alle unterstützten Ziele konfiguriert sind. Die Standardrichtlinien sind im Verzeichnis `content` dieses Repositorys verfügbar.
## Schwachstellen-Scan
cnspec scannt auf Schwachstellen in einer Vielzahl von Plattformen. Das Scannen auf Schwachstellen ist nicht auf Container-Images beschränkt; es funktioniert auch für Build und Runtime.

HINWEIS: Das Scannen auf Schwachstellen erfordert, dass der Client bei der Mondoo Platform angemeldet ist.
### Beispiele```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
| Plattform | Versionen |
|---|---|
| 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 |
cnspec bietet auch eine interaktive Shell zum Erkunden von Assertions. Sie hilft Ihnen, die Assertions zu verstehen, die Sicherheitsrichtlinien verwenden, sowie Ihre eigenen Richtlinien zu schreiben. Sie ist auch eine großartige Möglichkeit, spontan mit lokalen und entfernten Zielen zu interagieren.
cnspec shell local
Die Shell bietet einen `help`-Befehl für Informationen zu den Ressourcen, die cnspec antreiben. Wenn `help` ohne Argumente ausgeführt wird, werden alle verfügbaren Ressourcen und ihre Felder aufgelistet. Sie können auch `help <resource>` ausführen, um weitere Details zu einer bestimmten Ressource zu erhalten. Zum Beispiel:```bash
cnspec> help ports
ports: TCP/IP ports on the system
list []port: List of all TCP/IP ports
listening []port: All listening ports
Die Shell verwendet Auto-Vervollständigung, was die Erkundung erleichtert.
Sobald Sie sich in der Shell befinden, können Sie MQL-Assertions wie folgt eingeben:```coffeescript
ports.listening.none( port == 23 )
Um das Terminal zu leeren, gib `clear` ein.
Zum Beenden drücke entweder STRG + D oder gib `exit` ein.
## Priorisiere Risiken, die zählen, mit der Mondoo Platform
Die einheitliche Sicherheitsplattform von Mondoo findet und priorisiert Schwachstellen und Fehlkonfigurationen, die das höchste Risiko für dein Unternehmen darstellen. Der Security Data Fabric von Mondoo analysiert die Bedrohung und Exposition jedes Befunds im einzigartigen Kontext deiner Infrastruktur. Statt einer Flut irrelevanter Sicherheitswarnungen zeigt dir Mondoo, wie du unmittelbar und erheblich auf deine Sicherheitslage einwirken kannst.
Um zu starten, [kontaktiere uns](https://mondoo.com/contact).
Um mehr über die Mondoo Platform zu erfahren, lies die [Mondoo Platform Docs](https://mondoo.com/docs) oder besuche [mondoo.com](https://mondoo.com).
### Registriere cnspec bei der Mondoo Platform
Um cnspec mit der Mondoo Platform zu verwenden, [generiere ein Token in der Mondoo App](https://mondoo.com/docs/cnspec/install/registration) und führe dann aus:```bash
cnspec login --token TOKEN
Sobald Sie authentifiziert sind, können Sie jedes Ziel scannen:```bash cnspec scan
cnspec gibt die Ergebnisse des Scans an `STDOUT` und an die Mondoo Platform zurück.
Mit einem Konto auf der Mondoo Platform können Sie Richtlinien hochladen:```bash
cnspec bundle upload mypolicy.mql.yaml
Eine cnspec-Richtlinie ist einfach eine YAML-Datei, mit der Sie jede Sicherheitsregel oder bewährte Vorgehensweise für Ihren Fuhrpark ausdrücken können.
Einige Beispiele finden Sie im Ordner examples in diesem Repository. Sie können jede dieser Richtlinien ausführen:```bash
cnspec scan local -f examples/example.mql.yaml
Wenn Sie daran interessiert sind, eigene Richtlinien zu schreiben oder Richtlinien an die cnspec-Community zurückzugeben, lesen Sie Mondoos [Policy Authoring Guide](https://mondoo.com/docs/cnspec/write-policies/write-intro).
## Unterstützte Ziele| Ziel | Anbieter | Beispiel |
| ------------------------------ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Active Directory-Domänen | `activedirectory` | `cnspec scan activedirectory --dc DC_HOSTNAME --user USER --password PASSWORD` |
| Alibaba Cloud-Konten | `alicloud` | `cnspec scan alicloud --access-key-id KEY_ID --access-key-secret KEY_SECRET` |
| Ansible-Playbooks | `ansible` | `cnspec shell ansible YOUR_PLAYBOOK.yml` |
| Apache Cassandra-Cluster | `cassandra` | `cnspec scan cassandra HOST --user USER --ask-pass` |
| Arista-Netzwerkgeräte | `arista` | `cnspec scan arista DEVICE_PUBLIC_IP --ask-pass` |
| Atlassian-Organisationen | `atlassian admin` | `cnspec shell atlassian admin --admin-token YOUR_TOKEN` |
| Auth0-Tenants | `auth0` | `cnspec scan auth0 --domain TENANT_DOMAIN --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| AWS-Konten | `aws` | `cnspec scan aws` |
| AWS CloudFormation-Vorlagen | `cloudformation` | `cnspec scan cloudformation cloudformation_file.json` |
| AWS EC2 EBS-Snapshot | `aws ec2 ebs snapshot` | `cnspec scan aws ec2 ebs snapshot SNAPSHOTID` |
| AWS EC2 EBS-Volume | `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-Instanzen | `ssh` | `cnspec scan ssh user@host` |
| Bicep-Dateien und ARM-Vorlagen | `bicep` | `cnspec scan bicep BICEP_FILE_OR_PATH` |
| Bitwarden-Organisationen | `bitwarden` | `cnspec scan bitwarden --client-id organization.UUID --client-secret CLIENT_SECRET` |
| Blockgeräte | `device` | `cnspec scan device --lun LOGICAL_UNIT_NUMBER` |
| Check Point-Managementserver | `checkpoint` | `cnspec scan checkpoint --hostname HOSTNAME --api-key API_KEY` |
| Cisco Catalyst-Geräte | `ciscocatalyst` | `cnspec scan ciscocatalyst HOSTNAME --user USER --ask-pass` |
| Claude AI-Plattformkonten | `claude` | `cnspec scan claude --admin-token ADMIN_API_KEY` |
| ClickHouse Cloud-Organisationen | `clickhousecloud` | `cnspec scan clickhousecloud --organization-id ORG_ID --api-key KEY_ID --ask-secret` |
| ClickHouse-Server | `clickhousedb` | `cnspec scan clickhousedb HOST --user USER --ask-pass` |
| Cloudflare-Konten | `cloudflare` | `cnspec scan cloudflare --token ACCESS_TOKEN` |
| Confluence-Benutzer | `atlassian confluence` | `cnspec shell atlassian confluence --host YOUR_HOST_URL --user USER --user-token YOUR_TOKEN` |
| Container-Images | `container`, `docker` | `cnspec scan container ubuntu:latest` |
| Container-Registries | `container registry` | `cnspec scan container registry index.docker.io/library/rockylinux:8` |
| Databricks-Konten | `databricks` | `cnspec scan databricks --account-id ACCOUNT_ID --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| Datadog-Konten | `datadog` | `cnspec scan datadog --api-key API_KEY --app-key APP_KEY` |
| DigitalOcean-Konten | `digitalocean` | `cnspec scan digitalocean --token API_TOKEN` |
| DNS-Einträge | `host` | `cnspec scan host mondoo.com` |
| Dockerfiles | `docker` | `cnspec shell docker file FILENAME` |
| Dropbox Business-Teams | `dropbox` | `cnspec scan dropbox --token TEAM_ACCESS_TOKEN` |
| Elasticsearch-Cluster | `elasticsearch` | `cnspec scan elasticsearch HOST --user USER --ask-pass` |
| F5 BIG-IP-Systeme | `bigip` | `cnspec scan bigip --hostname HOSTNAME --username USER --ask-pass` |
| Dateisysteme | `filesystem` | `cnspec scan filesystem MOUNT_PATH` |
| FortiOS-Geräte | `fortios` | `cnspec scan fortios --hostname HOSTNAME --token API_TOKEN` |
| GitHub-Organisationen | `github org` | `cnspec scan github org mondoohq` |
| GitHub-Repositories | `github repo` | `cnspec scan github repo mondoohq/cnspec` |
| GitLab-Gruppen | `gitlab` | `cnspec scan gitlab --group mondoohq` |
| Google Cloud-Projekte | `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-Organisationen | `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-Charts | `helm` | `cnspec scan helm CHART_PATH` |
| Hetzner Cloud-Projekte | `hetzner` | `cnspec scan hetzner --token API_TOKEN` |
| Hugging Face-Namespaces | `huggingface` | `cnspec scan huggingface --token API_TOKEN --namespace NAMESPACE --namespace-type org` |
| IBM Db2-Datenbanken | `db2` | `cnspec scan db2 HOST --database DATABASE --user USER --ask-pass` |
| IoT-Geräte | `opcua` | `cnspec shell opcua` |
| IP-Adressinformationen | `ipinfo` | `cnspec shell ipinfo` |
| IPMI-Schnittstellen | `ipmi` | `cnspec scan ipmi user@host` |
| Iru-Tenants | `iru` | `cnspec scan iru --subdomain SUBDOMAIN --token API_TOKEN` |
| Jamf Pro-Konten | `jamf` | `cnspec scan jamf --client-id CLIENT_ID --client-secret CLIENT_SECRET --instance-domain INSTANCE_URL` |
| JFrog Artifactory-Instanzen | `artifactory` | `cnspec scan artifactory --url ARTIFACTORY_URL --token ACCESS_TOKEN` |
| Jira-Projekte | `atlassian jira` | `cnspec shell atlassian jira --host YOUR_HOST_URL --user USER --user-token YOUR_TOKEN` |
| JumpCloud-Organisationen | `jumpcloud` | `cnspec scan jumpcloud --api-key API_KEY` |
| Juniper Junos-Geräte | `junos` | `cnspec scan junos --hostname DEVICE_IP --username USER_NAME --identity-file SSH_IDENTITY_FILE` |
| Keycloak-Server | `keycloak` | `cnspec scan keycloak --url KEYCLOAK_URL --realm REALM --client-id CLIENT_ID --client-secret CLIENT_SECRET` |
| Kubernetes-Clusterknoten | `local`, `ssh` | `cnspec scan ssh user@host` |
| Kubernetes-Cluster | `k8s` | `cnspec scan k8s` |
| Kubernetes-Manifeste | `k8s` | `cnspec scan k8s manifest.yaml` |
| Kubernetes-Workloads | `k8s` | `cnspec scan k8s --discover pods,deployments` |
| Kustomize-Overlays | `kustomize` | `cnspec scan kustomize OVERLAY_PATH` |
| Linux-Hosts | `local`, `ssh` | `cnspec scan local` oder<br></br>`cnspec scan ssh user@host` |
| macOS-Hosts | `local`, `ssh` | `cnspec scan local` oder<br></br>`cnspec scan ssh user@IP_ADDRESS` |
| Microsoft 365-Tenants | `ms365` | `cnspec scan ms365 --tenant-id TENANT_ID --client-id CLIENT_ID --certificate-path PEM_FILE` |
| Microsoft Azure-Instanzen | `ssh` | `cnspec scan ssh user@host` |
| Microsoft Azure-Abonnements | `azure` | `cnspec scan azure --subscription SUBSCRIPTION_ID` |
| Microsoft SQL Server-Instanzen | `mssql` | `cnspec scan mssql HOST --user USER --ask-pass` |
| MikroTik RouterOS-Geräte | `mikrotik` | `cnspec scan mikrotik user@host --ask-pass` |
| Mistral AI-Workspaces | `mistral` | `cnspec scan mistral --token API_KEY --workspace WORKSPACE_ID` |
| Model Context Protocol-Server | `mcp` | `cnspec scan mcp http http://localhost:8080/mcp` |
| Mondoo Platform | `mondoo` | `cnspec scan mondoo` |
| MongoDB Atlas-Organisationen | `mongodbatlas` | `cnspec scan mongodbatlas --org-id ORG_ID --public-key PUBLIC_KEY --private-key PRIVATE_KEY` |
| MongoDB-Server | `mongo` | `cnspec scan mongo HOST --user USER --ask-pass` |
| MySQL- und MariaDB-Server | `mysqldb` | `cnspec scan mysqldb HOST --user USER --ask-pass` |
| Neon-Organisationen | `neon` | `cnspec scan neon --token API_KEY` |
| Netlify-Konten | `netlify` | `cnspec scan netlify --token ACCESS_TOKEN` |
| Netzwerkgeräte über SSH | `nd-ssh` | `cnspec scan nd-ssh user@host --ask-pass` |
| NextDNS-Konten | `nextdns` | `cnspec scan nextdns --api-key API_KEY` |
| Nmap-Netzwerkscans | `nmap` | `cnspec shell nmap host IP_ADDRESS` |
| Nutanix Prism Central | `nutanix` | `cnspec scan nutanix --endpoint ENDPOINT --user USER --ask-pass` |
| Okta-Organisation | `okta` | `cnspec scan okta --token TOKEN --organization ORGANIZATION` |
| Ollama-Instanzen | `ollama` | `cnspec scan ollama --host OLLAMA_URL` |
| OpenAI-Konten | `openai` | `cnspec scan openai --token ADMIN_API_KEY --organization ORG_ID` |
| OpenSearch-Cluster | `opensearch` | `cnspec scan opensearch HOST --user USER --ask-pass` |
| OpenStack-Projekte | `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-Firewalls | `panos` | `cnspec scan panos --hostname HOSTNAME --username USER --ask-pass` |
| Portainer-Instanzen | `portainer` | `cnspec scan portainer PORTAINER_URL --access-token ACCESS_TOKEN` |
| PostgreSQL-Server | `postgresdb` | `cnspec scan postgresdb HOST --user USER --ask-pass` |
| Proxmox VE-Hypervisoren | `proxmox` | `cnspec scan proxmox --host PROXMOX_URL --token API_TOKEN` |
| Redfish-Management-Controller | `redfish` | `cnspec scan redfish user@host --ask-pass` |
| Redis- und Valkey-Server | `redisdb` | `cnspec scan redisdb HOST --ask-pass` |
| Laufende Container | `docker` | `cnspec scan docker CONTAINER_ID` |
| Shodan-Suchmaschine | `shodan` | `cnspec shell shodan` |
| Slack-Team | `slack` | `cnspec scan slack --token TOKEN` |
| Snowflake-Konten | `snowflake` | `cnspec scan snowflake --account ACCOUNT_ID --region REGION --user USER --role ROLE --token TOKEN` |
| Software-Abhängigkeiten | `depsdev` | `cnspec scan depsdev PATH_TO_GO_MOD` |
| SSL-Zertifikate auf Websites | `host` | `cnspec scan host mondoo.com` |
| STACKIT-Projekte | `stackit` | `cnspec scan stackit --project-id PROJECT_ID --service-account-key-path KEY_FILE` |
| Subdomains | `networkdiscovery` | `cnspec scan networkdiscovery mondoohq.com --discover subdomains` |
| Tailscale-Netzwerke | `tailscale` | `cnspec scan tailscale --token ACCESS_TOKEN` |
| Terraform HCL | `terraform` | `cnspec scan terraform HCL_FILE_OR_PATH` |
| Terraform-Plan | `terraform plan` | `cnspec scan terraform plan plan.json` |
| Terraform-State | `terraform state` | `cnspec scan terraform state state.json` |
| Together AI-Konten | `together` | `cnspec scan together --token API_KEY` |
| Ubiquiti UniFi-Controller | `unifi` | `cnspec scan unifi --hostname HOSTNAME --username USER --ask-pass` |
| Vagrant-virtuelle Maschinen | `vagrant` | `cnspec scan vagrant HOST` |
| Vercel-Konten | `vercel` | `cnspec scan vercel --token ACCESS_TOKEN` |
| vLLM-Inferenzserver | `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-Vektordatenbanken | `weaviate` | `cnspec scan weaviate HOST --api-key API_KEY` |
| Windows-Hosts | `local`, `ssh`, `winrm` | `cnspec scan local`,<br></br>`cnspec scan ssh Administrator@IP_ADDRESS --ask-pass` oder<br></br>`cnspec scan winrm Administrator@IP_ADDRESS --ask-pass` |
| Zoom-Konten | `zoom` | `cnspec scan zoom --account-id ACCOUNT_ID --client-id CLIENT_ID --client-secret CLIENT_SECRET` |## Agent-Fähigkeiten
cnspec enthält Agent-Fähigkeiten, die Coding-Agents MQL-Expertise und Fähigkeiten zur Navigation von Policies vermitteln. Die Fähigkeiten funktionieren mit Claude Code, Cursor, Gemini CLI und Codex.
| Fähigkeit | Beschreibung |
|-------|-------------|
| [mql](https://github.com/mondoohq/cnspec/blob/main/skills/mql) | MQL-Abfrageentwicklung mit Syntaxanleitung, plattformspezifischen Mustern und Schema-Erkundung |
| [policy-graph](https://github.com/mondoohq/cnspec/blob/main/skills/policy-graph) | Navigation durch Policy-Bundles mit Graph-Befehlen — Suche, Nachverfolgung von Compliance-Zuordnungen, Erkundung der Struktur |
Siehe [skills/README.md](https://github.com/mondoohq/cnspec/blob/main/skills/README.md) für Installationsanweisungen und Details.
## Wie geht es weiter?
cnspec kann so vieles: von der Prüfung Ihrer gesamten Flotte auf Schwachstellen bis hin zum Sammeln von Informationen und Erstellen von Berichten für Auditoren. Mit seinen benutzerdefinierten Policies kann cnspec jede Komponente scannen, die Ihnen wichtig ist!
Entdecken Sie unsere:
- [cnspec-Dokumentation](https://mondoo.com/docs/cnspec)
- [Policy as Code](https://mondoo.com/docs/cnspec/write-policies/write-intro)
- [MQL](https://github.com/mondoohq/mql), unser Open-Source-, Cloud-native Asset-Inventar-Framework
- [MQL-Einführung](https://mondoohq.github.io/mql-intro/index.html)
- [MQL-Ressourcenpakete](https://mondoo.com/docs/mql/resources)
- [HashiCorp Packer Plugin](https://github.com/mondoohq/packer-plugin-mondoo), um cnspec mit HashiCorp Packer zu integrieren!
## Treten Sie der Community bei!
Unser Ziel ist es, alle Ebenen Ihrer Infrastruktur abzusichern. Wenn Sie Unterstützung benötigen oder sich an der Entwicklung von cnspec beteiligen möchten, treten Sie noch heute unserer [Community](https://github.com/orgs/mondoohq/discussions) bei und lassen Sie sie uns gemeinsam wachsen lassen!
## Entwicklung
Informationen zum Erstellen von und Beitragen zu cnspec finden Sie in unserer [Entwicklungsdokumentation](https://github.com/mondoohq/cnspec/blob/main/docs/development.md).
## Rechtliches
- **Copyright:** 2018-2026, Mondoo, Inc.
- **Lizenz:** BUSL 1.1
- **Autoren:** Christoph Hartmann, Dominik Richter