security/policyanalyzer: new plugin, read-only firewall policy analysis with optional local AI
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 8/100
Direzione di ricerca
This is a proposal for a large third-party plugin, not a scoped change to the repository, and the maintainers have not yet answered whether any part should be accepted. Read the linked repository igortoledo007/opnsense-policyanalyzer and the maintainer questions about a small first plugin and translation domains. Done means a maintainer decision on scope and packaging, not a code change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
Hi, before going any further I'd like your feedback on a larger plugin. Our community is crucial in shaping the ongoing development of our open-source OPNsense® software products.
A firewall rule set grows over the years and it becomes hard to tell which rules still matter, which ones are shadowed or too broad, what is actually exposed, and what the blocked traffic means. The data is all in OPNsense (rules and counters, the filter log, Suricata, Unbound, Kea), but there is no place that puts it together and explains it.
Describe the solution you'd like
What it is
Policy Analyzer (branded "Max Cyber IA" in the GUI) is a plugin under Firewall › Policy Analyzer. Source, install guide and tests: https://github.com/igortoledo007/opnsense-policyanalyzer
| Page | What you get |
|---|---|
| Analysis | findings on the rule set: shadowed, redundant, unused or too broad rules, risky exposures, with evidence and a suggested fix |
| Incidents | blocked and suspicious traffic grouped into scored incidents with a timeline |
| Anomalies | beaconing, DNS tunnels and bypass, new domains and devices, outbound volume, internal scans |
| Posture | hardening checks of the firewall itself, with a score per category |
| Devices | passive inventory of local devices (DHCP, ARP/NDP, flows), vendor and risk hints |
| Vulnerabilities | exposed services matched against CVE data (NVD, CISA KEV, EPSS, OSV), opt-in |
| AI Console | questions in plain language, answered from read-only evidence |
| Reports | daily/weekly PDF reports and alerts by e-mail |
Design rules:
- Read only by default. The analysis never changes rules. The only optional action is a quarantine (an External alias + one floating block rule), and every change follows simulate → apply → revert with an action history.
- AI is optional and can stay local. An assistant installs Ollama in a FreeBSD jail without Internet access; a server in the LAN or the Anthropic API can be used instead. Data is anonymized before it goes to a remote provider.
- Uses what OPNsense already has: rules and counters, the filter log, Suricata
eve.json, Unbound reporting, Kea, Insight/NetFlow, Monit's SMTP settings and the GeoIP aliases (the user's own MaxMind key; no GeoIP data is shipped). - Python standard library only, no extra packages. About 950 unit tests run without a firewall on synthetic data.
- Languages: the GUI and the PDF/e-mail reports are available in the 20 OPNsense languages. The GUI uses its own gettext domain (
PolicyAnalyzer) with the core catalogue as fallback, so the core catalogue is never touched and strings the core already translates keep the core translation. PDFs embed the default theme font for Latin, Greek and Cyrillic scripts; Chinese, Japanese, Korean and Persian PDFs fall back to English (OPNsense ships no font for them) while the e-mail keeps the language. The translations were made with AI assistance and reviewed; corrections from native speakers are welcome.
Questions
- The code base is large (Python ~55k lines, plus GUI). I know big initial code bases can't be reviewed. Would a small first plugin make sense, for example only the read-only rule analysis (Analysis page, no AI, no quarantine), with the rest staying in my repository or coming later in parts?
- Or is it better kept as a third-party plugin in its own repository? In that case, is there a recommended way to make it discoverable to users?
- For translations of a plugin outside the official repository: is a separate gettext domain the right approach, or is there a way to contribute the strings to opnsense/lang?
I'm happy to maintain whatever part is accepted. Maintainer: igortoledo007 (please reach me here on GitHub).
Describe alternatives you've considered
- Separate tools outside the firewall (log shippers, SIEM): heavier, and the rule analysis needs the live configuration and counters.
- Proposing parts to core: the analysis is optional and opinionated, so a plugin keeps it out of the way of users who don't want it.
Additional context
AI disclosure
Developed with AI assistance: Claude (Anthropic), a mix of the Fable 5.2 and Opus 5.5 models. I reviewed and tested it on my own OPNsense 26.7.9 firewall.
Screenshots
Taken on my own firewall running OPNsense 26.7.9 (Forja theme from #5921); addresses, host and device names are blurred.
- Analysis
- Incidents
- Anomalies
- Posture
- Devices
- AI Console
- AI setup
- Lingua principale
- PHP
- Stelle
- 1.2k
- Fork
- 932
- Merge medio
- 1g 11h
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opnsense/plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
www/squid: configctl proxy stop returns before Squid exits, so stop+start (e.g. Monit restart) failsApertasupport
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
opnsense/plugins#5983 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directiveForse già presa @fraenki l’ha presa 6 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
opnsense/plugins#5973 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Forse già presa @bringha1 l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opnsense/plugins
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Automattic/blocks-engine#7881 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
iruzen-dono/workless#117 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
magicsunday/webtrees-docker#285 ·
I maintainer di solito rispondono entro 1 giorno
-
Flaky browser test: AreaHeadersTest 'shows Counting on the way while deferred tab counts load'Apertaarea/tests type/bug when/soon
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
WP-CLI 3.0 fixes the cron lock and core download bugs described in the handbookForse già presa @mayankmajeji l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
WordPress/hosting-handbook#521 ·