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

Detect http uri sv 3725 v1 #11307

Closed

Conversation

catenacyber
Copy link
Contributor

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

Describe changes:

  • move some unit tests to suricata-verify : ones about http.uri detection
  • add some dummy code in ifdef to generate the suricata-verify test cases

Thay all follow the same basis :

  • have one rule
  • have one or 2 HTTP requests buffers
  • check if the rule triggered on each of these buffers

SV_BRANCH=OISF/suricata-verify#1917

Should we have the first helper dummy commit that helps create these tests ?

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.40%. Comparing base (f0dbfe8) to head (7d3e948).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11307      +/-   ##
==========================================
- Coverage   82.45%   82.40%   -0.06%     
==========================================
  Files         961      961              
  Lines      251710   249154    -2556     
==========================================
- Hits       207552   205319    -2233     
+ Misses      44158    43835     -323     
Flag Coverage Δ
fuzzcorpus 60.30% <ø> (ø)
livemode 18.69% <ø> (+<0.01%) ⬆️
pcap 43.78% <ø> (-0.01%) ⬇️
suricata-verify 61.21% <ø> (+0.02%) ⬆️
unittests 59.61% <ø> (-0.35%) ⬇️

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

@suricata-qa
Copy link

WARNING:

field baseline test %
SURI_TLPW2_autofp_stats_chk
.flow.end.tcp_state.syn_recv 0 1 -

Pipeline 21090

@@ -1296,6 +1296,20 @@ int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *alp_tctx, Flow
uint32_t consumed = input_len;
const uint8_t direction = (flags & STREAM_TOSERVER) ? 0 : 1;

#ifdef UNSAFE_DUMMY_SVTEST_CONVERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit is too messy to get merged

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the messy commit then :-)

@catenacyber
Copy link
Contributor Author

Continued in #11315

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.

3 participants