Skip to content

Email / SMTP

NightVision Mail Integration is a tool used to automate the importation of security vulnerability findings from a NightVision scan results file into user-friendly PDF reports, which can be shared via email (e.g., Gmail or Outlook).

NightVision Mail Integration Repository

  1. Clone the Repository:

    Terminal window
    git clone https://github.com/nvsecurity/email-integration.git
    cd nightvision_mail_reporter
  2. Install Dependencies:

    Terminal window
    chmod +x install.sh && sudo ./install.sh
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install -r requirements.txt

To use the NightVision Mail Reporter, provide the path to your SARIF file along with your Email Settings:

Terminal window
source .venv/bin/activate
python3 main.py --sarif r.sarif --sender your_email@example.com --password "your_email_password" --receiver receiver_email@example.com --outlook
FlagDescription
-s, —sarifPath to the SARIF file containing the security analysis results.
-o, —outPath to the output PDF file.
—senderThe sender’s email address.
—passwordThe sender’s email password.
—receiverThe receiver’s email address.
—serverThe SMTP server address.
—portThe SMTP server port.
—gmailUse Gmail’s SMTP server (sets server to smtp.gmail.com and port to 587).
—outlookUse Outlook’s SMTP server (sets server to smtp-mail.outlook.com and port to 587).

Note: For Gmail, you must create and use a Google App Password. This is because Google does not allow access to your Gmail account using just your Gmail password when accessing third-party apps.

  1. To run the script and send an email using Gmail’s SMTP server:
Terminal window
source .venv/bin/activate
python3 main.py --sarif r.sarif --sender your_email@gmail.com --password "your_email_password" --receiver receiver_email@example.com --gmail
  1. To run the script and send an email using Outlook’s SMTP server:
Terminal window
source .venv/bin/activate
python3 main.py --sarif r.sarif --sender your_email@outlook.com --password "your_email_password" --receiver receiver_email@example.com --outlook
  1. To run the script and send an email using a custom SMTP server:
Terminal window
source .venv/bin/activate
python3 main.py --sarif r.sarif --sender your_email@outlook.com --password "your_email_password" --receiver receiver_email@example.com --server smtp.example.com --port 1337
Terminal window
source .venv/bin/activate
python3 main.py --sarif r.sarif --sender your_email@outlook.com --password "your_email_password" --receiver receiver_email@example.com --server smtp.example.com --port 1337