On Demand DetectX Swift scanning with a Munki NoPkg

Another component to my DetectX Swift (DTXS) Management License rollout this week is the ability for users to run a scan and have the results be sent to MunkiReport immediately. This could be useful anytime I don’t have easy access to a user’s computer and am having to walk them through things over the phone or via Slack and I want to verify the results of the scan remotely.

I accomplished this with an on demand Munki NoPkg that any standard user can easily run via Managed Software Center. Read on for the details.

DTXS reporting in MunkiReport requires the handy DetectX Module created by Zack McCauley to be included in your MR instance.

The following NoPkg can be dropped right into your Munki repo. Edits are only needed if you install DTXS somewhere other than the /Applications/ folder.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>OnDemand</key>
	<true/>
	<key>_metadata</key>
	<dict>
		<key>created_by</key>
		<string>kevinmcox</string>
		<key>creation_date</key>
		<date>2018-08-16T09:05:44Z</date>
		<key>munki_version</key>
		<string>3.3.1.3537</string>
		<key>os_version</key>
		<string>10.13.6</string>
	</dict>
	<key>autoremove</key>
	<false/>
	<key>catalogs</key>
	<array>
		<string>testing</string>
		<string>beta</string>
		<string>live</string>
	</array>
	<key>category</key>
	<string>Self-Service</string>
	<key>description</key>
	<string>Run this action to execute a full disk search for potential malware on your computer using DetectX Swift. The results will be automatically transmitted to The Daily News’ reporting center for evalution. (There will be no visible signs that this search is taking place and you may safely close Managed Software Center after clicking Install.)</string>
	<key>developer</key>
	<string>Kevin M. Cox</string>
	<key>display_name</key>
	<string>DetectX Search &amp; Report</string>
	<key>icon_name</key>
	<string>DetectX Swift.png</string>
	<key>installer_type</key>
	<string>nopkg</string>
	<key>minimum_os_version</key>
	<string>10.11</string>
	<key>name</key>
	<string>DetectX OnDemand</string>
	<key>postinstall_script</key>
	<string>#!/bin/bash

"/Applications/DetectX Swift.app/Contents/MacOS/DetectX Swift" search -aj "/usr/local/munki/preflight.d/cache/detectx.json"</string>
	<key>unattended_install</key>
	<false/>
	<key>version</key>
	<string>1.0</string>
</dict>
</plist>

Leave a Reply

Your email address will not be published. Required fields are marked *