Commit graph

19090 commits

Author SHA1 Message Date
Tim Wojtulewicz
18b3303b54 Add a missing header for the broker cluster serializer 2025-08-18 14:00:24 -07:00
Evan Typanski
59e84e06f6 Merge remote-tracking branch 'origin/topic/etyp/fix-optional-attr-errors'
* origin/topic/etyp/fix-optional-attr-errors:
  Fix parameter attributes pretending to be records
  Only allow `&optional` in records
2025-08-18 14:49:56 -04:00
Tim Wojtulewicz
644d480afd Update docs submodule [nomail] [skip ci] 2025-08-18 10:03:50 -07:00
Tim Wojtulewicz
a4da8d3f7b Merge remote-tracking branch 'origin/topic/etyp/update-news-record-vec-deprecation'
* origin/topic/etyp/update-news-record-vec-deprecation:
  Add `record_type_to_vector` deprecation to NEWS
2025-08-18 09:40:50 -07:00
Evan Typanski
acd885b9f3 Add record_type_to_vector deprecation to NEWS 2025-08-18 11:58:51 -04:00
Arne Welzel
9b94e25e67 Merge remote-tracking branch 'origin/topic/awelzel/4754-follow-up'
* origin/topic/awelzel/4754-follow-up:
  cluster/serializer/broker: Drop unused include
  cluster/serializer/broker: fixup inconsistent param comment
2025-08-18 16:44:43 +02:00
Arne Welzel
8d0a942101 cluster/serializer/broker: Drop unused include 2025-08-18 14:52:21 +02:00
Arne Welzel
f4e7c4afe8 cluster/serializer/broker: fixup inconsistent param comment
Thanks clang-tidy.

References #4754 #4756
2025-08-18 14:51:40 +02:00
Arne Welzel
2c9015d247 Merge branch 'master' of https://github.com/blightzero/zeek
* 'master' of https://github.com/blightzero/zeek:
  Changed behavior of var-extraction-uri.zeek from policy/protocol/http to extract only the URI parameter names. Do not include the path in the first parameter name. Only extract uri vars if parameters actually exist.
2025-08-18 13:14:34 +02:00
Arne Welzel
e04f725523 Merge remote-tracking branch 'amazing-pp/t/psql-login-no-role'
* amazing-pp/t/psql-login-no-role:
  Report PostgreSQL login success only after ReadyForQuery
2025-08-18 09:40:22 +02:00
Fupeng Zhao
e4e56789db
Report PostgreSQL login success only after ReadyForQuery
Previously, Zeek treated the receipt of `AuthenticationOk` as a
successful login. However, according to the PostgreSQL
Frontend/Backend Protocol, the startup phase is not complete until
the server sends `ReadyForQuery`. It is still possible for the server
to emit an `ErrorResponse` (e.g. ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION)
after `AuthenticationOk` but before `ReadyForQuery`.

This change updates the PostgreSQL analyzer to defer reporting login
success until `ReadyForQuery` is observed. This prevents false
positives in cases where authentication succeeds but session startup
fails.
2025-08-18 10:59:44 +08:00
Arne Welzel
c0a863cba0 Merge remote-tracking branch 'origin/topic/vern/stmt-line-numbers'
* origin/topic/vern/stmt-line-numbers:
  maintenance updates for ZAM BiF-tracking
  fix line numbers associated with "if" and initialization statements
2025-08-17 17:29:09 +02:00
Arne Welzel
3d6a064ecc Merge remote-tracking branch 'origin/topic/awelzel/4754-double-wrapped-broker-data-records'
* origin/topic/awelzel/4754-double-wrapped-broker-data-records:
  cluster/serializer/broker: Do not special case Broker::Data anymore
  broker/Data: Support unwrapping Broker::Data records
2025-08-17 16:57:28 +02:00
Arne Welzel
f57a1263d4 cluster/serializer/broker: Do not special case Broker::Data anymore
The previous approach ignored the fact that nested / inner values might
also be Broker::Data values. I'm not super sure about the validity of
the test, because it's essentially demonstrating any-nesting, but
it's not leading to extra Broker::Data encoding.
2025-08-17 16:56:20 +02:00
Arne Welzel
9e70d8b8ad broker/Data: Support unwrapping Broker::Data records
Calling val_to_data() on a Broker::Data ends up wrapping the
Broker::Data record instead of using the contained broker::value
directly.

Seems this should be the default behavior and wonder if the flag
even makes sense, but for a 8.0 backport that seems more reasonable.
2025-08-17 16:56:20 +02:00
Vern Paxson
5b74b3d0ac maintenance updates for ZAM BiF-tracking 2025-08-16 14:10:17 -07:00
Vern Paxson
46d0b55417 fix line numbers associated with "if" and initialization statements 2025-08-16 14:09:32 -07:00
Tim Wojtulewicz
a3983cc939 Merge remote-tracking branch 'origin/revert-4746-topic/timw/move-submodules-to-main-repo'
* origin/revert-4746-topic/timw/move-submodules-to-main-repo:
  Revert "Move BinPAC, bifcl, af_packet, and gen_zam submodules into main zeek repo"
2025-08-15 15:21:12 -07:00
Tim Wojtulewicz
e64ec54172
Revert "Move BinPAC, bifcl, af_packet, and gen_zam submodules into main zeek repo" 2025-08-15 15:11:22 -07:00
Tim Wojtulewicz
a10a70994e Merge remote-tracking branch 'origin/topic/timw/move-submodules-to-main-repo'
* origin/topic/timw/move-submodules-to-main-repo:
  Fix some clang-tidy findings in generated BIF code
  Fix clang-tidy and pre-commit warnings for gen-zam code files
  Move gen-zam code into the main Zeek repository
  Move zeek-af_packet-plugin code into the main Zeek repository
  Move the bifcl code into the main Zeek repository
  Fix clang-tidy findings in the binpac lib code
  Add copyright headers to all of the binpac source files
  Move binpac code into the main Zeek repository
2025-08-15 14:02:23 -07:00
Tim Wojtulewicz
a1f5f0a40e Fix some clang-tidy findings in generated BIF code 2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
f194b14727 Fix clang-tidy and pre-commit warnings for gen-zam code files 2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
8f918dab47 Move gen-zam code into the main Zeek repository
This is based on commit 56a6db00b887c79d26f303676677cb490d1c296d from
the gen-zam repository.
2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
5ccf64102b Move zeek-af_packet-plugin code into the main Zeek repository
This is based on commit b89a6f64123f778090d1dd6ec48e6b8e8906ea11 from
the zeek-af_packet-plugin repository.
2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
68926faf47 Move the bifcl code into the main Zeek repository
This is based on commit 5947749f7850b075f11d6a2aaefe7dad4f63cb62f from
the bifcl repository.
2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
cd1414ab69 Fix clang-tidy findings in the binpac lib code 2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
4ae8bb856d Add copyright headers to all of the binpac source files 2025-08-15 13:57:27 -07:00
Tim Wojtulewicz
ff26835976 Move binpac code into the main Zeek repository
This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from
the binpac repository.
2025-08-15 13:57:27 -07:00
Evan Typanski
4445bc1daf Fix parameter attributes pretending to be records
Parameters relied on is_record for a couple of validations, but they are
not records and should not be treated as such. This way we can validate
&optional better.
2025-08-14 12:00:15 -04:00
Evan Typanski
4e5a56c5e0 Only allow &optional in records
There was some confusing behavior with &optional and locals, so this
should get rid of that by making it an error. However, there is a case
where function parameters are still allowed to have &optional - this is
because there are checks for &default in parameters as well.
2025-08-14 11:38:19 -04:00
zeek-bot
a2680d5eca Update doc submodule [nomail] [skip ci] 2025-08-14 00:25:34 +00:00
Benjamin Grap
fafc0212a5 Changed behavior of var-extraction-uri.zeek from policy/protocol/http to extract only the URI parameter names. Do not include the path in the first parameter name. Only extract uri vars if parameters actually exist. 2025-08-13 22:45:20 +02:00
Arne Welzel
63574b9fd4 Merge remote-tracking branch 'origin/topic/awelzel/docker-trixie'
* origin/topic/awelzel/docker-trixie:
  ci: Run zeekctl and builtin tasks with Debian 13, too
  ci: Prepend timestamps to output
  ci: Enable Spicy for arm_debian13
  ci: Add Debian 13.0 (trixie)
  docker: Bump to debian:trixie-slim
2025-08-13 21:21:16 +02:00
Arne Welzel
b346418856 ci: Run zeekctl and builtin tasks with Debian 13, too 2025-08-13 20:42:20 +02:00
Arne Welzel
80ecaf491c ci: Prepend timestamps to output 2025-08-13 20:37:19 +02:00
Arne Welzel
3e4c2c0288 ci: Enable Spicy for arm_debian13 2025-08-13 20:37:19 +02:00
Arne Welzel
ccd4a2935c ci: Add Debian 13.0 (trixie) 2025-08-13 20:37:16 +02:00
Arne Welzel
91afdd03b8 docker: Bump to debian:trixie-slim 2025-08-13 20:37:14 +02:00
Tim Wojtulewicz
75ba63eb3f Merge remote-tracking branch 'origin/topic/timw/limit-string-and-container-lengths-in-logs'
* origin/topic/timw/limit-string-and-container-lengths-in-logs:
  Add NEWS entry for field length limiting
  Tag truncated values with a flag, plus pack threading::Value better
  Remove length limiting on string fields for HTTP
  Make total_size counter a member in logging::Manager
  Remove using numeric_limits and just check for zero instead
  Expand the size of the log-size filters for x509
  Add options to filter at the stream level as well as globally
  Add a weird that gets emitted when strings/containers are over the limits
  Add metrics to track string and container fields limited by length
  Replace unused stream argument from RecordToLogRecord with WriterInfo
  Implement string- and container-length filtering at the log record level
2025-08-12 17:43:02 -07:00
Tim Wojtulewicz
a1c201fb8f Add NEWS entry for field length limiting 2025-08-12 17:31:29 -07:00
Tim Wojtulewicz
39814816af Tag truncated values with a flag, plus pack threading::Value better 2025-08-12 17:31:29 -07:00
Tim Wojtulewicz
c8818d76bd Remove length limiting on string fields for HTTP 2025-08-12 17:31:29 -07:00
Tim Wojtulewicz
29425688da Make total_size counter a member in logging::Manager 2025-08-12 17:31:29 -07:00
Tim Wojtulewicz
98a77b5f25 Remove using numeric_limits and just check for zero instead 2025-08-12 17:31:29 -07:00
Tim Wojtulewicz
8a4bc084f9 Expand the size of the log-size filters for x509 2025-08-12 17:31:28 -07:00
Tim Wojtulewicz
0ec2161b04 Add options to filter at the stream level as well as globally 2025-08-12 17:31:28 -07:00
Tim Wojtulewicz
339d46ae26 Add a weird that gets emitted when strings/containers are over the limits 2025-08-12 17:31:28 -07:00
Tim Wojtulewicz
837fde1a08 Add metrics to track string and container fields limited by length 2025-08-12 17:31:28 -07:00
Tim Wojtulewicz
cd74a4e138 Replace unused stream argument from RecordToLogRecord with WriterInfo
This also adds a WriterInfo argument to ValToLogVal and passes the one from
RecordToLogRecord into it.
2025-08-12 17:31:28 -07:00
Tim Wojtulewicz
e2e7ab28da Implement string- and container-length filtering at the log record level 2025-08-12 17:31:28 -07:00