Commit graph

18429 commits

Author SHA1 Message Date
Tim Wojtulewicz
a6437142ce from_json: Statically lookup err index in result type 2025-05-27 12:03:45 -07:00
Tim Wojtulewicz
1992a55798 Use SCN* constants when reading into sized integer types 2025-05-27 12:03:45 -07:00
Tim Wojtulewicz
ff4d1a4121 Remove setting unused variable value in FTP::parse_eftp 2025-05-27 12:03:45 -07:00
Tim Wojtulewicz
aaca36dc22 Merge remote-tracking branch 'origin/topic/timw/clang-tidy-bugprone-fixes'
* origin/topic/timw/clang-tidy-bugprone-fixes: (22 commits)
  Update .clang-tidy to have bugprone-* enabled with some exclusions
  Fix clang-tidy bugprone-unused-return-value warnings
  Fix clang-tidy bugprone-unsafe-functions warnings
  Fix clang-tidy bugprone-unused-local-non-trivial-variable warnings
  Fix clang-tidy bugprone-throw-keyword-missing warnings
  Fix clang-tidy bugprone-switch-missing-default-case warnings
  Fix clang-tidy bugprone-suspicious-realloc-usage warnings
  Fix clang-tidy bugprone-suspicious-include warnings
  Fix clang-tidy bugprone-suspicious-string-compare warnings
  Fix clang-tidy bugprone-suspicious-stringview-data-usage warnings
  Fix clang-tidy bugprone-string-literal-with-embedded-nul warnings
  Fix clang-tidy bugprone-parent-virtual-call warnings
  Fix clang-tidy bugprone-misplaced-widening-cast warnings
  Fix clang-tidy bugprone-inc-dec-in-conditions warnings
  Fix clang-tidy bugprone-multi-level-implicit-pointer-conversion warnings
  Fix clang-tidy bugprone-macro-parentheses warnings
  Fix clang-tidy bugprone-incorrect-roundings warnings
  Fix clang-tidy bugprone-incorrect-division warnings
  Fix clang-tidy bugprone-implicit-widening-of-multiplication-result warnings
  Remove noexcept from util::tokenize_string
  ...
2025-05-27 11:59:46 -07:00
Tim Wojtulewicz
998479258a Update .clang-tidy to have bugprone-* enabled with some exclusions 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
637a7732c0 Fix clang-tidy bugprone-unused-return-value warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
ae2ff9901b Fix clang-tidy bugprone-unsafe-functions warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
d2045d1834 Fix clang-tidy bugprone-unused-local-non-trivial-variable warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
8bb015754a Fix clang-tidy bugprone-throw-keyword-missing warnings
This one renames the Modbus Exception binpac type to ExcResponse. clang-tidy
insisted that anything named started with Exception was actually an exception
and needed to be thrown.
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
2c2a595af5 Fix clang-tidy bugprone-switch-missing-default-case warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
b20419efaf Fix clang-tidy bugprone-suspicious-realloc-usage warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
f643d02bf8 Fix clang-tidy bugprone-suspicious-include warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
4d60d4833e Fix clang-tidy bugprone-suspicious-string-compare warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
975f24bde6 Fix clang-tidy bugprone-suspicious-stringview-data-usage warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
02589c349a Fix clang-tidy bugprone-string-literal-with-embedded-nul warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
74acc30258 Fix clang-tidy bugprone-parent-virtual-call warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
b3de432ef2 Fix clang-tidy bugprone-misplaced-widening-cast warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
184757b3db Fix clang-tidy bugprone-inc-dec-in-conditions warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
d0bbc61bd4 Fix clang-tidy bugprone-multi-level-implicit-pointer-conversion warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
9e83759e83 Fix clang-tidy bugprone-macro-parentheses warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
1d315a3847 Fix clang-tidy bugprone-incorrect-roundings warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
87f1b1a7b3 Fix clang-tidy bugprone-incorrect-division warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
18983aed02 Fix clang-tidy bugprone-implicit-widening-of-multiplication-result warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
bdb0fad6d5 Remove noexcept from util::tokenize_string
One instance of this method is noexcept and one isn't. The version
that is noexcept uses std::vector::emplace_back, which may throw
exceptions. Instead of adding a try/catch block, opt for just making
the two functions able to throw exceptions.

This fixes a clang-tidy bugprone-exception-escape warning.
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
dbecfb5a2a Fix clang-tidy bugprone-branch-clone warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
92854e95d3 Fix clang-tidy bugprone-assignment-in-if-condition warnings 2025-05-27 11:58:27 -07:00
Johanna Amann
8ce741a7a8 Merge remote-tracking branch 'origin/topic/johanna/gh-4463'
* origin/topic/johanna/gh-4463:
  Add explicit TLS support for FTP
2025-05-27 17:47:52 +01:00
Johanna Amann
718307214e Add explicit TLS support for FTP
This is defined in RFC 4217; TLS initialized by the client sending an
`AUTH TLS` command.

Fixes GH-4463
2025-05-27 16:57:51 +01:00
Evan Typanski
9f2fb47f48 Merge remote-tracking branch 'origin/topic/etyp/redis-analyzer'
* origin/topic/etyp/redis-analyzer:
  spicy-redis: Add NEWS entry
  spicy-redis: Separate error replies from success
  spicy-redis: Cleanup scripts and tests
  spciy-redis: Bring Redis analyzer into Zeek proper
  spicy-redis: Abort parsing if server data comes first
  spicy-redis: Add recursion depth to server data
  spicy-redis: Make client data only accept bulk strings
  spicy-redis: Add dpd signature and clean pcaps
  spicy-redis: Add some commands and touch up parsing
  spicy-redis: Add some script logic for logging
  spicy-redis: Separate client/server
  spicy-redis: Touchup logging and Spicy issues
  spicy-redis: Add synchronization and pipeline support
  spicy-redis: Begin Spicy Redis analyzer
2025-05-27 10:20:00 -04:00
Evan Typanski
1b962b0fa7 spicy-redis: Add NEWS entry 2025-05-27 10:12:52 -04:00
Evan Typanski
b4429a995a spicy-redis: Separate error replies from success 2025-05-27 09:31:25 -04:00
Evan Typanski
d5b121db14 spicy-redis: Cleanup scripts and tests
- Recomputes checksums for pcaps to keep clean
- Removes some tests that had big pcaps or weren't necessary
- Cleans up scripting names and minor points
- Comments out Spicy code that causes a build failure now with a TODO to
  uncomment it
2025-05-27 09:29:13 -04:00
Evan Typanski
11777bd6d5 spciy-redis: Bring Redis analyzer into Zeek proper 2025-05-27 09:28:12 -04:00
Evan Typanski
aef9fe11dc spicy-redis: Abort parsing if server data comes first
Redis seems to only want client data first to request server data. The
DPD signature seems to pick up on some cases where server data comes
first, but is otherwise "valid" RESP. See if this helps lower FP rates.
2025-05-27 09:28:12 -04:00
Evan Typanski
90d56ce630 spicy-redis: Add recursion depth to server data 2025-05-27 09:28:12 -04:00
Evan Typanski
292241f420 spicy-redis: Make client data only accept bulk strings 2025-05-27 09:28:12 -04:00
Evan Typanski
7f28ec8bc5 spicy-redis: Add dpd signature and clean pcaps 2025-05-27 09:28:12 -04:00
Evan Typanski
f0e9f46c7c spicy-redis: Add some commands and touch up parsing 2025-05-27 09:28:12 -04:00
Evan Typanski
22bda56af3 spicy-redis: Add some script logic for logging
Also "rebrands" from RESP to Redis.
2025-05-27 09:28:12 -04:00
Evan Typanski
757cbbf902 spicy-redis: Separate client/server
This makes the parser more official and splits the client/server out
from each other. Apparently they're different enough to be separate.
2025-05-27 09:28:12 -04:00
Evan Typanski
f0f2969a66 spicy-redis: Touchup logging and Spicy issues 2025-05-27 09:28:12 -04:00
Evan Typanski
97d26a689d spicy-redis: Add synchronization and pipeline support
Also adds some command support
2025-05-27 09:28:12 -04:00
Evan Typanski
4210e62e57 spicy-redis: Begin Spicy Redis analyzer 2025-05-27 09:28:12 -04:00
Benjamin Bannier
897b1546a2 Merge branch 'topic/bbannier/bump-spicy' 2025-05-27 15:13:59 +02:00
Benjamin Bannier
2104a84e0b Do not build tests for auxil/spicy 2025-05-27 15:12:09 +02:00
Benjamin Bannier
99243b5fbe Bump auxil/spicy to latest development snapshot 2025-05-27 09:17:57 +02:00
Arne Welzel
cef63e871e Merge remote-tracking branch 'origin/topic/awelzel/fix-no-zero-timestamp-metadata'
* origin/topic/awelzel/fix-no-zero-timestamp-metadata:
  btest: Add test for Cluster::hello zero-timestamp
  EventMgr/Enqueue: Add automatic timestamp metadata to local events, only
  cluster and broker: Propagate zero-timestamp as metadata, too.
2025-05-26 16:08:58 +02:00
Arne Welzel
277c3f5245 btest: Add test for Cluster::hello zero-timestamp 2025-05-26 16:08:27 +02:00
Arne Welzel
a9d22611d0 EventMgr/Enqueue: Add automatic timestamp metadata to local events, only
It seems less surprising if only local events receive automatic network
timestamp metadata. For remote events the automatic value will most
likely be misleading.
2025-05-26 16:08:27 +02:00
Arne Welzel
d828e08a9e cluster and broker: Propagate zero-timestamp as metadata, too.
This will be cleaned up later to just pass all contained metadata from
a cluster event to the queued event, but for now do this here, otherwise
we break some internal tests.
2025-05-26 13:37:42 +02:00