Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Vanta vanta-agent
Vanta Device Monitor
Copyright 2019 Vanta, Inc.

This product includes software developed at Vanta (https://vanta.com/).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# vanta-agent-scripts
Public scripts used to install the Vanta agent
# Vanta Device Monitor Scripts
Public scripts used to install the Vanta Device Monitor
36 changes: 18 additions & 18 deletions install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Available environment variables:
# VANTA_KEY (the Vanta per-domain secret key)
# VANTA_OWNER_EMAIL (the email of the person who owns this computer)
# VANTA_REGION (the region the Agent talks to, such as "us", "eu" or "aus".)
# VANTA_REGION (the region Vanta Device Monitor talks to, such as "us", "eu" or "aus".)
# VANTA_NOSTART (if true, then don't start the service upon installation.)

set -e

DEB_URL="https://agent-downloads.vanta.com/targets/versions/2.13.0/vanta-amd64.deb"
DEB_URL="https://agent-downloads.vanta.com/targets/versions/2.14.0/vanta-amd64.deb"
# Checksums need to be updated when DEB_URL is updated.
DEB_CHECKSUM="aced177e5d4c0d47490722ddde41aa00fe6ee8e8316da3b9309a29ae05b57ad7"
DEB_CHECKSUM="21845a5e9477cfb61f779a9c1d9af2c9ad94cd7f6b95d8dd076effb935ee7d49"
DEB_PATH="$(mktemp -d)/vanta.deb"
DEB_INSTALL_CMD="dpkg -Ei"

Expand Down Expand Up @@ -51,15 +51,15 @@ if [ "${OS}" == "Debian" ]; then
CHECKSUM=$DEB_CHECKSUM
else
printf "\033[31m
Cannot install the Vanta agent on unsupported platform $(get_platform).
Cannot install Vanta Device Monitor on unsupported platform $(get_platform).
Please reach out to support@vanta.com for help.
\n\033[0m\n"
exit 1
fi

if [ ! -f "$UUID_PATH" ]; then
printf "\033[31m
Unable to detect hardware UUID – the Vanta Agent is only supported on platforms which provide a value in $UUID_PATH
Unable to detect hardware UUID – Vanta Device Monitor is only supported on platforms which provide a value in $UUID_PATH
\n\033[0m\n"
exit 1
fi
Expand All @@ -85,7 +85,7 @@ bad_uuids=(
for uuid in ${bad_uuids[*]}; do
if [ "$uuid" = "$hardware_uuid" ]; then
printf "\033[31m
Invalid hardware UUID – the Vanta Agent is only supported on platforms which provide a unique value in $UUID_PATH
Invalid hardware UUID – Vanta Device Monitor is only supported on platforms which provide a unique value in $UUID_PATH
\n\033[0m\n"
exit 1
fi
Expand All @@ -96,36 +96,36 @@ printf "\033[34m\nUUID check passed.\n\033[0m"

if [ -z "$VANTA_KEY" ]; then
printf "\033[31m
You must specify the VANTA_KEY environment variable in order to install the agent.
You must specify the VANTA_KEY environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi
if [ -z "$VANTA_OWNER_EMAIL" ]; then
printf "\033[31m
You must specify the VANTA_OWNER_EMAIL environment variable in order to install the agent.
You must specify the VANTA_OWNER_EMAIL environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi
if [ -z "$VANTA_REGION" ]; then
printf "\033[31m
You must specify the VANTA_REGION environment variable in order to install the agent.
You must specify the VANTA_REGION environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi

function onerror() {
printf "\033[31m$ERROR_MESSAGE
Something went wrong while installing the Vanta agent.
Something went wrong while installing Vanta Device Monitor.
If you're having trouble installing, please send an email to support@vanta.com, and we'll help you fix it!
\n\033[0m\n"
}
trap onerror ERR

##
# Download the agent
# Download Vanta Device Monitor
##
printf "\033[34m\n* Downloading the Vanta Agent\n\033[0m"
printf "\033[34m\n* Downloading Vanta Device Monitor\n\033[0m"
rm -f $PKG_PATH
curl --progress-bar --output $PKG_PATH $PKG_URL

Expand Down Expand Up @@ -153,14 +153,14 @@ else
fi

##
# Install the agent
# Install Vanta Device Monitor
##
printf "\033[34m\n* Installing the Vanta Agent. You might be asked for your password...\n\033[0m"
printf "\033[34m\n* Installing Vanta Device Monitor. You might be asked for your password...\n\033[0m"
$SUDO $INSTALL_CMD $PKG_PATH


##
# Check whether the agent is registered. It may take a couple of seconds,
# Check whether Vanta Device Monitor is registered. It may take a couple of seconds,
# so try 5 times with 5-second pauses in between.
##
if [ -z "$VANTA_SKIP_REGISTRATION_CHECK" ] && [ -z "$VANTA_NOSTART" ]; then
Expand All @@ -179,7 +179,7 @@ if [ -z "$VANTA_SKIP_REGISTRATION_CHECK" ] && [ -z "$VANTA_NOSTART" ]; then

if [ "$registration_success" = false ] ; then
printf "\033[31m
Could not verify that the agent is registered to a Vanta domain. Are you sure you used the right key?
Could not verify that Vanta Device Monitor is registered to a Vanta domain. Are you sure you used the right key?
\n\033[0m\n" >&2
exit 0
fi
Expand All @@ -189,8 +189,8 @@ else
fi

printf "\033[32m
The Vanta agent has been installed successfully.
Vanta Device Monitor has been installed successfully.
It will run in the background and submit data to Vanta.
You can check the agent status using the \"/var/vanta/vanta-cli status\" command.
You can check the status of Vanta Device Monitor using the \"/var/vanta/vanta-cli status\" command.
\033[0m"
34 changes: 17 additions & 17 deletions install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set -e
# Environment variables:
# VANTA_KEY (the Vanta per-domain secret key)
# VANTA_OWNER_EMAIL (the email of the person who owns this computer)
# VANTA_REGION (the region the Agent talks to, such as "us", "eu" or "aus".)
# VANTA_REGION (the region Vanta Device Monitor talks to, such as "us", "eu" or "aus".)

PKG_URL="https://agent-downloads.vanta.com/targets/versions/2.13.0/vanta-universal.pkg"
PKG_URL="https://agent-downloads.vanta.com/targets/versions/2.14.0/vanta-universal.pkg"
# Checksum needs to be updated when PKG_URL is updated.
CHECKSUM="54bf5ab58f7362f8058d0c903e00cc6347083e16aace7462518f196a3e145560"
CHECKSUM="060b408570c05f9e02eac187e3c917665c843e7a432c8d9b418ca968c5775b81"
DEVELOPER_ID="Vanta Inc (632L25QNV4)"
CERT_SHA_FINGERPRINT="D90D17FA20360BC635BC1A59B9FA5C6F9C9C2D4915711E4E0C182AA11E772BEF"
CERT_SHA_FINGERPRINT="48893790A4B4FB1684589E3AC91CC25EDD5284F9E7BA07025CBDF2814FE74984"
PKG_PATH="$(mktemp -d)/vanta.pkg"
VANTA_CONF_PATH="/etc/vanta.conf"

Expand All @@ -25,39 +25,39 @@ fi

if [ -z "$VANTA_KEY" ]; then
printf "\033[31m
You must specify the VANTA_KEY environment variable in order to install the agent.
You must specify the VANTA_KEY environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi

if [ -z "$VANTA_OWNER_EMAIL" ]; then
printf "\033[31m
You must specify the VANTA_OWNER_EMAIL environment variable in order to install the agent.
You must specify the VANTA_OWNER_EMAIL environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi

if [ -z "$VANTA_REGION" ]; then
printf "\033[31m
You must specify the VANTA_REGION environment variable in order to install the agent.
You must specify the VANTA_REGION environment variable in order to install Vanta Device Monitor.
\n\033[0m\n"
exit 1
fi


function onerror() {
printf "\033[31m$ERROR_MESSAGE
Something went wrong while installing the Vanta agent.
Something went wrong while installing Vanta Vanta Device Monitor.
If you're having trouble installing, please send an email to support@vanta.com, and we'll help you fix it!
\n\033[0m\n"
}
trap onerror ERR

##
# Download the agent
# Download Vanta Device Monitor
##
printf "\033[34m\n* Downloading the Vanta Agent\n\033[0m"
printf "\033[34m\n* Downloading Vanta Device Monitor\n\033[0m"
rm -f $PKG_PATH
curl --progress-bar $PKG_URL >$PKG_PATH

Expand Down Expand Up @@ -100,9 +100,9 @@ else
fi

##
# Install the agent
# Install Vanta Device Monitor
##
printf "\033[34m\n* Installing the Vanta Agent. You might be asked for your password...\n\033[0m"
printf "\033[34m\n* Installing Vanta Device Monitor. You might be asked for your password...\n\033[0m"
ACTIVATION_REQUESTED_NONCE=$(date +%s000)
CONFIG="{\"ACTIVATION_REQUESTED_NONCE\":$ACTIVATION_REQUESTED_NONCE,\"AGENT_KEY\":\"$VANTA_KEY\",\"OWNER_EMAIL\":\"$VANTA_OWNER_EMAIL\",\"NEEDS_OWNER\":true,\"REGION\":\"$VANTA_REGION\"}"
echo "$CONFIG" | $SUDO tee "$VANTA_CONF_PATH" > /dev/null
Expand All @@ -112,21 +112,21 @@ $SUDO /usr/sbin/installer -pkg $PKG_PATH -target / >/dev/null
rm -f $PKG_PATH

##
# check if the agent is running
# check if Vanta Device Monitor is running
# return val 0 means running,
# return val 2 means running but needs to register
##
$SUDO /usr/local/vanta/vanta-cli status || [ $? == 2 ]

printf "\033[32m
Your Agent is running properly. It will continue to run in the
Your Vanta Device Monitor is running properly. It will continue to run in the
background and submit data to Vanta.
You can check the agent status using the \"vanta-cli status\" command.
You can check the status of Vanta Device Monitor using the \"vanta-cli status\" command.
If you ever want to stop the agent, please use the toolbar icon or
If you ever want to stop Vanta Device Monitor, please use the toolbar icon or
the vanta-cli command. It will restart automatically at login.
To register this device to a new user, run \"vanta-cli register\" or click on \"Register Vanta Agent\"
To register this device to a new user, run \"vanta-cli register\" or click on \"Register Vanta Device Monitor\"
on the toolbar.
\033[0m"