Skip to content

Commit

Permalink
Organizes cnspec cloud docs (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
misterpantz authored Mar 11, 2024
1 parent 5bd9549 commit b5eb347
Show file tree
Hide file tree
Showing 29 changed files with 128 additions and 104 deletions.
6 changes: 3 additions & 3 deletions docs/cnspec/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ To learn how to sign up for a free Mondoo account and register cnspec, read [Log

## Learn more

- To get started with AWS, read [Assess AWS Security](/cnspec/cnspec-aws/).
- To get started with AWS, read [Assess AWS Security](/cnspec/cloud/aws).

- To get started with Google Cloud, read [Assess Google Cloud Security](/cnspec/cnspec-gcp/).
- To get started with Google Cloud, read [Assess Google Cloud Security](/cnspec/cloud/gcp/).

- To get started with Kubernetes, read [Assess Kubernetes Security](/cnspec/cnspec-k8s/).
- To get started with Kubernetes, read [Assess Kubernetes Security](/cnspec/cloud/k8s/).

- To explore cnspec commands, read the [CLI Reference](/cnspec/cli/cnspec).

Expand Down
10 changes: 5 additions & 5 deletions docs/cnspec/cli/cnspec_scan.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ cnspec scan ssh [email protected]:2222
cnspec scan aws --region us-east-1
```

To learn more, read [Assess AWS Security with cnspec](/cnspec/cnspec-aws/).
To learn more, read [Assess AWS Security with cnspec](/cnspec/cloud/aws).

#### Scan Azure

```bash
cnspec scan azure --subscription SUBSCRIPTION_ID --group GROUP_NAME
```

To learn more, read [Assess Azure Security with cnspec](/cnspec/cnspec-azure/).
To learn more, read [Assess Azure Security with cnspec](/cnspec/cloud/azure/).

#### Scan Google Cloud (GCP)

```bash
cnspec scan gcp project PROJECT_ID
```

To learn more, read [Assess Google Cloud Security with cnspec](/cnspec/cnspec-gcp/).
To learn more, read [Assess Google Cloud Security with cnspec](/cnspec/cloud/gcp/).

#### Scan Kubernetes

Expand All @@ -67,15 +67,15 @@ cnspec scan k8s
cnspec scan k8s MANIFEST_FILE
```

To learn more, read [Assess Kubernetes Security with cnspec](/cnspec/cnspec-k8s/).
To learn more, read [Assess Kubernetes Security with cnspec](/cnspec/cloud/k8s/).

#### Scan Oracle Cloud Infrastructure (OCI)

```bash
cnspec scan oci
```

To learn more, read [Assess Oracle Cloud Infrastructure (OCI) Security with cnspec](/cnspec/cnspec-oci/).
To learn more, read [Assess Oracle Cloud Infrastructure (OCI) Security with cnspec](/cnspec/cloud/oci/).

### Examples: SaaS

Expand Down
10 changes: 5 additions & 5 deletions docs/cnspec/cli/cnspec_shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,39 @@ cnspec shell [flags]
cnspec shell aws
```

To learn more, read [Assess AWS Security with cnspec](/cnspec/cnspec-aws/).
To learn more, read [Assess AWS Security with cnspec](/cnspec/cloud/aws).

#### Query Azure

```bash
cnspec shell azure --subscription SUBSCRIPTION_ID --group GROUP_NAME
```

To learn more, read [Assess Azure Security with cnspec](/cnspec/cnspec-azure/).
To learn more, read [Assess Azure Security with cnspec](/cnspec/cloud/azure/).

#### Query Google Cloud (GCP)

```bash
cnspec shell gcp project PROJECT_ID
```

To learn more, read [Assess Google Cloud Security with cnspec](/cnspec/cnspec-gcp/).
To learn more, read [Assess Google Cloud Security with cnspec](/cnspec/cloud/gcp/).

#### Query Kubernetes

```bash
cnspec shell k8s
```

To learn more, read [Assess Kubernetes Security with cnspec](/cnspec/cnspec-k8s/).
To learn more, read [Assess Kubernetes Security with cnspec](/cnspec/cloud/k8s/).

#### Query Oracle Cloud Infrastructure (OCI)

```bash
cnspec shell oci
```

To learn more, read [Assess Oracle Cloud Infrastructure (OCI) Security with cnspec](/cnspec/cnspec-oci/).
To learn more, read [Assess Oracle Cloud Infrastructure (OCI) Security with cnspec](/cnspec/cloud/oci/).

### Examples: SaaS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess AWS Security with cnspec
id: cnspec-aws-intro
sidebar_label: Get Started
displayed_sidebar: cnspec
sidebar_position: 1
Expand Down Expand Up @@ -41,6 +40,6 @@ cnspec returns `[ok]` to indicate that the test passed, and includes the actual

## Next step

You've successfully used cnspec to run your first check against your AWS account. Now you're ready to [assess your AWS environment.](/cnspec/cnspec-aws/cnspec-aws-account)
You've successfully used cnspec to run your first check against your AWS account. Now you're ready to [assess your AWS environment.](/cnspec/cloud/aws/account)

---
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: Assess an AWS Account
id: cnspec-aws-account
sidebar_label: Assess an AWS Account
displayed_sidebar: cnspec
sidebar_position: 20
description: Assess the security and compliance of an AWS account configuration
image: /img/featured_img/mondoo-aws.jpg
---

Once you've ensured that [cnspec can access your AWS environment](/cnspec/cnspec-aws/), you can begin testing. The method you choose depends on your goals:
Once you've ensured that [cnspec can access your AWS environment](/cnspec/cloud/aws), you can begin testing. The method you choose depends on your goals:

- For widescale assessment of your AWS infrastructure, scan using policy bundles. These collections of tests work together to present a broad picture of your AWS security posture.
- To run ad hoc checks against your AWS environment, use cnspec's interactive shell. It has auto-complete to guide you, which is especially helpful when you're new to cnspec and learning MQL.
Expand Down Expand Up @@ -189,6 +188,6 @@ To exit the cnspec shell, either press `Ctrl + D` or type `exit`.
## Next step
Now that you've scanned your AWS environment and run tests using the cnquery shell, you're ready to dive deeper and [test your EC2 instances](/cnspec/cnspec-aws/cnspec-aws-ec2/).
Now that you've scanned your AWS environment and run tests using the cnquery shell, you're ready to dive deeper and [test your EC2 instances](/cnspec/cloud/aws/ec2/).
---
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: Assess AWS Security from AWS CloudShell
description: Learn how to install and configure cnspec in AWS CloudShell to run security scans against your AWS account.
displayed_sidebar: cnspec
id: cnspec-aws-cloudshell
sidebar_label: Assess AWS from CloudShell
sidebar_position: 50
image: /img/featured_img/mondoo-aws.jpg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
title: Assess an AWS EC2 Instance
id: cnspec-aws-ec2
sidebar_label: Assess an AWS EC2 Instance
displayed_sidebar: cnspec
sidebar_position: 30
description: Assess the security and compliance of an AWS EC2 instance
image: /img/featured_img/mondoo-aws.jpg
---

Now that you have an introduction to [assessing your AWS security](/cnspec/cnspec-aws/cnspec-aws-account/) with cnspec, let's dive deeper and test EC2 instances.
Now that you have an introduction to [assessing your AWS security](/cnspec/cloud/aws/account/) with cnspec, let's dive deeper and test EC2 instances.

We'll continue working in the cnspec shell, which makes running individual queries easy. If it's not already open, enter `cnspec shell aws` in your terminal. To learn about accessing your AWS account with cnspec, read [Assess AWS Security](/cnspec/cnspec-aws/).
We'll continue working in the cnspec shell, which makes running individual queries easy. If it's not already open, enter `cnspec shell aws` in your terminal. To learn about accessing your AWS account with cnspec, read [Assess AWS Security](/cnspec/cloud/aws).

## EC2 resources

Expand Down Expand Up @@ -67,6 +66,6 @@ aws.ec2.snapshots.all(createVolumePermission.none(_['Group'] == "all" ))

## Next step

To discover more of cnspec's AWS capabilities, [test your EKS clusters](/cnspec/cnspec-aws/cnspec-aws-eks/).
To discover more of cnspec's AWS capabilities, [test your EKS clusters](/cnspec/cloud/aws/eks/).

---
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
title: Assess an AWS EKS Cluster
id: cnspec-aws-eks
sidebar_label: Assess an AWS EKS Cluster
displayed_sidebar: cnspec
sidebar_position: 40
description: Assess the security and compliance of an AWS EKS cluster
image: /img/featured_img/mondoo-aws.jpg
---

Now that you have an introduction to [assessing your AWS account](/cnspec/cnspec-aws/cnspec-aws-account/) with cnspec and have tried an [EC2 test](/cnspec/cnspec-aws/cnspec-aws-ec2), let's dive deeper and test EKS clusters.
Now that you have an introduction to [assessing your AWS account](/cnspec/cloud/aws/account/) with cnspec and have tried an [EC2 test](/cnspec/cloud/aws/ec2), let's dive deeper and test EKS clusters.

We'll continue working in the cnspec shell, which makes running individual queries easy. If it's not already open, enter `cnspec shell aws` in your terminal. To learn about accessing your AWS account with cnspec, read [Assess AWS Security](/cnspec/cnspec-aws/).
We'll continue working in the cnspec shell, which makes running individual queries easy. If it's not already open, enter `cnspec shell aws` in your terminal. To learn about accessing your AWS account with cnspec, read [Assess AWS Security](/cnspec/cloud/aws/).

## EKS resources

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Build Secure AMIs with cnspec and HashiCorp Packer
id: cnspec-aws-packer
sidebar_label: Build Secure AMIs with Packer
displayed_sidebar: cnspec
sidebar_position: 60
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess Azure Security with cnspec
id: cnspec-azure-intro
sidebar_label: Azure
displayed_sidebar: cnspec
sidebar_position: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess Google Cloud Security with cnspec
id: cnspec-gcp-intro
sidebar_label: Get Started
displayed_sidebar: cnspec
sidebar_position: 1
Expand All @@ -14,7 +13,7 @@ cnspec can test any aspect of your GCP configuration. For a list of GCP resource

:::info

You can also use cnspec with HashiCorp Packer to [build secure VM images in Google Cloud](/cnspec/cnspec-gcp/cnspec-gcp-packer/).
You can also use cnspec with HashiCorp Packer to [build secure VM images in Google Cloud](/cnspec/cloud/gcp/packer/).

:::

Expand Down Expand Up @@ -90,7 +89,7 @@ cnspec returns `[ok]` to indicate that the test passed, and includes the actual

You've successfully used cnspec to run your first check on your GCP environment. Now you're ready to explore.

Once you've ensured that [cnspec can access your GCP environment](/cnspec/cnspec-gcp/), you can begin testing. The method you choose depends on your goals:
Once you've ensured that [cnspec can access your GCP environment](/cnspec/cloud/gcp/), you can begin testing. The method you choose depends on your goals:

- For widescale assessment of your GCP infrastructure, scan using policy bundles. These collections of tests work together to present a broad picture of your GCP security posture.
- To run ad hoc checks against your GCP environment, use cnspec's interactive shell. It has auto-complete to guide you, which is especially helpful when you're new to cnspec and learning MQL.
Expand Down Expand Up @@ -273,6 +272,6 @@ To exit the cnspec shell, either press `Ctrl + D` or type `exit`.

## Next step

Learn how to use [snapshot scanning](/cnspec/cnspec-gcp/gcp-snapshot/) to assess GCP instances without affecting your production workload.
Learn how to use [snapshot scanning](/cnspec/cloud/gcp/snapshot/) to assess GCP instances without affecting your production workload.

---
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Build Secure VM Images in Google Cloud with cnspec and HashiCorp Packer
id: cnspec-gcp-packer
sidebar_label: Build Secure VMs with Packer
displayed_sidebar: cnspec
sidebar_position: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Scan GCP Instances Using Snapshots
id: gcp-snapshot
sidebar_label: Scan Instance Snapshots
displayed_sidebar: cnspec
sidebar_position: 2
Expand Down Expand Up @@ -85,4 +84,4 @@ cnquery scan gcp snapshot suse12 --project-id rover-123

## Next step

Learn how you can [Build Secure VM Images in Google Cloud with cnspec and HashiCorp Packer](/cnspec/cnspec-gcp/cnspec-gcp-packer/).
Learn how you can [Build Secure VM Images in Google Cloud with cnspec and HashiCorp Packer](/cnspec/cloud/gcp/packer/).
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess Kubernetes Security with cnspec
id: cnspec-k8s-intro
sidebar_label: Get Started
displayed_sidebar: cnspec
sidebar_position: 1
Expand Down Expand Up @@ -45,6 +44,6 @@ This asserts that none of your deployments are named `foo`. cnspec returns a rep

## Next step

You've successfully used cnspec to run your first check against your Kubernetes infrastructure. Now you're ready to [explore more Kubernetes information.](/cnspec/cnspec-k8s/cnspec-k8s-cluster)
You've successfully used cnspec to run your first check against your Kubernetes infrastructure. Now you're ready to [explore more Kubernetes information.](/cnspec/cloud/k8s/cluster)

---
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: Assess a Kubernetes Cluster
id: cnspec-k8s-cluster
sidebar_label: Assess a Kubernetes Cluster
displayed_sidebar: cnspec
sidebar_position: 20
description: Assess the security and compliance of a Kubernetes cluster
image: /img/featured_img/mondoo-k8s.jpg
---

Once you've ensured that [cnspec can access your Kubernetes environment](/cnspec/cnspec-k8s/), you can begin testing. The method you choose depends on your goals:
Once you've ensured that [cnspec can access your Kubernetes environment](/cnspec/cloud/k8s/), you can begin testing. The method you choose depends on your goals:

- For widescale assessment of your Kubernetes infrastructure, scan using policy bundles. These collections of tests work together to present a broad picture of your Kubernetes security posture.
- To run ad hoc checks against your Kubernetes environment, use cnspec's interactive shell. It has auto-complete to guide you, which is especially helpful when you're new to cnspec and learning MQL.
Expand Down Expand Up @@ -1049,6 +1048,6 @@ To exit the cnspec shell, either press `Ctrl + D` or type `exit`.

## Next step

Now that you've scanned your Kubernetes environment and run tests using the cnquery shell, you're ready to dive deeper and [test Kubernetes manifests](/cnspec/cnspec-k8s/cnspec-k8s-manifest/).
Now that you've scanned your Kubernetes environment and run tests using the cnquery shell, you're ready to dive deeper and [test Kubernetes manifests](/cnspec/cloud/k8s/manifest/).

---
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess a Kubernetes Manifest
id: cnspec-k8s-manifest
sidebar_label: Assess a Kubernetes Manifest
displayed_sidebar: cnspec
sidebar_position: 30
Expand All @@ -10,7 +9,7 @@ image: /img/featured_img/mondoo-k8s.jpg

Use cnspec to scan Kubernetes manifests for security and best practices. You can assess manifests using the same policies that you rely on for testing your live clusters.

To scan a Kubernetes manifest, you need a Kubernetes policy. If you haven't already [downloaded the Kubernetes Security by Mondoo policy](/cnspec/cnspec-k8s/cnspec-k8s-cluster/#assess-kubernetes-security-with-policy-based-scanning), do so now.
To scan a Kubernetes manifest, you need a Kubernetes policy. If you haven't already [downloaded the Kubernetes Security by Mondoo policy](/cnspec/cloud/k8s/cluster/#assess-kubernetes-security-with-policy-based-scanning), do so now.

From the directory where you downloaded the policy, run:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Assess Oracle Cloud Infrastructure (OCI) Security with cnspec
id: cnspec-oci-intro
sidebar_label: OCI
displayed_sidebar: cnspec
sidebar_position: 1
Expand Down
13 changes: 0 additions & 13 deletions docs/cnspec/cnspec-aws/_cnspec-aws-codebuild.mdx

This file was deleted.

4 changes: 4 additions & 0 deletions docs/cnspec/cnspec-oper/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Operating Systems",
"position": 1
}
8 changes: 4 additions & 4 deletions docs/cnspec/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Download and install cnspec on your assets.

### Get Started with:

- [AWS](/cnspec/cnspec-aws/)
- [AWS](/cnspec/cloud/aws/)

- [Azure](/cnspec/cnspec-azure/)
- [Azure](/cnspec/cloud/azure/)

- [GCP](/cnspec/cnspec-gcp/)
- [GCP](/cnspec/cloud/gcp/)

- [Kubernetes](/cnspec/cnspec-k8s/)
- [Kubernetes](/cnspec/cloud/k8s/)

- [Linux](/cnspec/cnspec-oper/cnspec-linux-intro)

Expand Down
4 changes: 2 additions & 2 deletions docs/cnspec/supplychain/packer.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ If you prefer to build the plugin from sources, clone the GitHub repository loca

## Learn more

- AWS users can [build secure AMIs with Mondoo and Packer](/cnspec/cnspec-aws/cnspec-aws-packer/).
- AWS users can [build secure AMIs with Mondoo and Packer](/cnspec/cloud/aws/packer/).

- Google Cloud users can [build secure VMs with Mondoo and Packer](/cnspec/cnspec-gcp/cnspec-gcp-packer)
- Google Cloud users can [build secure VMs with Mondoo and Packer](/cnspec/cloud/gcp/packer)

- To learn more about how the MQL query language works, read [Write Effective MQL](/mql/mql.write/).

Expand Down
2 changes: 1 addition & 1 deletion docs/platform/infra/cloud/aws/aws-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The [Mondoo AWS Integration](/platform/infra/cloud/aws/aws-integration-scan) pro

## Scan during build time

[Build Secure AMIs with cnspec and HashiCorp Packer](/cnspec/cnspec-aws/cnspec-aws-packer/): Scan Linux and Windows HashiCorp Packer builds for vulnerabilities and security misconfigurations. Mondoo's plugin works with any of the supported Packer builders, including containers.
[Build Secure AMIs with cnspec and HashiCorp Packer](/cnspec/cloud/aws/packer/): Scan Linux and Windows HashiCorp Packer builds for vulnerabilities and security misconfigurations. Mondoo's plugin works with any of the supported Packer builders, including containers.

## Scan during run time

Expand Down
2 changes: 1 addition & 1 deletion docs/platform/infra/cloud/azure/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ With the API-driven Mondoo Azure Integration, you deploy the integration once an

## Scan during run time

- [Scan an Azure subscription from your workstation using cnspec](/cnspec/cnspec-azure/)
- [Scan an Azure subscription from your workstation using cnspec](/cnspec/cloud/azure/)

- [Install cnspec via cloud-init](/platform/infra/opsys/automation/cloudinit.md)

Expand Down
Loading

0 comments on commit b5eb347

Please sign in to comment.