Commit graph

15378 commits

Author SHA1 Message Date
Arne Welzel
25ea678626 Stmt: Introduce assert statement and related hooks
including two hooks called assertion_failure() and assertion_result() for
customization and tracking of assertion results.
2023-06-12 18:16:02 +02:00
Arne Welzel
a25b1a9d59 ZeekArgs: Helper for empty arguments 2023-06-12 18:14:05 +02:00
Arne Welzel
743658248e Reporter: Allow AssertStmt to throw InterpreterException 2023-06-12 18:14:05 +02:00
Arne Welzel
e8811a55ef Lift backtrace() code into Func.{h,cc}
This is to be re-used by the assertion facility.
2023-06-12 18:13:56 +02:00
Benjamin Bannier
eb1c7eff6c Clarify subitem relationship in CMake configure summary. 2023-06-09 13:31:53 +02:00
Benjamin Bannier
bef857e68c Bump auxil/spicy. 2023-06-09 12:51:16 +02:00
Arne Welzel
857c15a293 Merge remote-tracking branch 'origin/topic/awelzel/choco-2'
* origin/topic/awelzel/choco-2:
  ci/windows: choco --localonly is gone
2023-06-09 11:04:14 +02:00
Arne Welzel
5f73143e7c Update cmake submodule [nomail] 2023-06-09 09:10:23 +02:00
zeek-bot
2c660886b3 Update doc submodule [nomail] [skip ci] 2023-06-08 00:23:53 +00:00
Arne Welzel
528e27e542 ci/windows: choco --localonly is gone
choco 2.0 is now used after some caching changes on the Cirrus side [1]
and the --localonly flag is gone from choco [2], remove its usage.

[1] https://github.com/cirruslabs/cirrus-ci-docs/issues/1174#issuecomment-1580928673
[2] https://docs.chocolatey.org/en-us/guides/upgrading-to-chocolatey-v2-v6#the-list-command-now-lists-local-packages-only-and-the-local-only-and-lo-options-have-been-removed
2023-06-07 17:30:15 +02:00
Arne Welzel
820c011ffc test-all-policy: Do not load nodes-experimental/manager.zeek
Turns out loading this script in non-cluster mode uses Cluster::log()
and creates cluster.log in the external baselines saying "cluster
started". Do not load it into test-all-policy.zeek and instead rely
on the new test-all-policy-cluster.test to load it transitively
when running as manager for basic checking.
2023-06-06 15:22:27 +02:00
Arne Welzel
eef7acc1e9 cluster/main: Remove extra @if ( Cluster::is_enabled() )
These have been discussed in the context of "@if &analyze" [1] and
am much in favor for not disabling/removing ~100 lines (more than
fits on a single terminal) out from the middle of a file. There's no
performance impact for having these handlers enabled unconditionally.
Also, any future work on "@if &analyze" will look at them again which
we could also skip.

This also reverts back to the behavior where the Cluster::LOG stream
is created even in non cluster setups like in previous Zeek versions.
As long as no one writes to it there's essentially no difference. If
someone does write to Cluster::LOG, I'd argue not black holing these
messages is better. Schema generators using Log::active_streams will
continue to discover Cluster::LOG even if they run in non-cluster
mode.

https://github.com/zeek/zeek/pull/3062#discussion_r1200498905
2023-06-06 15:20:10 +02:00
Arne Welzel
359eec4297 Update cmake submodule [nomail] 2023-06-06 14:23:40 +02:00
Tim Wojtulewicz
0f017ac45b Update link to slack in README.md 2023-06-05 14:18:38 +02:00
Arne Welzel
8717b01e21 Merge remote-tracking branch 'origin/topic/timw/update-pysubnettree-patricia'
* origin/topic/timw/update-pysubnettree-patricia:
  Update zeekctl for pysubnetree/patricia upgrade
2023-06-05 14:17:33 +02:00
Arne Welzel
8f7b4902c9 socks/dpd: Add newer auth methods
The IANA has allocated a few more authentication methods, minimally
extend the signature to catch those.
2023-06-05 13:55:00 +02:00
Arne Welzel
d6ca1ec4f6 socks/dpd: Fix socks5_server side signature
The server replies with \x05 and identifier for the chosen method.
Not quite sure what the previous signature meant capture.

See also: https://datatracker.ietf.org/doc/html/rfc1928#section-3

Closes #3099.
2023-06-05 13:54:47 +02:00
zeek-bot
a18d6c9400 Update doc submodule [nomail] [skip ci] 2023-06-02 00:19:40 +00:00
Tim Wojtulewicz
39b1cede33 Update link to slack in README.md 2023-06-01 14:21:44 +02:00
Tim Wojtulewicz
c3c42756cd Update zeekctl for pysubnetree/patricia upgrade 2023-06-01 10:56:19 +02:00
Tim Wojtulewicz
fba058f7b7 Merge remote-tracking branch 'origin/topic/timw/remove-vendored-cmake-files'
* origin/topic/timw/remove-vendored-cmake-files:
  Update bifcl, binpac, and broker repos for cmake changes
  bison_target argument changes from HEADER to DEFINES_FILE
  Update cmake submodule [nomail]
2023-05-31 13:49:27 -07:00
Tim Wojtulewicz
1cea0f8e6a Update bifcl, binpac, and broker repos for cmake changes 2023-05-31 13:16:03 -07:00
Tim Wojtulewicz
0203e7cd58 bison_target argument changes from HEADER to DEFINES_FILE 2023-05-31 14:28:51 +02:00
Tim Wojtulewicz
f787be48ac Update cmake submodule [nomail] 2023-05-31 14:28:49 +02:00
Tim Wojtulewicz
037bceaf1b Updating CHANGES and VERSION. 2023-05-31 13:42:35 +02:00
Tim Wojtulewicz
6bfc2ea83d Start of 6.1.0 development 2023-05-31 12:10:35 +02:00
Tim Wojtulewicz
2cde6e1703 Switch broker submodule back to master 2023-05-31 12:08:05 +02:00
Tim Wojtulewicz
e39f953b33 Update broker submodule to 2.6.0 release tag [nomail] [skip ci] 2023-05-31 12:05:27 +02:00
Tim Wojtulewicz
9d8511395d Update docs submodule [nomail] [skip ci] 2023-05-31 11:20:48 +02:00
Tim Wojtulewicz
3a0efb296f Updating CHANGES and VERSION. 2023-05-31 09:51:22 +02:00
Tim Wojtulewicz
1cfe0e3ee7 Merge remote-tracking branch 'origin/topic/bbannier/issue-3094'
* origin/topic/bbannier/issue-3094:
  Simplify code generated for Spicy analyzer port ranges.
2023-05-31 09:50:46 +02:00
Tim Wojtulewicz
7ebcbcd174 Update baseline for coverage.test-all-policy-cluster test 2023-05-31 00:40:30 -07:00
Arne Welzel
737ac43942 catch-and-release: Mark cr_check_rule as is_used 2023-05-31 00:37:38 -07:00
Arne Welzel
aceb023301 Add test-all-policy-cluster
After the introduction of @if ... analyze, a lot of warnings were
triggered due to nested @if and @if .. analyze usage.

Add a test for coverage of all policy scripts in cluster mode
for the usual node types so this does not happen again.
2023-05-31 00:37:30 -07:00
Tim Wojtulewicz
5a3abbe364 Revert "Merge remote-tracking branch 'origin/topic/vern/at-if-analyze'"
This reverts commit 4e797ddbbc, reversing
changes made to 3ac28ba5a2.
2023-05-31 09:20:33 +02:00
Robin Sommer
cfbb7eb8ee
Merge remote-tracking branch 'origin/topic/robin/gh-3083-export-fix'
* origin/topic/robin/gh-3083-export-fix:
  Register test analyzer only for required ports.
  Fix disappearing unit fields in Spicy type export.
2023-05-30 14:59:00 +02:00
Benjamin Bannier
dc735371be Simplify code generated for Spicy analyzer port ranges.
We previously would reprent port ranges from EVT files element-wise.
This can potentially generate a lot of code (all on a single line
though) which some versions of GCC seem to have trouble with, and which
also causes JIT overhead.

With this patch we switch to directly representing ranges. Single ports
are represented as ranges `[start, start]`.

Closes #3094.
2023-05-29 12:20:44 +02:00
Benjamin Bannier
0b100c1e1c Register test analyzer only for required ports.
This is a workaround for #3094.
2023-05-28 17:36:06 +02:00
zeek-bot
49e2f482b4 Update doc submodule [nomail] [skip ci] 2023-05-27 00:41:39 +00:00
Tim Wojtulewicz
4e797ddbbc Merge remote-tracking branch 'origin/topic/vern/at-if-analyze'
* origin/topic/vern/at-if-analyze:
  updates reflecting review comments
  change base scripts to use run-time if's or @if ... &analyze
  a number of BTests updated with @if ... &analyze
  update for scripting coverage BTest demonstrating utility of @if ... &analyze
  BTests for new @if ... &analyze functionality
  "if ( ... ) &analyze" language feature
  classes for tracking "@if (...) &analyze" notion of code being/not being "activated"
  RemoveGlobal() method for Scope class + simplifying interfaces
2023-05-26 14:56:01 -07:00
Tim Wojtulewicz
3ac28ba5a2 Merge remote-tracking branch 'origin/topic/timw/update-broker'
* origin/topic/timw/update-broker:
  Update broker submodule [nomail]
2023-05-26 12:31:12 -07:00
Arne Welzel
dbad8ab231 Merge remote-tracking branch 'origin/topic/awelzel/bump-zeekjs-0-9-1'
* origin/topic/awelzel/bump-zeekjs-0-9-1:
  Update ZeekJS submodule to 0.9.1
2023-05-26 20:52:15 +02:00
Tim Wojtulewicz
8ae477c32d Update broker submodule [nomail] 2023-05-26 11:15:14 -07:00
Arne Welzel
6ac7a9e62a Update ZeekJS submodule to 0.9.1 2023-05-26 19:07:11 +02:00
Robin Sommer
fd86d8530b
Fix disappearing unit fields in Spicy type export.
When a Spicy unit type was used in an EVT event definition, it could
end up being cleared out at the time the logic for `export` got to see it.

Closes #3083.

Note: This needs backporting to the legacy plugin.
2023-05-26 11:37:23 +02:00
Arne Welzel
c202686cd1 Merge remote-tracking branch 'origin/topic/awelzel/src-cmakelists-zeek-config-skip-version-h'
* origin/topic/awelzel/src-cmakelists-zeek-config-skip-version-h:
  CMakeLists: Skip zeek-version.h include for zeek_objs, too
2023-05-26 10:03:48 +02:00
Arne Welzel
c61f0d776f Bump cluster testsuite to latest main 2023-05-26 10:02:46 +02:00
Tim Wojtulewicz
9f8f7f5471 Merge remote-tracking branch 'origin/topic/timw/minor-windows-warning'
* origin/topic/timw/minor-windows-warning:
  Fix minor type-clash warning on Windows
2023-05-25 19:49:41 -07:00
Vern Paxson
e441ba394a updates reflecting review comments 2023-05-25 18:00:13 -07:00
Tim Wojtulewicz
75188ea6d7 Fix minor type-clash warning on Windows 2023-05-25 16:50:22 -07:00