-
-
Notifications
You must be signed in to change notification settings - Fork 402
Unused variables #2990
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
Comments
It is difficult to move, I think, if we are using it in two different potential plugins. Technically the core should be providing it to plugins to be used. For sure it deserves to be better documented? |
I do not consider this solution lucky, rather I would prefer that each plugin initializes its own variable. But it's just an opinion. If we support that core provides the variables for plugins, then we should initialize this (these) variable(s), and show them at the and of transaction - just for to keep the rule variables consistent. If it is not possible, I can remove this feature, or make it optionally, probably change the output level (error -> warning/notice). |
Meeting decision Nov: variables |
See #3043. |
Describe the bug
It's not a real bug, more of a cleanup discussion.
The current CRS v4.0/dev branch has three transaction variables, which set (they occur in a
setvar
action's left side operand), but never used (don't occur either as a target, in the right-hand operand of asetvar
action, ormsg
...):Motivation
As you know, I added few new features to crs-rules-check tool, but haven't committed yet. The reason is that the script checks the unused variables. If we want this feature, before the commit we have to remove these variables or resolve its states.
If we do not want this feature, I can remove it, or make it optionally, possibly gives it warning instead of error (if Github action handles different levels).
Unused variables
real_ip
occurs here, in line 305:
There is no discussion about this TX variable yet.
942521_full
occurs here in line 1476
We discussed about this variable here, looks like it can be removed.
anomaly_score
occurs here in lines 35 and 36
Discussion about this variable is here. If we want to keep this variable, we should initialize it in
REQUEST-901-INITIALIZATION.conf
, and later eg. inRESPONSE-980-CORRELATION.conf
we show the value in a log message.I think the first two items can be removed. But what about the
anomaly_score
?Any helps are welcome.
The text was updated successfully, but these errors were encountered: