Skip to content

Commit

Permalink
add query to get the current logged-in user (#145)
Browse files Browse the repository at this point in the history
The idea of identifying logged-in users originates from the fact that
identifying devices by their names is often challenging.
It would, therefore, be helpful if the current or last logged-in user
were displayed when the device dashboard is shown.

Signed-off-by: Patrick Münch <[email protected]>
  • Loading branch information
atomic111 authored Apr 10, 2024
1 parent 48b2b67 commit 32dbdf5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 5 additions & 2 deletions core/mondoo-linux-inventory.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packs:
- uid: mondoo-linux-inventory
name: Linux Inventory Pack
version: 1.6.0
version: 1.6.1
license: BUSL-1.1
authors:
- name: Mondoo, Inc
Expand Down Expand Up @@ -159,4 +159,7 @@ packs:
asset.family.contains('linux')
packages.where(name == /xorg|xserver|wayland/i).any(installed)
mql: |
command('lsblk').stdout
command('lsblk').stdout
- uid: mondoo-linux-logged-in-users
title: Logged-in users
mql: command('users').stdout
5 changes: 4 additions & 1 deletion core/mondoo-macos-inventory.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packs:
- uid: mondoo-macos-inventory
name: macOS Inventory Pack
version: 1.4.0
version: 1.4.1
license: BUSL-1.1
authors:
- name: Mondoo, Inc
Expand Down Expand Up @@ -129,3 +129,6 @@ packs:
title: Configuration Profile Data
mql: |
parse.json(content: command('system_profiler SPConfigurationProfileDataType -json').stdout).params
- uid: mondoo-macos-logged-in-users
title: Logged-in users
mql: command('users').stdout
6 changes: 5 additions & 1 deletion core/mondoo-windows-inventory.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
packs:
- uid: mondoo-windows-asset-inventory
name: Windows Asset Inventory Pack
version: 1.6.0
version: 1.6.1
license: BUSL-1.1
authors:
- name: Mondoo, Inc
Expand Down Expand Up @@ -133,3 +133,7 @@ packs:
title: Scheduled tasks
mql: |
parse.json(content: powershell("Get-ScheduledTask | ConvertTo-Json").stdout).params
- uid: mondoo-windows-logged-in-users
title: Logged-in users
mql: |
parse.json(content: powershell("Get-Process -IncludeUserName explorer | Select-Object Username | ConvertTo-Json").stdout).params

0 comments on commit 32dbdf5

Please sign in to comment.