Skip to Content
SecurityAssess & Improve Security

Manage Policies in a Space or Organization

Enable, disable, and preview the security policies Mondoo uses to evaluate a space, or every space in an organization.

Policies are the security standards Mondoo applies to a space. Each new space starts with a default set of policies so you get useful results immediately. From there you control which policies run, in three ways:

ActionEffect
EnableThe policy is used for scoring assets in the space.
PreviewThe policy is evaluated, but its results don't affect scores. Use this to try a policy before adopting it.
DisableThe policy is no longer used in the space. Existing reports from the policy are removed.

Changes you make in a space apply only to that space. To apply a policy to every space in an organization at once, read Manage policies for an entire organization. To learn how policies work conceptually, read How Mondoo Evaluates Your Infrastructure.

You can also manage policies from the command line. See cnspec policy.

To manage policies, you need the Editor or Owner role in the space, or another role with this permission. To see every role, read Roles and permissions.

Policies a new space starts with

A new space has these policies enabled from the start. Each policy evaluates only the assets it applies to, so a policy for a platform you don't scan produces no results.

PlatformPolicies
LinuxMondoo Linux Security
macOSMondoo macOS Security
WindowsMondoo Microsoft Windows Security
KubernetesMondoo Kubernetes Best Practices, Mondoo Kubernetes Cluster and Workload Security
AWSMondoo AWS Security
AzureMondoo Microsoft Azure Security
GCPMondoo Google Cloud (GCP) Security
GitHubMondoo GitHub Organization Security, Mondoo GitHub Repository Security
SlackMondoo Slack Team Security
Domains and endpointsMondoo TLS/SSL Security, Mondoo HTTP Security, Mondoo DNS Security

A new space also starts with the inventory query packs for Linux, macOS, Windows, Kubernetes, AWS, Azure, and GCP, so Mondoo collects inventory data for those platforms without any setup. To learn about query packs, read Collect extra data with query packs.

You can disable any of these policies and enable others, as described in the sections below.

Open the policies list

  1. In the Mondoo App, navigate to the space.

  2. In the side navigation, under Findings, select Policies.

    The Policies page for a space in the Mondoo App

The Policies page lists every scored and previewed policy in the space. Across the top, summary cards show the average policy compliance, how many policies are scoring, previewing, or not applied, and how many exceptions exist. For each policy, the table shows its version, how its assets scored, how many assets it affects, its risk, and its status (SCORED or PREVIEW).

Select a policy to see its checks, the assets it evaluates, its exceptions, and its properties.

To save a copy of a policy, select Download (the download icon) in the header of the policy's page. Mondoo saves the policy bundle as a .mql.yaml file. You can also download policies from the command line with cnspec policy download.

Enable or preview a new policy

  1. On the Policies page, select MANAGE POLICIES.

  2. On the Manage Policies page, find the policy using the search box or the filters on the left.

    The Manage Policies page in the Mondoo App

  3. Next to the policy, select ENABLE.

The next scan uses the new policy.

The filters on the left of the Manage Policies page narrow the list:

FilterShows
StatusPolicies that are Scored, in Preview, or Not enabled.
ScopePolicies assigned at a given level: Space, Organization-wide (This Organization on an organization's page), or Platform-wide. This filter appears only when the list has policies from more than one level.
TechnologyPolicies for a platform, such as an operating system, cloud provider, or SaaS product. To find a platform in the list, type in the Filter technologies box.

In a narrow browser window, select Filters to show the filters.

To find a benchmark, search for its name. For example, search for CIS to list the CIS benchmark policies, or read CIS Benchmark Policies. To assess readiness for post-quantum cryptography, read Assess Post-Quantum Cryptography Readiness.

To see what a policy checks before you enable it, select the policy on the Manage Policies page. Its page shows the policy's description and its checks. Select a check to see its description, its MQL queries, and the Remediation steps for fixing a failure, so you can judge the work involved. You can enable the policy from its page, too.

To add a policy you wrote yourself, select UPLOAD CUSTOM on the Manage Policies page. To learn how to write one, read the Policy Authoring Guide.

Switch a policy to Preview

Preview mode evaluates a policy without affecting scores. Use it to assess a new policy before formally adopting it.

  1. On the Manage Policies page, find the policy.

  2. Select its status menu (the SCORED button) and choose Preview. The policy keeps running but no longer contributes to your space scores.

    The status menu of an enabled policy on the Manage Policies page

To preview several policies at once, select their check boxes on the Policies page and choose Preview.

Disable a policy

Disabling a policy deletes existing reports from it in the space.
  1. On the Manage Policies page, find the policy.

  2. Select its status menu (the SCORED or PREVIEW button) and choose Disable.

To remove several policies at once, select their check boxes on the Policies page and choose Remove.

Delete an uploaded policy

Disabling a policy, or removing several policies at once on the Policies page, stops the policy from running in the space but doesn't delete the policy itself. A custom policy you uploaded stays available on the Manage Policies page, so you can enable it again. To delete an uploaded policy permanently:

  1. On the Policies page, select the policy. A disabled policy isn't on the Policies page, so if you already disabled it, enable it again on the Manage Policies page first.

  2. In the header of the policy's page, select Download (the download icon) to save a backup copy of the policy.

  3. Select Remove (the trash icon), and then confirm.

Deleting an uploaded policy also deletes all data connected to it. You can only restore the policy by uploading it again.

For a policy that Mondoo provides, Remove on the policy's page disables the policy in the space and deletes its results. You can enable it again at any time. A policy assigned to the whole organization or platform has no Remove button in a space.

To delete a policy from the command line, use cnspec policy delete.

Manage policies for an entire organization

Policies you enable in an organization apply to every space in it. Use this for policies every team must meet, so you don't have to enable them space by space.

To manage organization policies, you need the Editor or Owner role in the organization, or another role with this permission. To see every role, read Roles and permissions.

Open the organization's policies

  1. In the Mondoo App, navigate to the organization.

  2. In the side navigation, under Findings, select Policies.

The Organization Policies page in the Mondoo App, with summary cards, the Policy Scope filter set to This Organization, and an organization policy in the list

The Organization Policies page shows summary cards for Avg policy compliance, Policies running, and Total exceptions. The table lists each policy with the number of Assets it evaluates, its Policy Compliance, and its Status.

Above the table, the Policy Scope filter chooses which policies the list includes, by the level they're assigned at:

FilterShows
Platform WidePolicies assigned at the platform level, which run in every organization unless it's opted out.
This OrganizationPolicies assigned in this organization. This is the default.
OtherPolicies assigned in individual spaces of the organization.

Select a policy to see its Overview, Checks, Exceptions, and Properties tabs.

On the Checks tab, the Status column shows SCORED for a check that counts toward scores, or PREVIEW for a check the policy puts in preview. A check in preview runs and reports results, but doesn't affect scores. A space's policy Checks tab doesn't show this column. To see which checks of a policy enabled in a space are in preview, set the Policy Scope filter to Other and open the policy here.

Enable a policy for every space

  1. On the Organization Policies page, select MANAGE POLICIES.

  2. On the Manage Policies page, find the policy using the search box or the filters on the left.

  3. Next to the policy, select ENABLE.

To switch an organization policy to preview, or to disable it, select its status menu (the SCORED or PREVIEW button) on the Manage Policies page and choose Preview or Disable, as you would in a space.

In the Mondoo App, you can upload custom policies only in a space. To apply a custom policy to every space in an organization, upload the policy to the organization and assign it there with the Mondoo API or the Mondoo Terraform provider:

  • With the Mondoo API, call the setCustomPolicy mutation with the organization's MRN as scopeMrn, and then the assignPolicy mutation with the organization's MRN as assetMrn.

  • With the Mondoo Terraform provider, set scope_mrn to the organization's MRN (//captain.api.mondoo.app/organizations/<org-id>) on both the mondoo_custom_policy resource, which uploads the policy, and the mondoo_policy_assignment resource, which enables it.

The policy then runs in every space of the organization. Once it has results, it appears on the Organization Policies page under This Organization.

How organization policies appear in a space

In each space's policies list, a policy assigned in the organization shows Assigned organization-wide under its name. Select organization-wide to open the policy at the organization level. A space can't change or disable an organization policy. On the space's Manage Policies page, the policy shows Assigned to organization and its status control is locked. Hover over the control to see "Organization policies must be modified at the organization level."

Platform-wide policies

Some policies are assigned at the platform level and run in every organization. A platform admin can opt an organization out of them. When that's the case, the Organization Policies and Manage Policies pages show the notice "Platform-wide policies don't apply to this organization." Policies assigned in the organization or its spaces still run. To check whether platform-wide policies apply to an organization, see the Platform-wide policies row in the organization's general settings.

Next steps

Last updated on

On this page