Skip to content

Lua ssh 7607 v9 #13084

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

Closed
wants to merge 7 commits into from
Closed

Lua ssh 7607 v9 #13084

wants to merge 7 commits into from

Conversation

catenacyber
Copy link
Contributor

@catenacyber catenacyber commented Apr 23, 2025

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

Describe changes:

  • lua: convert ssh function into suricata.ssh lib
  • add hooks for ssh to be able to add lua lib
  • use a derive AppLayerState to get hooks for rust ssh
  • detect/flow: friendly error when trying to set a direction but a hook set another one already

SV_BRANCH=OISF/suricata-verify#2455

#13077 with needed rebase and better doc according to review

Still to do afterwards :

  • add hassh to lua (there is a dedicated ticket for it)

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 73.68421% with 20 lines in your changes missing coverage. Please review.

Project coverage is 82.63%. Comparing base (f301cd3) to head (2dfa845).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13084      +/-   ##
==========================================
- Coverage   82.78%   82.63%   -0.15%     
==========================================
  Files         985      985              
  Lines      272547   272533      -14     
==========================================
- Hits       225617   225218     -399     
- Misses      46930    47315     +385     
Flag Coverage Δ
fuzzcorpus 60.52% <18.42%> (-0.27%) ⬇️
livemode 18.95% <13.15%> (+0.01%) ⬆️
pcap 44.66% <15.78%> (+0.01%) ⬆️
suricata-verify 64.80% <71.05%> (+0.03%) ⬆️
unittests 58.11% <14.66%> (-0.01%) ⬇️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 25774

ssh
^^^

Available states are listed in `ssh-hooks`.
Copy link
Member

Choose a reason for hiding this comment

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

this should be a link? cc @jufajardini

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, I messed it

@jufajardini how do I test the rendering ?

Copy link
Member

Choose a reason for hiding this comment

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

In doc/userguide you can do make html. You will need Sphinx installed though. For an example of the Ubuntu dependencies, see https://github.com/OISF/suricata/blob/master/.github/workflows/docs.yml, or for Fedora/RHEL: https://github.com/OISF/suricata/blob/master/.github/workflows/builds.yml#L68

@catenacyber catenacyber mentioned this pull request Apr 24, 2025
@catenacyber
Copy link
Contributor Author

Next in #13090

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