Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore docs generation + lr updates #2087

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 75 additions & 65 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -354,102 +354,112 @@ lr/docs/serve:

# TODO: migrate
.PHONY: lr/docs/markdown
lr/docs/markdown: lr/build
./lr markdown resources/packs/aws/aws.lr \
lr/docs/markdown: providers/lr
./lr markdown providers/arista/resources/arista.lr \
--pack-name "Arista EOS" \
--description "The Arista EOS resource pack lets you use MQL to query and assess the security of your Arista EOS network devices." \
--docs-file providers/arista/resources/arista.lr.manifest.yaml \
--output ../docs/docs/mql/resources/arista-pack
./lr markdown providers/aws/resources/aws.lr \
--pack-name "Amazon Web Services (AWS)" \
--description "The Amazon Web Services (AWS) resource pack lets you use MQL to query and assess the security of your AWS cloud services." \
--docs-file resources/packs/aws/aws.lr.manifest.yaml \
--docs-file providers/aws/resources/aws.lr.manifest.yaml \
--output ../docs/docs/mql/resources/aws-pack
./lr markdown resources/packs/azure/azure.lr \
./lr markdown providers/azure/resources/azure.lr \
--pack-name "Azure" \
--description "The Azure resource pack lets you use MQL to query and assess the security of your Azure cloud services." \
--docs-file resources/packs/azure/azure.lr.manifest.yaml \
--docs-file providers/azure/resources/azure.lr.manifest.yaml \
--output ../docs/docs/mql/resources/azure-pack
./lr markdown resources/packs/core/core.lr \
./lr markdown providers/core/resources/core.lr \
--pack-name "Core" \
--description "The Core pack provides basic MQL resources that let you query and assess the security." \
--docs-file resources/packs/core/core.lr.manifest.yaml \
--docs-file providers/core/resources/core.lr.manifest.yaml \
--output ../docs/docs/mql/resources/core-pack
./lr markdown resources/packs/gcp/gcp.lr \
./lr markdown providers/equinix/resources/equinix.lr \
--pack-name "Equinix" \
--description "The Equinix resource pack lets you use MQL to query and assess the security of your Equinix Metal services." \
--docs-file providers/equinix/resources/equinix.lr.manifest.yaml \
--output ../docs/docs/mql/resources/equinix-pack
./lr markdown providers/gcp/resources/gcp.lr \
--pack-name "Google Cloud Platform (GCP)" \
--description "The Google Cloud Platform (GCP) resource pack lets you use MQL to query and assess the security of your GCP cloud services." \
--docs-file resources/packs/gcp/gcp.lr.manifest.yaml \
--docs-file providers/gcp/resources/gcp.lr.manifest.yaml \
--output ../docs/docs/mql/resources/gcp-pack
./lr markdown resources/packs/github/github.lr \
./lr markdown providers/github/resources/github.lr \
--pack-name "GitHub" \
--description "The GitHub resource pack lets you use MQL to query and assess the security of your GitHub organization and repositories." \
--docs-file resources/packs/github/github.lr.manifest.yaml \
--docs-file providers/github/resources/github.lr.manifest.yaml \
--output ../docs/docs/mql/resources/github-pack
./lr markdown resources/packs/gitlab/gitlab.lr \
./lr markdown providers/gitlab/resources/gitlab.lr \
--pack-name "GitLab" \
--description "The GitLab resource pack lets you use MQL to query and assess the security of your GitLab organization and repositories." \
--docs-file resources/packs/gitlab/gitlab.lr.manifest.yaml \
--docs-file providers/gitlab/resources/gitlab.lr.manifest.yaml \
--output ../docs/docs/mql/resources/gitlab-pack
./lr markdown resources/packs/k8s/k8s.lr \
./lr markdown providers/googleworkspace/resources/googleworkspace.lr \
--pack-name "Google Workspace" \
--description "The Google Workspace resource pack lets you use MQL to query and assess the security of your Google Workspace identities and configuration." \
--docs-file providers/google-workspace/resources/google-workspace.lr.manifest.yaml \
--output ../docs/docs/mql/resources/google-workspace-pack
./lr markdown providers/ipmi/resources/ipmi.lr \
--pack-name "IPMI" \
--description "The IPMI resource pack lets you use MQL to query and assess the security of your IPMI devices." \
--docs-file providers/ipmi/resources/ipmi.lr.manifest.yaml \
--output ../docs/docs/mql/resources/ipmi-pack
./lr markdown providers/k8s/resources/k8s.lr \
--pack-name "Kubernetes (K8s)" \
--description "The Kubernetes resource pack lets you use MQL to query and assess the security of your Kubernetes workloads." \
--docs-file resources/packs/k8s/k8s.lr.manifest.yaml \
--description "The Kubernetes resource pack lets you use MQL to query and assess the security of your Kubernetes cluster and workloads." \
--docs-file providers/k8s/resources/k8s.lr.manifest.yaml \
--output ../docs/docs/mql/resources/k8s-pack
./lr markdown resources/packs/ms365/ms365.lr \
./lr markdown providers/ms365/resources/ms365.lr \
--pack-name "Microsoft 365 (MS365)" \
--description "The Microsoft 365 (MS365) resource pack lets you use MQL to query and assess the security of your MS365 identities and configuration." \
--docs-file resources/packs/ms365/ms365.lr.manifest.yaml \
--description "The Microsoft 365 (MS365) resource pack lets you use MQL to query and assess the security of your Microsoft 365 identities and configuration." \
--docs-file providers/ms365/ms365.lr.manifest.yaml \
--output ../docs/docs/mql/resources/ms365-pack
./lr markdown resources/packs/os/os.lr \
--pack-name "Operating Systems (OS)" \
--description "The Operating Systems (OS) resource pack lets you use MQL to query and assess the security of your operating system packages and configuration." \
--docs-file resources/packs/os/os.lr.manifest.yaml \
--output ../docs/docs/mql/resources/os-pack
./lr markdown resources/packs/terraform/terraform.lr \
--pack-name "Terraform IaC" \
--description "The Terraform IaC resource pack lets you use MQL to query and assess the security of your Terraform HCL, plan and state resources." \
--docs-file resources/packs/terraform/terraform.lr.manifest.yaml \
--output ../docs/docs/mql/resources/terraform-pack
./lr markdown resources/packs/vsphere/vsphere.lr \
--pack-name "VMware vSphere" \
--description "The VMware vSphere resource pack lets you use MQL to query and assess the security of your VMware vSphere hosts and services." \
--docs-file resources/packs/vsphere/vsphere.lr.manifest.yaml \
--output ../docs/docs/mql/resources/vsphere-pack
./lr markdown resources/packs/okta/okta.lr \
./lr markdown providers/network/resources/network.lr \
--pack-name "Network" \
--description "The network resource pack lets you use MQL to query and assess the security of domains and network services." \
--docs-file providers/network/resources/network.lr.manifest.yaml \
--output ../docs/docs/mql/resources/network-pack
./lr markdown providers/oci/resources/oci.lr \
--pack-name "Oracle Cloud Infrastructure (OCI)" \
--description "The Oracle Cloud Infrastructure (OCI) resource pack lets you use MQL to query and assess the security of your OCI cloud services." \
--docs-file providers/oci/resources/oci.lr.manifest.yaml \
--output ../docs/docs/mql/resources/oci-pack
./lr markdown providers/okta/resources/okta.lr \
--pack-name "Okta" \
--description "The Okta resource pack lets you use MQL to query and assess the security of your Okta identities and configuration." \
--docs-file resources/packs/okta/okta.lr.manifest.yaml \
--docs-file providers/okta/resources/okta.lr.manifest.yaml \
--output ../docs/docs/mql/resources/okta-pack
./lr markdown resources/packs/googleworkspace/googleworkspace.lr \
--pack-name "Google Workspace" \
--description "The Google Workspace resource pack lets you use MQL to query and assess the security of your Google Workspace identities and configuration." \
--docs-file resources/packs/googleworkspace/googleworkspace.lr.manifest.yaml \
--output ../docs/docs/mql/resources/googleworkspace-pack
./lr markdown resources/packs/slack/slack.lr \
./lr markdown providers/opcua/resources/opcua.lr \
--pack-name "OPC UA" \
--description "The OPC-UA resource pack lets you use MQL to query and assess the security of your OPC-UA servers." \
--docs-file providers/opcua/resources/opcua.lr.manifest.yaml \
--output ../docs/docs/mql/resources/opcua-pack
./lr markdown providers/os/resources/os.lr \
--pack-name "Operating Systems (OS)" \
--description "The Operating Systems (OS) resource pack lets you use MQL to query and assess the security of your operating system packages and configuration." \
--docs-file providers/os/os.lr.manifest.yaml \
--output ../docs/docs/mql/resources/os-pack
./lr markdown providers/slack/resources/slack.lr \
--pack-name "Slack" \
--description "The Slack resource pack lets you use MQL to query and assess the security of your Slack identities and configuration." \
--docs-file resources/packs/slack/slack.lr.manifest.yaml \
--docs-file providers/slack/resources/slack.lr.manifest.yaml \
--output ../docs/docs/mql/resources/slack-pack
./lr markdown resources/packs/vcd/vcd.lr \
./lr markdown providers/terraform/resources/terraform.lr \
--pack-name "Terraform IaC" \
--description "The Terraform IaC resource pack lets you use MQL to query and assess the security of your Terraform HCL, plan and state resources." \
--docs-file providers/terraform/resources/terraform.lr.manifest.yaml \
--output ../docs/docs/mql/resources/terraform-pack
./lr markdown providers/vcd/resources/vcd.lr \
--pack-name "VMware Cloud Director" \
--description "The VMware Cloud Director resource pack lets you use MQL to query and assess the security of your VMware Cloud Director configuration." \
--docs-file resources/packs/vcd/vcd.lr.manifest.yaml \
--docs-file providers/vcd/resources/vcd.lr.manifest.yaml \
--output ../docs/docs/mql/resources/vcd-pack
./lr markdown resources/packs/arista/arista.lr \
--pack-name "Arista EOS" \
--description "The Arista EOS resource pack lets you use MQL to query and assess the security of your Arista EOS network devices." \
--docs-file resources/packs/arista/arista.lr.manifest.yaml \
--output ../docs/docs/mql/resources/arista-pack
./lr markdown resources/packs/ipmi/ipmi.lr \
--pack-name "IPMI" \
--description "The IPMI resource pack lets you use MQL to query and assess the security of your IPMI devices." \
--docs-file resources/packs/ipmi/ipmi.lr.manifest.yaml \
--output ../docs/docs/mql/resources/ipmi-pack
./lr markdown resources/packs/oci/oci.lr \
--pack-name "Oracle Cloud Infrastructure (OCI)" \
--description "The Oracle Cloud Infrastructure (OCI) resource pack lets you use MQL to query and assess the security of your OCI cloud services." \
--docs-file resources/packs/oci/oci.lr.manifest.yaml \
--output ../docs/docs/mql/resources/oci-pack
./lr markdown resources/packs/opcua/opcua.lr \
--pack-name "OPC UA" \
--description "The OPC-UA resource pack lets you use MQL to query and assess the security of your OPC-UA servers." \
--docs-file resources/packs/opcua/opcua.lr.manifest.yaml \
--output ../docs/docs/mql/resources/opcua-pack
./lr markdown providers/vsphere/resources/vsphere.lr \
--pack-name "VMware vSphere" \
--description "The VMware vSphere resource pack lets you use MQL to query and assess the security of your VMware vSphere hosts and services." \
--docs-file providers/vsphere/resources/vsphere.lr.manifest.yaml \
--output ../docs/docs/mql/resources/vsphere-pack

llx/generate:
go generate ./llx
Expand Down
8 changes: 4 additions & 4 deletions providers/aws/resources/aws.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ resources:
aws.redshift:
docs:
desc: |
The `aws.redshift` resource can be used to assess the configuration of AWS RedShift deployments. The resource returns lists of `aws.rds.dbcluster`, `aws.rds.dbinstance`, and `aws.rds.snapshot` resources, each with fields for assessing the configuration of those assets.
The `aws.redshift` resource can be used to assess the configuration of Amazon Redshift deployments. The resource returns lists of `aws.rds.dbcluster`, `aws.rds.dbinstance`, and `aws.rds.snapshot` resources, each with fields for assessing the configuration of those assets.
fields:
clusters: {}
min_mondoo_version: 5.15.0
Expand All @@ -1892,16 +1892,16 @@ resources:
region
clusterParameterGroupNames
}
title: Return a list of Amazon RedShift clusters deployed across all enabled
title: Return a list of Amazon Redshift clusters deployed across all enabled
regions and the values for specified fields
- query: |
aws.redshift.clusters.where( encrypted == false ) {
arn
region
name
}
title: Return a list of RedShift clusters that are not encrypted and the values
for the `arn` `region` and `name` fields
title: Return a list of Amazon Redshift clusters that are not encrypted and
the values for the `arn` `region` and `name` fields
aws.redshift.cluster:
fields:
allowVersionUpgrade: {}
Expand Down
4 changes: 2 additions & 2 deletions providers/azure/resources/azure.lr
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ private azure.subscription.sqlService.virtualNetworkRule @defaults("id name") {
virtualNetworkSubnetId string
}

// Azure MySQL
// Azure Database for MySQL
private azure.subscription.mySqlService {
// The subscription identifier
subscriptionId string
Expand Down Expand Up @@ -846,7 +846,7 @@ private azure.subscription.mySqlService.flexibleServer @defaults("id name locati
firewallRules() []azure.subscription.sqlService.firewallrule
}

// Azure MariaDB
// Azure Database for MariaDB
private azure.subscription.mariaDbService {
// The subscription identifier
subscriptionId string
Expand Down
Loading