Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #262 from skoobasteeve/nessus-recipe
Browse files Browse the repository at this point in the history
Nessus Agent recipe w/ postinstall script
  • Loading branch information
homebysix authored Dec 31, 2021
2 parents 1641018 + 5ae0b3c commit ef39e9d
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Nessus Agent/Nessus Agent PostInstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

KEY=""
HOST=""
PORT=""

if [ ! -f "/Library/NessusAgent/run/sbin/nessuscli" ]; then
echo "Nessus Agent package did not successfully install."
echo "Try re-running the policy."
exit 1
fi

if /Library/NessusAgent/run/sbin/nessuscli agent status | grep "Linked to: None"; then
/Library/NessusAgent/run/sbin/nessuscli agent link \
--key="$KEY" \
--host="$HOST" \
--port="$PORT"
else
echo "Nessus Agent already installed and linked!"
fi

exit 0
10 changes: 10 additions & 0 deletions Nessus Agent/Nessus Agent ScriptTemplate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script>
<name>Nessus Agent PostInstall.sh</name>
<category>Testing</category>
<filename>Nessus Agent PostInstall.sh</filename>
<info />
<notes />
<priority>After</priority>
<parameters />
<os_requirements />
</script>
81 changes: 81 additions & 0 deletions Nessus Agent/Nessus Agent.jss.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?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>Comment</key>
<string>This recipe requires a script that links the Nessus Agent with your tenant immediately after installation.
Please edit the KEY, HOST, and PORT variables in the file 'Nessus Agent PostInstall.sh'.
</string>
<key>Description</key>
<string>Downloads the latest version of the Nessus Agent and imports it into your JSS.</string>
<key>Identifier</key>
<string>com.github.jss-recipes.jss.NessusAgent</string>
<key>Input</key>
<dict>
<key>CATEGORY</key>
<string>Productivity</string>
<key>GROUP_NAME</key>
<string>%NAME%-update-smart</string>
<key>GROUP_TEMPLATE</key>
<string>SmartGroupTemplate.xml</string>
<key>NAME</key>
<string>Nessus Agent</string>
<key>POLICY_CATEGORY</key>
<string>Testing</string>
<key>POLICY_TEMPLATE</key>
<string>PolicyTemplate.xml</string>
<key>SELF_SERVICE_DESCRIPTION</key>
<string>Tenable offers Nessus® Agents to meet the challenges that organizations face in today’s modern age of cloud
computing and mobility. Nessus Agents extend scan coverage and provide visibility into hard to scan assets-
like endpoints and other remote assets that intermittently connect to the internet. </string>
<key>SELF_SERVICE_ICON</key>
<string>%NAME%.png</string>
</dict>
<key>MinimumVersion</key>
<string>1.0.0</string>
<key>ParentRecipe</key>
<string>com.github.skoobasteeve.download.NessusAgent</string>
<key>Process</key>
<array>
<dict>
<key>Arguments</key>
<dict>
<key>category</key>
<string>%CATEGORY%</string>
<key>groups</key>
<array>
<dict>
<key>name</key>
<string>%GROUP_NAME%</string>
<key>smart</key>
<true/>
<key>template_path</key>
<string>%GROUP_TEMPLATE%</string>
</dict>
</array>
<key>policy_category</key>
<string>%POLICY_CATEGORY%</string>
<key>policy_template</key>
<string>%POLICY_TEMPLATE%</string>
<key>scripts</key>
<array>
<dict>
<key>name</key>
<string>Nessus Agent PostInstall.sh</string>
<key>template_path</key>
<string>Nessus Agent ScriptTemplate.xml</string>
</dict>
</array>
<key>prod_name</key>
<string>%NAME%</string>
<key>self_service_description</key>
<string>%SELF_SERVICE_DESCRIPTION%</string>
<key>self_service_icon</key>
<string>%SELF_SERVICE_ICON%</string>
</dict>
<key>Processor</key>
<string>JSSImporter</string>
</dict>
</array>
</dict>
</plist>
Binary file added Nessus Agent/Nessus Agent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef39e9d

Please sign in to comment.