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

Add single asset-level azure queries #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

preslavgerchev
Copy link
Contributor

Adds a new query for each azure new resource-as-asset we now support in cnquery and cnspec.
There's a lot of copy/pasta here. I've added a -single suffix to each query to indicate it's meant to be used only with a specific asset since the queries differ, e.g.

old query that checks vms disks:

azure.compute.vms {....}

new query that checks a specific vm's disks:

azure.subscription.compute.vm{....}

^ note it's singular versus plural

Here's an example new group of queries that will be run on each sql server:

  - asset_filter:
      query: |
        platform.name == "azure-sql-server"
        platform.kind == "azure-object"
    scoring_queries:
      mondoo-azure-security-no-sql-databases-allow-ingress-0-0-0-0-0-single: null
      mondoo-azure-security-ensure-auditing-on-single: null
      mondoo-azure-security-ensure-auditing-retention-greater-than-90-days-single: null

Running a full discovery and scan with this policy gives results like:
image

@preslavgerchev preslavgerchev requested a review from HRouhani March 14, 2023 15:43
@HRouhani
Copy link
Contributor

As discussed with Preslav, we decided not to merge it for the moment!

@tas50
Copy link
Member

tas50 commented Oct 25, 2024

Is this still a PR we want to take on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants