Commit graph

15389 commits

Author SHA1 Message Date
Tim Wojtulewicz
2557250c1f Re-enable sending coverage data to Coveralls via Cirrus
This was lost in 903f4bcc8e
2022-07-28 10:38:41 -07:00
Tim Wojtulewicz
d461033978 Update docs submodule 2022-07-28 10:15:43 -07:00
Tim Wojtulewicz
25f88bc394 Add btest for vector bit-shift operators 2022-07-25 11:32:42 -07:00
Tim Wojtulewicz
8fff3c76b9 Handle error cases for bit-shift operators more cleanly 2022-07-25 11:32:42 -07:00
Tim Wojtulewicz
ac4b7f9f02 Merge remote-tracking branch 'origin/topic/timw/2131-no-redef-segfault'
* origin/topic/timw/2131-no-redef-segfault:
  Return an error if redef'ing a variable without redef attribute
2022-07-25 09:43:54 -07:00
Tim Wojtulewicz
00e111135b Return an error if redef'ing a variable without redef attribute 2022-07-25 09:43:19 -07:00
Michael Torres
b85801aa7e Add a field to Modbus/TCP log to indicate the Modbus PDU type
Add the `pdu_type` field to Modbus over TCP logs to indicate whether the Modbus
message was a request or a response. Due to the client/server nature of Modbus
over TCP/IP, all messages from the TCP session originator are requests, while
all messages from the TCP session responder are responses.

Adding this information to the default log surfaces protocol metadata in a way
that doesn't require users to understand the Modbus over TCP protocol.
2022-07-24 02:41:26 +00:00
zeek-bot
86c316ddfc Update doc submodule [nomail] [skip ci] 2022-07-22 00:39:57 +00:00
Tim Wojtulewicz
e700b66828 Merge remote-tracking branch 'origin/topic/timw/1628-duplicate-record-field'
* origin/topic/timw/1628-duplicate-record-field:
  Add comments for specialized versions of util::split
  Make char*/wchar_t* split methods use string_view/wstring_view
  GH-1628: Return an error for duplicate record field names
  Fix a bug with splitting strings in Ascii input reader
  Iterator and looping cleanup in Ascii input reader
  Add util::split methods for splitting strings
2022-07-21 11:54:50 -07:00
Tim Wojtulewicz
871e3465c2 Add comments for specialized versions of util::split 2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
701fc3654a Make char*/wchar_t* split methods use string_view/wstring_view 2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
b41a4bf06d GH-1628: Return an error for duplicate record field names 2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
d57ad3e405 Fix a bug with splitting strings in Ascii input reader
The previous way of splitting strings would break if the last string in
the line was an empty string, and it would return one fewer fields than
it should have. This was breaking the last line in the
scripts.base.framework.input.ascii.setspecialcases once the bug fixed in
GH #1628 was fixed.
2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
a0cc34efb2 Iterator and looping cleanup in Ascii input reader 2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
510dd1cf71 Add util::split methods for splitting strings 2022-07-21 11:53:47 -07:00
Tim Wojtulewicz
5665696a05 Merge remote-tracking branch 'amazingpp/topic/amazingpp/bitshift-operators'
* amazingpp/topic/amazingpp/bitshift-operators:
  Add bitshift operators
2022-07-21 09:06:41 -07:00
AmazingPP
f2bfa61fc6 Add bitshift operators 2022-07-21 11:12:30 +08:00
zeek-bot
0bf75bd67b Update doc submodule [nomail] [skip ci] 2022-07-20 00:45:00 +00:00
Robin Sommer
ad2557755d Merge remote-tracking branch 'origin/topic/robin/gh-2267-doctest'
* origin/topic/robin/gh-2267-doctest:
  Add btest that runs the doctest-based unit tests.
2022-07-19 15:21:39 +02:00
Robin Sommer
d5db2623dc Merge remote-tracking branch 'origin/topic/robin/gh-2280-modifiable-const-via-loops-merge'
* origin/topic/robin/gh-2280-modifiable-const-via-loops-merge:
  Add help function to check loop variable
  Fix local const variables can be modified via loops
2022-07-19 15:20:34 +02:00
Robin Sommer
f40ca42590 Merge branch 'topic/amazingpp/modifiable-const-via-loops' of ssh://github.com/AmazingPP/zeek
Edits: Slight tweaking, plus a simple test.

* 'topic/amazingpp/modifiable-const-via-loops' of ssh://github.com/AmazingPP/zeek:
  Add help function to check loop variable
  Fix local const variables can be modified via loops
2022-07-19 14:26:59 +02:00
Johanna Amann
b27c114d68 Merge remote-tracking branch 'origin/infallible-analyzer-violation'
* origin/infallible-analyzer-violation:
  Remove use of fallible `get_conn_transport_proto` in `analyzer_violation`.
2022-07-19 12:57:42 +01:00
Benjamin Bannier
396fb89504 Remove use of fallible get_conn_transport_proto in analyzer_violation.
When setting up the DPD info we previously would get the
`transport_proto` for the connection with `get_conn_transport_proto`.
This function takes a `conn_id` and would fail fatally if the connection
for the given ID was unknown. It seems it was possible to run into such
scenarios when the `analyzer_violation` event was processed after the
connection had been cleaned up.

We now get the `transport_proto` directly from the ports in the
`connection` passed into `analyzer_violation` via
`get_port_transport_proto` which cannot fail.
2022-07-19 12:20:45 +02:00
Robin Sommer
265fa83a24 Merge remote-tracking branch 'origin/topic/awelzel/2276-smb2-delete-on-close'
* origin/topic/awelzel/2276-smb2-delete-on-close:
  smb2: Raise smb2_file_delete for CREATE with FILE_DELETE_ON_CLOSE
2022-07-19 12:02:16 +02:00
Robin Sommer
202037181c Add btest that runs the doctest-based unit tests.
Closes #2267.
2022-07-19 11:35:09 +02:00
AmazingPP
f5f489ba10 Add help function to check loop variable 2022-07-19 09:08:42 +08:00
Tim Wojtulewicz
42c36019e6 Merge remote-tracking branch 'origin/topic/awelzel/debuglogger-const-auto'
* origin/topic/awelzel/debuglogger-const-auto:
  DebugLogger: "auto const" to "const auto"
2022-07-18 08:57:41 -07:00
Tim Wojtulewicz
373e201df6 Merge remote-tracking branch 'origin/topic/timw/deprecation-warnings'
* origin/topic/timw/deprecation-warnings:
  Fix some warnings from bro_version deprecation
2022-07-18 08:55:46 -07:00
Tim Wojtulewicz
0d3d9f67b0 Fix some warnings from bro_version deprecation 2022-07-18 08:55:18 -07:00
Tim Wojtulewicz
33f97fc3fb Merge remote-tracking branch 'origin/topic/timw/636-config-commas'
* origin/topic/timw/636-config-commas:
  GH-636: Fix regex to handle commas at the end of config parser lines
  Convert config framework to use std::regex
2022-07-18 08:54:44 -07:00
Tim Wojtulewicz
05bb509789 GH-636: Fix regex to handle commas at the end of config parser lines 2022-07-18 08:54:06 -07:00
Tim Wojtulewicz
65ee2287e9 Convert config framework to use std::regex 2022-07-18 08:42:34 -07:00
AmazingPP
3312e19d5b Fix local const variables can be modified via loops 2022-07-18 20:31:21 +08:00
Arne Welzel
ec9e0fed2f DebugLogger: "auto const" to "const auto"
This was pointed out in a separate PR so fixing the occurrence I
had managed to sneak in already.
2022-07-18 09:30:12 +02:00
Michael Torres
bab2036aa4 Add modbus transaction and unit ids to logs
Add transaction IDs and unit IDs to default modbus over TCP/IP logs.
Update the relevant testing baselines to account for the extra fields.
2022-07-17 21:02:37 +00:00
Michael Torres
7c24b53b4f Enable modbus logging for requests 2022-07-17 21:02:37 +00:00
Arne Welzel
3dae8ab086 smb2: Raise smb2_file_delete for CREATE with FILE_DELETE_ON_CLOSE
When a CREATE request contains the FILE_DELETE_ON_CLOSE option and
the subsequent CREATE response indicates success, we now raise the
smb2_file_delete event to log a delete action in smb_files.log and
also give users a way to handle this scenario.

The provided pcap was generated locally by recording a smbtorture run
of the smb2.delete-on-close-perms test case.

Placed the create_options into the CmdInfo record for potential
exposure in smb_cmd.log (wasn't sure how that would look so left it
for the future).

Fixes #2276.
2022-07-16 17:14:13 +02:00
zeek-bot
1d2c12e980 Update doc submodule [nomail] [skip ci] 2022-07-15 00:41:35 +00:00
Christian Kreibich
6543c21d23 Merge branch 'topic/christian/management-agent-boot-fix'
* topic/christian/management-agent-boot-fix:
  Management framework: bump cluster testsuite
  Management framework: undo the testsuite result mask
  Management framework: additional logging tweaks
  Management framework: additional context in a few log messages
  Management framework: await Supervisor peering before sending agent's hello
  Management framework: remove outdated comment
2022-07-14 15:50:14 -07:00
Tim Wojtulewicz
9c482b1373 Merge remote-tracking branch 'amazingpp/topic/amazingpp/pow-bif'
* amazingpp/topic/amazingpp/pow-bif:
  Add pow function
2022-07-14 11:08:48 -07:00
Tim Wojtulewicz
cae104d135 Merge remote-tracking branch 'origin/topic/timw/2258-skip-dns-tests'
* origin/topic/timw/2258-skip-dns-tests:
  GH-2258: Add skip decorator to DNS unit tests
2022-07-14 08:58:08 -07:00
Tim Wojtulewicz
ab51451fc8 Merge remote-tracking branch 'origin/topic/timw/2261-all-analyzers-type'
* origin/topic/timw/2261-all-analyzers-type:
  GH-2261: Fix type used for analyzer_confirmation/violation events
2022-07-14 08:57:45 -07:00
AmazingPP
a76dc6a389 Add pow function 2022-07-14 22:13:34 +08:00
Christian Kreibich
8a4ed58731 Merge branch 'topic/christian/fix-skipped-sqlite-test'
* topic/christian/fix-skipped-sqlite-test:
  Fix requirement check in a logging framework / sqlite btest
2022-07-13 18:17:49 -07:00
zeek-bot
91a99a7409 Update doc submodule [nomail] [skip ci] 2022-07-14 00:53:28 +00:00
Christian Kreibich
8d10cbfb36 Fix requirement check in a logging framework / sqlite btest 2022-07-13 17:20:03 -07:00
Tim Wojtulewicz
ec450147e6 GH-2261: Fix type used for analyzer_confirmation/violation events 2022-07-13 12:50:15 -07:00
Tim Wojtulewicz
47bcd2cbeb GH-2258: Add skip decorator to DNS unit tests 2022-07-13 12:33:17 -07:00
Christian Kreibich
48486b4156 Merge branch 'topic/christian/gh-2239-stdin-ctrl-c'
* topic/christian/gh-2239-stdin-ctrl-c:
  Stop signal-masking upon running unit tests
  Pause signal-masking during script parsing
  Add btests to verify Zeek's handling of SIGTERM and reading stdin
  Add procps/procps-ng to several CI Docker images
2022-07-13 11:57:52 -07:00
Tim Wojtulewicz
ed2934d345 Merge remote-tracking branch 'origin/topic/bbannier/format-btest_testing_plugins'
* origin/topic/bbannier/format-btest_testing_plugins:
  Use clang-format for all files in `testing/btest/plugins`.
2022-07-13 11:23:45 -07:00