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

lua: Fix SCRule functions for match scripts v2.1 #6568

Closed
wants to merge 1 commit into from

Conversation

benajmin
Copy link
Contributor

@benajmin benajmin commented Nov 3, 2021

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket: #2450

Describe changes:

suricata-verify-pr: 577

Save Signature structure to lua register so SCRule functions can work
in match scripts, where no PacketAlert is present

Resolves Feature OISF#2450
@benajmin benajmin requested a review from a team as a code owner November 3, 2021 14:42
@jufajardini jufajardini added the needs verify Needs (a) Suricata-verify test(s) label Nov 3, 2021
lua_pushstring (luastate, pa->s->class_msg);
lua_pushnumber (luastate, pa->s->prio);
lua_pushstring(luastate, s->class_msg);
lua_pushnumber(luastate, s->prio);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be lua_pushinteger here, to prevent it from being considered a float in newer Lua versions...

@jufajardini
Copy link
Contributor

One thing that I only learned recently: it is necessary to remove the # from the #suricata-verify-pr: line in order for github automation to recognize it, if we need those to be run. ;)

@benajmin benajmin changed the title lua: Fix SCRule functions for match scripts lua: Fix SCRule functions for match scripts v2.1 Nov 3, 2021
@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #6568 (19ba557) into master (07370ed) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6568      +/-   ##
==========================================
+ Coverage   77.05%   77.08%   +0.02%     
==========================================
  Files         613      613              
  Lines      186733   186692      -41     
==========================================
+ Hits       143890   143909      +19     
+ Misses      42843    42783      -60     
Flag Coverage Δ
fuzzcorpus 53.01% <ø> (+0.15%) ⬆️
suricata-verify 52.09% <ø> (-0.01%) ⬇️
unittests 63.11% <ø> (-0.01%) ⬇️

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

@benajmin benajmin closed this Nov 16, 2021
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 22, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 24, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 28, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 28, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Nov 29, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Dec 14, 2023
If a commit introduces code that changes Suricata behavior, the related
documentation changes should go in a separate commit, but refer to the
same ticket number.
This reduces the chances of said changes being lost if there are backports
while still keeping the backporting process a bit less bulky, for each
commit.

Related to
Task OISF#6568
jufajardini added a commit to jufajardini/suricata that referenced this pull request Dec 14, 2023
jufajardini added a commit to jufajardini/suricata that referenced this pull request Dec 14, 2023
If a commit introduces code that changes Suricata behavior, the related
documentation changes should go in a separate commit, but refer to the
same ticket number.
This reduces the chances of said changes being lost if there are backports
while still keeping the backporting process a bit less bulky, for each
commit.

Related to
Task OISF#6568
jufajardini added a commit to jufajardini/suricata that referenced this pull request Dec 14, 2023
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jan 2, 2024
If a commit introduces code that changes Suricata behavior, the related
documentation changes should go in a separate commit, but refer to the
same ticket number.
This reduces the chances of said changes being lost if there are backports
while still keeping the backporting process a bit less bulky, for each
commit.

Related to
Task OISF#6568
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jan 2, 2024
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jan 4, 2024
If a commit introduces code that changes Suricata behavior, the related
documentation changes should go in a separate commit, but refer to the
same ticket number.
This reduces the chances of said changes being lost if there are backports
while still keeping the backporting process a bit less bulky, for each
commit.

Related to
Task OISF#6568
victorjulien pushed a commit to victorjulien/suricata that referenced this pull request Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs verify Needs (a) Suricata-verify test(s)
Development

Successfully merging this pull request may close these issues.

2 participants