Add NEWS entry and zeekygen-smithing for disabling_analyzer()

This commit is contained in:
Arne Welzel 2022-08-11 13:32:19 +02:00
parent abb7f9a509
commit 6e54d6c095
2 changed files with 13 additions and 2 deletions

10
NEWS
View file

@ -45,6 +45,16 @@ New Functionality
For further details on the framework and examples, please refer to the
Zeek documentation.
- Introduce a global ``disabling_analyzer()`` hook to allow vetoing calls
to ``disable_analyzer()``.
The contract is simple: Any script can veto a ``disable_analyzer()`` call by
breaking from this hook. The decision is local to the script taking into
account any state attached to the connection or state stored elsewhere.
A script breaking from the hook takes over responsibility to call
``disable_analyzer()`` at a later point when it finds the condition due
to which it vetoed fulfilled (which may be never).
Changed Functionality
---------------------

View file

@ -585,8 +585,9 @@ type fa_metadata: record {
};
## A hook taking a connection, analyzer tag and analyzer id that can be
## used to veto disabling analyzers. This hook is invoked synchronously
## during a :zeek:see:`disable_analyzer` call.
## used to veto disabling analyzers. Specifically, an analyzer can be prevented
## from being disabled by using a :zeek:see:`break` statement within the hook.
## This hook is invoked synchronously during a :zeek:see:`disable_analyzer` call.
##
## Scripts implementing this hook should have other logic that will eventually
## disable the analyzer for the given connection. That is, if a script vetoes