Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applayer plugin 5053 final v3.6 #11987

Closed
wants to merge 10 commits into from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/5053

Describe changes:

  • get ready to use dynamic number of app-layer protos (also work with static constant) in some places
  • preventive fix of macro with parenthesis cc @jufajardini

#11572 final round + #11910 with more

Example plugin at https://github.com/catenacyber/suricata-zabbix

instead of a global variable.

For easier initialization with dynamic number of protocols
for expectation_proto

Ticket: 5053
so that we can use safely EXCEPTION_POLICY_MAX*sizeof(x)
Ticket: 5053

delay after initialization so that StringToAppProto works
Ticket: 5053

The names are nwo dynamic
AppProto alproto, int direction, int to_client_progress, int to_server_progress)
{
size_t i = 0;
while (al_protocols[i].al_proto != ALPROTO_UNKNOWN && i < ALPROTO_WITHFILES_MAX) {

Check failure

Code scanning / CodeQL

Array offset used before range check High

This use of offset 'i' should follow the
range check
.
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 73.98844% with 90 lines in your changes missing coverage. Please review.

Project coverage is 82.90%. Comparing base (37fa2a6) to head (ea10dc2).
Report is 36 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11987      +/-   ##
==========================================
+ Coverage   82.77%   82.90%   +0.12%     
==========================================
  Files         910      910              
  Lines      249016   258292    +9276     
==========================================
+ Hits       206134   214126    +7992     
- Misses      42882    44166    +1284     
Flag Coverage Δ
fuzzcorpus 60.17% <67.44%> (-0.60%) ⬇️
livemode 19.40% <57.18%> (+0.69%) ⬆️
pcap 44.27% <69.50%> (+0.18%) ⬆️
suricata-verify 62.76% <73.60%> (+0.56%) ⬆️
unittests 59.27% <56.93%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23133

@catenacyber catenacyber marked this pull request as draft October 23, 2024 19:53
@catenacyber
Copy link
Contributor Author

Needs rebase to take care of #11983

@catenacyber
Copy link
Contributor Author

Rebased in #12052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants