Skip to content

Commit

Permalink
🧹 fix asset filters in asset-count query pack (#84)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 authored Aug 1, 2023
1 parent d495d50 commit 8f27930
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Adddays
cea
CUSTOMERID
ipaddress
Expand Down
13 changes: 6 additions & 7 deletions extra/mondoo-asset-count.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ packs:
filters: asset.platform == 'azure' || asset.platform == 'microsoft365'
queries:
- uid: mondoo-asset-count-on-azure
- uid: mondoo-count-users-in-azure
- uid: mondoo-count-users-in-azure
- title: Windows Active Directory asset counts
filters: asset.platform == "windows"
queries:
- uid: mondoo-asset-count-in-windows-domain
- title: AWS asset counts
filters: asset.platform == "aws"
queries:
Expand Down Expand Up @@ -56,24 +60,20 @@ packs:
queries:
- uid: mondoo-asset-count-on-vsphere-cluster-esxi
title: Retrieve all ESXi hosts
filters: asset.platform == 'vmware-vsphere'
query: |
vsphere.datacenters { hosts.length }
- uid: mondoo-asset-count-on-vsphere-cluster-vms
title: Retrieve all VMs from vSphere cluster
filters: asset.platform == 'vmware-vsphere'
query: |
vsphere.datacenters { vms.length }
- uid: mondoo-asset-count-on-azure
filters: asset.platform == 'azure' || asset.platform == 'microsoft365'
title: Retrieve all VMs from Azure
query: |
azure.compute.vms.length
- uid: mondoo-count-users-in-azure
filters: asset.platform == 'azure' || asset.platform == 'microsoft365'
title: Retrieve all users from Azure
query: |
azuread.users.length
Expand Down Expand Up @@ -238,6 +238,5 @@ packs:

- uid: mondoo-asset-count-in-windows-domain
title: Retrieve all computer object from the Windows domain
filters: asset.platform == "windows" && windows.computerInfo['OsProductType'] == 2
query: |
parse.json(content: powershell('Get-ADComputer -Filter * -properties * | select Name, Enabled,Operatingsystem,OperatingSystemVersion | ConvertTo-Json').stdout).params
parse.json(content: powershell('$time = (Get-Date).Adddays(-(180));Get-ADComputer -Filter {LastLogonTimeStamp -ge $time} -properties * | select Name,Enabled,OperatingSystem,OperatingSystemVersion,LastLogonDate | ConvertTo-Json').stdout).params

0 comments on commit 8f27930

Please sign in to comment.