Setup guide

This guide takes you from zero to your first alert. Count 10 to 15 minutes. Prefer filling in a form? The configurator writes the settings for you. Version française

1. How it works

Twice a day (or at the interval you choose), the bot:

  1. reads Fortinet’s own security advisories (FortiGuard PSIRT feed and its machine-readable CSAF files); if FortiGuard is unreachable it falls back to the NVD database;
  2. keeps only the advisories about your products, your versions and the severity you chose;
  3. adds two signals: known exploited (CISA KEV catalog) and EPSS, the probability of exploitation in the next 30 days;
  4. sends one message per new advisory to your apps, and remembers it so it is never sent twice;
  5. sends a new alert if an advisory you already received is later reported as exploited.

By default it stays silent when there is nothing new.

2. Choose where it runs

Option For whom Cost Reaches apps on your home network (Home Assistant, Signal server)?
A. GitHub Actions (recommended) Everyone with a GitHub account Free No, only internet services
B. Docker You have a NAS, a Raspberry Pi or a server Free Yes
C. Python You want to test or develop Free Yes

A. GitHub Actions

  1. Sign in to GitHub and open the repository. Click Fork, then Create fork.
  2. In your fork, open the Actions tab and click I understand my workflows, go ahead and enable them.
  3. Nothing to reset: the bot remembers what it already sent on a separate monitor-state branch, created on its first run. Your fork starts with an empty memory.
  4. Go to Settings → Secrets and variables → Actions.
    • Secrets tab: the private values (webhook URLs, tokens, phone numbers). See section 4.
    • Variables tab: the settings (products, versions, severity). See section 3.
  5. Back in Actions, choose Fortinet CVE monitor → Run workflow. Open the run to read its log.
  6. Done: the workflow now runs every day at 06:00 and 11:00 UTC (GitHub may start it a few minutes late).

Secrets are never shown again once saved, and GitHub hides them in logs.

B. Docker

git clone https://github.com/DerriereT0i/fortinet-security-monitor.git
cd fortinet-security-monitor
cp .env.example .env          # then edit .env with the values of sections 3 and 4
docker compose up -d          # scans every 6 hours; state kept in a Docker volume
docker compose logs -f        # read the log

Change the interval with INTERVAL_MINUTES in docker-compose.yml.

C. Python

pip install "fortinet-security-monitor[apprise] @ git+https://github.com/DerriereT0i/fortinet-security-monitor"
export DISCORD_WEBHOOK="https://discord.com/api/webhooks/..."   # or another channel, see section 4
fortinet-monitor

On Windows PowerShell use $env:DISCORD_WEBHOOK="..." instead of export.

3. Choose what you watch

Set these as Variables on GitHub, or in your .env file.

Setting Example What it does
WATCHED_PRODUCTS FortiOS,FortiGate,FortiClient Products you care about. Default: the main Fortinet products.
INSTALLED_VERSIONS FortiOS=7.4.3,FortiClient=7.2.4 Your versions. An advisory that does not affect them is skipped.
MIN_SEVERITY HIGH LOW, MEDIUM, HIGH or CRITICAL. Exploited vulnerabilities (KEV) are always sent.
ALERT_LANGUAGE fr Language of the alerts: en (default) or fr.
DIGEST_THRESHOLD 5 Above this many new advisories at once, one summary message instead of one per advisory (0 = never).
SEND_OK_MESSAGE false true adds a “scan OK” message when nothing is new (a heartbeat).

Each alert tells you what to do: with your version set, it gives the exact fixed version for your branch (for example Upgrade FortiOS 7.4.3 → 7.4.13 or later).

Finding your version. On a FortiGate, the version is on the dashboard (System Information → Firmware), or in the CLI with get system status. A FortiGate runs FortiOS: write FortiOS=7.4.3 (FortiGate=7.4.3 is also accepted). Same idea for FortiManager, FortiAnalyzer, FortiProxy, FortiWeb…

If an advisory gives no version data, it is still sent (better a message too many than a missed vulnerability).

4. Connect your notification app

Put each value in a GitHub Secret (or in .env). You can combine several apps: NOTIFY_URLS accepts several addresses separated by a space.

WhatsApp

Simple way: CallMeBot (free, for personal use).

  1. Open the CallMeBot WhatsApp page and add the phone number shown there to your contacts.
  2. Send it the WhatsApp message shown on that page (an “I allow callmebot to send me messages” request).
  3. You receive an API key by WhatsApp.
  4. Create two secrets: CALLMEBOT_PHONE = your number in international format (+33…), and CALLMEBOT_APIKEY = the key.

CallMeBot is a third-party service, not WhatsApp itself: your number and the alert text go through it, and delivery is not guaranteed. For critical alerts, add a second app (ntfy or Telegram).

Official way: WhatsApp Cloud API (Meta). Reliable but heavy: a Meta Business account, a developer app, a dedicated phone number and an approved message template. Once you have them: NOTIFY_URLS=whatsapp://ACCESS_TOKEN@PHONE_NUMBER_ID/+33XXXXXXXXX (see the Apprise WhatsApp page).

Telegram

  1. In Telegram, talk to @BotFather, send /newbot, choose a name: you get a token like 123456789:AA....
  2. Send any message to your new bot, then open https://api.telegram.org/bot<TOKEN>/getUpdates in a browser and note the number after "chat":{"id": — your chat id.
  3. Secret NOTIFY_URLS = tgram://<TOKEN>/<CHAT_ID>

ntfy (push notifications, no account)

  1. Install the ntfy app (Android, iOS) or use ntfy.sh in a browser.
  2. Choose a long, hard-to-guess topic name (anyone who knows it can read it), e.g. forti-alerts-8f3k2q9z, and subscribe to it.
  3. Secret NOTIFY_URLS = ntfys://ntfy.sh/forti-alerts-8f3k2q9z

E-mail

Discord

  1. Server settings → Integrations → Webhooks → New webhook, choose the channel, Copy webhook URL.
  2. Secret DISCORD_WEBHOOK = that URL. Discord gets rich cards with colours and links.

Slack

  1. Add the Incoming Webhooks app to your workspace and pick a channel.
  2. Secret NOTIFY_URLS = the URL it gives (https://hooks.slack.com/services/...).

Microsoft Teams

  1. In the channel, open Workflows and choose the template Post to a channel when a webhook request is received.
  2. Copy the URL it gives, and set it as NOTIFY_URLS.

Home Assistant

Needs option B or C (GitHub cannot reach your home network).

  1. In Home Assistant: Profile → Security → Long-lived access tokens → Create token.
  2. NOTIFY_URLS = hassio://homeassistant.local:8123/<TOKEN> (or hassios:// over HTTPS). Alerts appear as Home Assistant notifications.

Signal

Needs option B or C and a signal-cli-rest-api server linked to a phone number. NOTIFY_URLS = signal://localhost:8080/+33SENDER/+33RECIPIENT

Other apps

Pushover, Gotify, Matrix, Mattermost, Rocket.Chat, SMS through Twilio and about a hundred more work through Apprise: put their Apprise address in NOTIFY_URLS.

5. Test your setup

6. If something goes wrong

What you see Meaning What to do
[CONFIG] ... and exit code 2 A setting is missing or wrong Read the message, fix the variable or secret.
[ERROR] every source failed FortiGuard and NVD both unreachable Usually temporary; the next run will catch up (3-day window).
[ERROR] notification for ... Your app refused the message Check the webhook, token or key; recreate it if in doubt.
No message at all Nothing new, or everything filtered Normal in quiet mode. Test with section 5.
[SKIP] ... product not watched Advisory about another product Add the product to WATCHED_PRODUCTS if you want it.

7. Keep it safe