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/ftp.command: Add sticky buffer #12428

Closed
wants to merge 2 commits into from
Closed

Conversation

jlucovsky
Copy link
Contributor

@jlucovsky jlucovsky commented Jan 19, 2025

Issue: 7502

Add a sticky buffer for "ftp.command" for matching on FTP command names.

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

Describe changes:

  • Add a sticky buffer for ftp.command
  • Briefly document ftp.command sticky buffer.

Provide values to any of the below to override the defaults.

  • To use an LibHTP, Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

SV_REPO=
SV_BRANCH=OISF/suricata-verify#2242
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

@@ -333,6 +333,8 @@ enum DetectKeywordId {

DETECT_AL_JA4_HASH,

DETECT_AL_FTP_COMMAND,
Copy link
Member

Choose a reason for hiding this comment

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

lets drop the AL_ here, I don't like it in other keywords either

Copy link
Member

Choose a reason for hiding this comment

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

What do you think about using dynamic IDs for new keywords?

Copy link
Member

Choose a reason for hiding this comment

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

Think I'm indifferent about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you like a separate commit with s/DETECT_AL_/DETECT_/? everywhere?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were so many occurrences I decided to make a single PR with the changes: #12433

@victorjulien
Copy link
Member

Looks good to me wrt code.

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.62%. Comparing base (8f6795d) to head (698ff8f).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12428      +/-   ##
==========================================
- Coverage   80.63%   80.62%   -0.01%     
==========================================
  Files         918      921       +3     
  Lines      258696   258733      +37     
==========================================
+ Hits       208598   208616      +18     
- Misses      50098    50117      +19     
Flag Coverage Δ
fuzzcorpus 56.81% <50.00%> (-0.01%) ⬇️
livemode 19.40% <50.00%> (-0.01%) ⬇️
pcap 44.29% <50.00%> (-0.01%) ⬇️
suricata-verify 63.24% <94.44%> (+<0.01%) ⬆️
unittests 58.51% <50.00%> (-0.01%) ⬇️

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 24270

Issue: 7502

Add a sticky buffer for "ftp.command" for matching on FTP command names.
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24271

Issue: 7502

This commit documents the new FTP sticky buffer "ftp.command".
@jlucovsky jlucovsky marked this pull request as ready for review January 20, 2025 15:42
@@ -82,6 +82,8 @@ Major changes
- Unknown requirements in the ``requires`` keyword will now be treated
as unmet requirements, causing the rule to not be loaded. See
:ref:`keyword_requires`.
- The following sticky buffers for matching FTP headers have been implemented:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this here. Did you mix up PRs? #12432 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was intentional in introducing the FTP-related sticky buffers.

We've done this for past releases as well, e.g., the 7 to 8 section mentions the newly added sip related keywords.

Copy link
Member

@victorjulien victorjulien Jan 21, 2025

Choose a reason for hiding this comment

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

I don't think either should be there. It's not meant to list new features, just keep note of things that may affect upgrades

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24281

@jlucovsky
Copy link
Contributor Author

Continued in #12439

@jlucovsky jlucovsky closed this Jan 21, 2025
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.

4 participants