Commit graph

16055 commits

Author SHA1 Message Date
Robin Sommer
b114850283 Move API for disabling packet analyzers into component.
Before, that API was part of the analyzers themselves, which meant we
couldn't disable a packet analyzer before it had been instantiated.
That's different from protocol/file analyzers, where we disable them
through the corresponding component. The lack of the component-side
API prevented Spicy from replacing packet analyzers at startup.

The reason we had put this into analyzer originally was performance so
that we don't need a component lookup for every packet. This change
keeps that optimization by caching the on/off state in the analyzer
itself as well, but now with the component being the one controlling
it.
2022-10-10 08:26:26 +02:00
Robin Sommer
a84d06a2c3 Suppress warning on an existing packet analyzer being remapped.
There was a check generating an internal warning if a new packet
analyzer mapping overwrote an existing one. However, replacing
an existing analyzer with a new one seems a legitimate use case (and
will be supported by Spicy soon). So removing that warning.
2022-10-10 08:25:51 +02:00
Tim Wojtulewicz
a5b2e44e57 Disable annoying bugprone-easily-swappable-parameters clang-tidy check [skip ci] 2022-10-07 16:15:47 -07:00
Tim Wojtulewicz
a7ea14ece5 Update zeekctl submodule [nomail] [skip ci] 2022-10-07 09:22:56 -07:00
zeek-bot
7b0005bf9c Update doc submodule [nomail] [skip ci] 2022-10-07 00:47:23 +00:00
Tim Wojtulewicz
541f450581 Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy-plugin'
* origin/topic/bbannier/bump-spicy-plugin:
  Remove stray `/` at the end of directory name.
  Remove commented out code.
  Bump spicy-plugin to v1.3.19.
2022-10-06 14:18:29 -07:00
Tim Wojtulewicz
2fce5b3a34 Merge remote-tracking branch 'origin/topic/johanna/update-certificate-transparency-log-list-again-this-time-for-the-first-time-using-the-v3-json-provided-by-google--also-we-have-to-adjust-the-test-because-google-removed-some-old-logs'
* origin/topic/johanna/update-certificate-transparency-log-list-again-this-time-for-the-first-time-using-the-v3-json-provided-by-google--also-we-have-to-adjust-the-test-because-google-removed-some-old-logs:
  Update CT log list.
2022-10-06 14:16:41 -07:00
Johanna Amann
3d9a1157f9 Update CT log list.
This uses the v3 json as a source for the first time. The test needed
some updating because Google removed a couple more logs - in the future
this should hopefully not be neccessary anymore because I think v3
should retain all logs.

In theory this might be neat in 5.1.
2022-10-06 15:10:59 +01:00
Johanna Amann
97291efec8 Merge branch 'topic/jgras/dependabot-updates' of https://github.com/J-Gras/zeek
* 'topic/jgras/dependabot-updates' of https://github.com/J-Gras/zeek:
  Bump actions/checkout from 2 to 3
  Bump actions/upload-artifact from 2 to 3
  Bump dawidd6/action-send-mail from 3.6.1 to 3.7.0
  Bump actions/setup-python from 2 to 4
  Bump docker/login-action from 1 to 2
2022-10-06 13:56:29 +01:00
Johanna Amann
41680bc209 Update submodule pointer
[nomail]
2022-10-06 12:06:34 +01:00
Jan Grashoefer
2a749a246e Merge remote-tracking branch 'github/dependabot/github_actions/dawidd6/action-send-mail-3.7.0' into topic/jgras/dependabot-updates 2022-10-06 13:00:30 +02:00
Jan Grashoefer
8eccde799f Merge remote-tracking branch 'github/dependabot/github_actions/actions/checkout-3' into topic/jgras/dependabot-updates 2022-10-06 12:59:43 +02:00
Jan Grashoefer
a889f71029 Merge remote-tracking branch 'github/dependabot/github_actions/actions/setup-python-4' into topic/jgras/dependabot-updates 2022-10-06 12:57:28 +02:00
Jan Grashoefer
84deef91d5 Merge remote-tracking branch 'github/dependabot/github_actions/actions/upload-artifact-3' into topic/jgras/dependabot-updates 2022-10-06 12:57:09 +02:00
Jan Grashoefer
93cb7b648e Merge remote-tracking branch 'github/dependabot/github_actions/docker/login-action-2' into topic/jgras/dependabot-updates 2022-10-06 12:56:18 +02:00
zeek-bot
f920f06c59 Update doc submodule [nomail] [skip ci] 2022-10-06 00:44:28 +00:00
Robin Sommer
6fcbb55ccd Merge remote-tracking branch 'origin/topic/awelzel/analyzer-module-enable-disable-file-analyzer'
* origin/topic/awelzel/analyzer-module-enable-disable-file-analyzer:
  analyzer: Add file_analyzer support to enable_analyzer()/disable_analyzer()
2022-10-05 13:27:23 +02:00
dependabot[bot]
f1778da5f4
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 09:40:28 +00:00
dependabot[bot]
98a1c5df5b
Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 09:40:25 +00:00
Benjamin Bannier
ace80793a8 Remove stray / at the end of directory name.
This variable is used to construct a path where the trailing `/` lead to
full paths like `/foo/spicy-plugin//spicyz`.
2022-10-04 11:03:24 +02:00
Benjamin Bannier
30ee2d703f Remove commented out code. 2022-10-04 11:02:10 +02:00
Benjamin Bannier
2144cef77c Bump spicy-plugin to v1.3.19. 2022-10-04 10:47:50 +02:00
zeek-bot
b0b928b305 Update doc submodule [nomail] [skip ci] 2022-10-04 00:45:59 +00:00
Tim Wojtulewicz
b68d33a317 Merge remote-tracking branch 'origin/topic/timw/update-broker'
* origin/topic/timw/update-broker:
  Update broker submodule [nomail]
2022-10-03 12:14:22 -07:00
Tim Wojtulewicz
bf98c1e9c8 Merge remote-tracking branch 'origin/topic/vern/CPP-global-init'
* origin/topic/vern/CPP-global-init:
  updates to -O C++ user and maintenance documentation
  use dynamic rather than static initialization of globals for scripts compiled to C++
  safety checking for initializing scripts compiled to C++
  fixes for initializing scripts compiled to C++
  restructured tracking of initializations of globals for script compilation
2022-10-03 09:45:19 -07:00
Tim Wojtulewicz
37d4a28816 Merge remote-tracking branch 'origin/topic/awelzel/http-no-current-entity'
* origin/topic/awelzel/http-no-current-entity:
  http: Prevent script errors when http$current_entity is not set
2022-10-03 09:44:46 -07:00
Tim Wojtulewicz
32d922a576 Update broker submodule [nomail] 2022-10-03 09:34:22 -07:00
Tim Wojtulewicz
93278de984 Merge remote-tracking branch 'origin/topic/timw/coverity-fixes'
* origin/topic/timw/coverity-fixes:
  Fix some Coverity issues in the recent ZAM updates
2022-10-03 09:08:52 -07:00
dependabot[bot]
18f6ecec51
Bump dawidd6/action-send-mail from 3.6.1 to 3.7.0
Bumps [dawidd6/action-send-mail](https://github.com/dawidd6/action-send-mail) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/dawidd6/action-send-mail/releases)
- [Commits](https://github.com/dawidd6/action-send-mail/compare/v3.6.1...v3.7.0)

---
updated-dependencies:
- dependency-name: dawidd6/action-send-mail
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 04:27:48 +00:00
zeek-bot
19632925e6 Update doc submodule [nomail] [skip ci] 2022-10-01 00:45:54 +00:00
Christian Kreibich
d59bb8cc2c Merge remote-tracking branch 'origin/topic/vern/CPP-standalone-maint'
* origin/topic/vern/CPP-standalone-maint:
  fixes for compiling "standalone" C++ scripts
2022-09-30 16:40:31 -07:00
Christian Kreibich
5a01b38757 Merge remote-tracking branch 'origin/topic/vern/deprecated-when-fix'
* origin/topic/vern/deprecated-when-fix:
  fix for deprecated when's where the inner frame is larger than the outer frame
2022-09-30 12:43:47 -07:00
Arne Welzel
81fe46f123 analyzer: Add file_analyzer support to enable_analyzer()/disable_analyzer()
This allows to enable/disable file analyzers through the same interfaces
as packet and protocol analyzers, specifically Analyzer::disable_analyzer
could be interesting.
2022-09-30 11:47:56 +02:00
Robin Sommer
4c788f1717 Merge remote-tracking branch 'origin/topic/awelzel/2399-packet-analyzer-disabling'
* origin/topic/awelzel/2399-packet-analyzer-disabling:
  const: Deprecate tunnel-specific enable_* flags
  packet_analysis: Introduce PacketAnalyzer::__disable_analyzer()
2022-09-30 10:03:19 +02:00
Arne Welzel
3e0374f564 const: Deprecate tunnel-specific enable_* flags
With packet analyzers being toggle-able at runtime these can go.
They hadn't been consistently implemented either (VXLAN, Geneve).
2022-09-30 09:31:02 +02:00
Arne Welzel
af5a0215c0 packet_analysis: Introduce PacketAnalyzer::__disable_analyzer()
This adds machinery to the packet_analysis manager for disabling
and enabling packet analyzers and implements two low-level bifs
to use it.

Extend Analyzer::enable_analyzer() and Analyzer::disable_analyzer()
to transparently work with packet analyzers, too. This also allows
to add packet analyzers to Analyzer::disabled_analyzers.
2022-09-30 09:27:22 +02:00
Vern Paxson
403efd4052 updates to -O C++ user and maintenance documentation 2022-09-29 15:12:04 -07:00
Vern Paxson
0687959f1c use dynamic rather than static initialization of globals for scripts compiled to C++ 2022-09-29 15:11:05 -07:00
Vern Paxson
6ad28b37e6 safety checking for initializing scripts compiled to C++ 2022-09-29 15:10:28 -07:00
Vern Paxson
5c21240daf fixes for initializing scripts compiled to C++ 2022-09-29 15:09:37 -07:00
Vern Paxson
1af905a14f restructured tracking of initializations of globals for script compilation 2022-09-29 15:08:53 -07:00
zeek-bot
0d5c669c1c Update doc submodule [nomail] [skip ci] 2022-09-29 00:58:36 +00:00
Robin Sommer
396e407be1 Bump doc submodule. 2022-09-28 10:35:15 +02:00
Robin Sommer
876c367c2d Bump bifcl submodule. 2022-09-28 10:09:58 +02:00
Robin Sommer
5a5e16c031 Merge remote-tracking branch 'origin/topic/awelzel/analyzer-violation-info'
(+small tweaks to NEWS).

* origin/topic/awelzel/analyzer-violation-info:
  packet_analysis: Protect from nullptr sessions
  packet_analysis: Raise violations once (and don't raise confirmations after violations)
  Introduce basic test triggering when zeek -r triggers script errors
  file_analysis: Implement AnalyzerViolation() for file_analysis/Analyzer
  Introduce generic analyzer_confirmation_info and analyzer_violation_info
2022-09-28 10:08:13 +02:00
Arne Welzel
fbf379b757 packet_analysis: Protect from nullptr sessions
Passing nullptr sessions to AnalyzerConfirmation and AnalyzerViolation
of protocol analyzers previously blew up - protect from that.

Related to zeek/spicy-plugin#133.
2022-09-27 17:49:58 +02:00
Arne Welzel
fdedc6b200 packet_analysis: Raise violations once (and don't raise confirmations after violations)
This is mostly to avoid per-packet violations for packet analyzers that
have sessions attached to them.
2022-09-27 17:49:58 +02:00
Arne Welzel
700a9a4f37 Introduce basic test triggering when zeek -r triggers script errors
I wonder if there's another one that covers errors during a basic zeek -r,
but didn't seem like.
2022-09-27 17:49:58 +02:00
Arne Welzel
d5cd023dff file_analysis: Implement AnalyzerViolation() for file_analysis/Analyzer
Add a test parsing a malformed PE file showing that analyzer_violation_info
is raised with the fa_file object set.

It could be interesting to pass through an optional connection if one
exists, but access is provided through f$conns, too.
2022-09-27 17:49:58 +02:00
Arne Welzel
bc8fd5a4c6 Introduce generic analyzer_confirmation_info and analyzer_violation_info
Introduce two new events for analyzer confirmation and analyzer violation
reporting. The current analyzer_confirmation and analyzer_violation
events assume connection objects and analyzer ids are available which
is not always the case. We're already passing aid=0 for packet analyzers
and there's not currently a way to report violations from file analyzers
using analyzer_violation, for example.

These new events use an extensible Info record approach so that additional
(optional) information can be added later without changing the signature.
It would allow for per analyzer extensions to the info records to pass
analyzer specific info to script land. It's not clear that this would be
a good idea, however.

The previous analyzer_confirmation and analyzer_violation events
continue to exist, but are deprecated and will be removed with Zeek 6.1.
2022-09-27 17:49:51 +02:00