File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ruby/ql/src/queries/security/cwe-094 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ and methods.
80
80
A safer approach is to use <code >class_variable_set</code > and
81
81
<code >class_variable_get</code > along with <code >define_method</code >. String
82
82
interpolation is still used to construct the class variable name, but this is
83
- safe because <code >class_variable_set<code > is not susceptible to code injection.
83
+ safe because <code >class_variable_set</ code > is not susceptible to code injection.
84
84
To construct a dynamic method call we use <code >send</code >, which is ulnerable
85
85
to code injection: if an attacker can control the first argument, they can call
86
86
any method on the receiver. However this is less powerful than being able to run
@@ -101,10 +101,10 @@ OWASP:
101
101
Wikipedia: <a href =" https://en.wikipedia.org/wiki/Code_injection" >Code Injection</a >.
102
102
</li >
103
103
<li >
104
- Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-define_method" >< code > define_method</ code > </a >.
104
+ Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-define_method" >define_method</a >.
105
105
</li >
106
106
<li >
107
- Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-class_variable_set" >< code > class_variable_set</ code > </a >.
107
+ Ruby documentation: <a href =" https://docs.ruby-lang.org/en/3.2/Module.html#method-i-class_variable_set" >class_variable_set</a >.
108
108
</li >
109
109
</references >
110
110
</qhelp >
You can’t perform that action at this time.
0 commit comments