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
- 2. Choose where it runs
- 3. Choose what you watch
- 4. Connect your notification app
- 5. Test your setup
- 6. If something goes wrong
- 7. Keep it safe
1. How it works
Twice a day (or at the interval you choose), the bot:
- 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;
- keeps only the advisories about your products, your versions and the severity you chose;
- adds two signals: known exploited (CISA KEV catalog) and EPSS, the probability of exploitation in the next 30 days;
- sends one message per new advisory to your apps, and remembers it so it is never sent twice;
- 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
- Sign in to GitHub and open the repository. Click Fork, then Create fork.
- In your fork, open the Actions tab and click I understand my workflows, go ahead and enable them.
- Nothing to reset: the bot remembers what it already sent on a separate
monitor-statebranch, created on its first run. Your fork starts with an empty memory. - Go to Settings → Secrets and variables → Actions.
- Back in Actions, choose Fortinet CVE monitor → Run workflow. Open the run to read its log.
- 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.
Simple way: CallMeBot (free, for personal use).
- Open the CallMeBot WhatsApp page and add the phone number shown there to your contacts.
- Send it the WhatsApp message shown on that page (an “I allow callmebot to send me messages” request).
- You receive an API key by WhatsApp.
- Create two secrets:
CALLMEBOT_PHONE= your number in international format (+33…), andCALLMEBOT_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
- In Telegram, talk to @BotFather, send
/newbot, choose a name: you get a token like123456789:AA.... - Send any message to your new bot, then open
https://api.telegram.org/bot<TOKEN>/getUpdatesin a browser and note the number after"chat":{"id":— your chat id. - Secret
NOTIFY_URLS=tgram://<TOKEN>/<CHAT_ID>
ntfy (push notifications, no account)
- Install the ntfy app (Android, iOS) or use ntfy.sh in a browser.
- Choose a long, hard-to-guess topic name (anyone who knows it can read it), e.g.
forti-alerts-8f3k2q9z, and subscribe to it. - Secret
NOTIFY_URLS=ntfys://ntfy.sh/forti-alerts-8f3k2q9z
- Gmail: turn on 2-step verification, create an app password, then
NOTIFY_URLS=mailtos://your.name:APP_PASSWORD@gmail.com - Other provider:
mailtos://user:password@example.com?smtp=smtp.example.com&from=alerts@example.com&to=you@example.com
Discord
- Server settings → Integrations → Webhooks → New webhook, choose the channel, Copy webhook URL.
- Secret
DISCORD_WEBHOOK= that URL. Discord gets rich cards with colours and links.
Slack
- Add the Incoming Webhooks app to your workspace and pick a channel.
- Secret
NOTIFY_URLS= the URL it gives (https://hooks.slack.com/services/...).
Microsoft Teams
- In the channel, open Workflows and choose the template Post to a channel when a webhook request is received.
- Copy the URL it gives, and set it as
NOTIFY_URLS.
Home Assistant
Needs option B or C (GitHub cannot reach your home network).
- In Home Assistant: Profile → Security → Long-lived access tokens → Create token.
NOTIFY_URLS=hassio://homeassistant.local:8123/<TOKEN>(orhassios://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
- On GitHub: add the variable
SEND_OK_MESSAGE=true, run the workflow by hand (Actions → Run workflow). You should receive “Fortinet scan OK” (or real alerts). Then set it back tofalseor delete it. - Locally, without sending anything:
DRY_RUN=true DAYS_BACK=30 SEEN_FILE=/tmp/seen.json fortinet-monitorprints the alerts it would send.
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
- Webhook URLs, tokens, phone numbers and API keys go in Secrets or in
.env(ignored by git), never in a commit. - If one of them leaks, delete it on the service and create a new one.
- Found a security problem in this project? Use private vulnerability reporting.