Email / SMTP
Description
Section titled “Description”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
Installation
Section titled “Installation”-
Clone the Repository:
Terminal window git clone https://github.com/nvsecurity/email-integration.gitcd nightvision_mail_reporter -
Install Dependencies:
Terminal window chmod +x install.sh && sudo ./install.shpython3 -m venv .venvsource .venv/bin/activatepip3 install -r requirements.txt
To use the NightVision Mail Reporter, provide the path to your SARIF file along with your Email Settings:
source .venv/bin/activatepython3 main.py --sarif r.sarif --sender your_email@example.com --password "your_email_password" --receiver receiver_email@example.com --outlookFlags:
Section titled “Flags:”| Flag | Description |
|---|---|
| -s, —sarif | Path to the SARIF file containing the security analysis results. |
| -o, —out | Path to the output PDF file. |
| —sender | The sender’s email address. |
| —password | The sender’s email password. |
| —receiver | The receiver’s email address. |
| —server | The SMTP server address. |
| —port | The SMTP server port. |
| —gmail | Use Gmail’s SMTP server (sets server to smtp.gmail.com and port to 587). |
| —outlook | Use 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.
Examples
Section titled “Examples”- To run the script and send an email using Gmail’s SMTP server:
source .venv/bin/activatepython3 main.py --sarif r.sarif --sender your_email@gmail.com --password "your_email_password" --receiver receiver_email@example.com --gmail- To run the script and send an email using Outlook’s SMTP server:
source .venv/bin/activatepython3 main.py --sarif r.sarif --sender your_email@outlook.com --password "your_email_password" --receiver receiver_email@example.com --outlook- To run the script and send an email using a custom SMTP server:
source .venv/bin/activatepython3 main.py --sarif r.sarif --sender your_email@outlook.com --password "your_email_password" --receiver receiver_email@example.com --server smtp.example.com --port 1337source .venv/bin/activatepython3 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