eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.injectionShell.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.injectionShell.html	Mon May 24 11:19:57 2021 +0200
@@ -0,0 +1,312 @@
+<!DOCTYPE html>
+<html><head>
+<title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.injectionShell</title>
+<meta charset="UTF-8">
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body>
+<a NAME="top" ID="top"></a>
+<h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.injectionShell</h1>
+
+<p>
+Module implementing a check for shell injection.
+</p>
+<h3>Global Attributes</h3>
+
+<table>
+<tr><td>fullPathMatchRe</td></tr>
+</table>
+<h3>Classes</h3>
+
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Functions</h3>
+
+<table>
+
+<tr>
+<td><a href="#_evaluateShellCall">_evaluateShellCall</a></td>
+<td>Function to determine the severity of a shell call.</td>
+</tr>
+<tr>
+<td><a href="#checkOtherFunctionWithShell">checkOtherFunctionWithShell</a></td>
+<td>Function to check for any function with shell equals true.</td>
+</tr>
+<tr>
+<td><a href="#checkStartProcessWithNoShell">checkStartProcessWithNoShell</a></td>
+<td>Function to check for starting a process with no shell.</td>
+</tr>
+<tr>
+<td><a href="#checkStartProcessWithPartialPath">checkStartProcessWithPartialPath</a></td>
+<td>Function to check for starting a process with no shell.</td>
+</tr>
+<tr>
+<td><a href="#checkStartProcessWithShell">checkStartProcessWithShell</a></td>
+<td>Function to check for starting a process with a shell.</td>
+</tr>
+<tr>
+<td><a href="#checkSubprocessPopenWithShell">checkSubprocessPopenWithShell</a></td>
+<td>Function to check for use of popen with shell equals true.</td>
+</tr>
+<tr>
+<td><a href="#checkSubprocessPopenWithoutShell">checkSubprocessPopenWithoutShell</a></td>
+<td>Function to check for use of popen without shell equals true.</td>
+</tr>
+<tr>
+<td><a href="#getChecks">getChecks</a></td>
+<td>Public method to get a dictionary with checks handled by this module.</td>
+</tr>
+<tr>
+<td><a href="#hasShell">hasShell</a></td>
+<td>Function to check, if the node of the context contains the shell keyword.</td>
+</tr>
+</table>
+<hr />
+<hr />
+<a NAME="_evaluateShellCall" ID="_evaluateShellCall"></a>
+<h2>_evaluateShellCall</h2>
+<b>_evaluateShellCall</b>(<i>context</i>)
+
+<p>
+    Function to determine the severity of a shell call.
+</p>
+<dl>
+
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+context to be inspected
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+severity level (L, M or H)
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkOtherFunctionWithShell" ID="checkOtherFunctionWithShell"></a>
+<h2>checkOtherFunctionWithShell</h2>
+<b>checkOtherFunctionWithShell</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for any function with shell equals true.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkStartProcessWithNoShell" ID="checkStartProcessWithNoShell"></a>
+<h2>checkStartProcessWithNoShell</h2>
+<b>checkStartProcessWithNoShell</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for starting a process with no shell.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkStartProcessWithPartialPath" ID="checkStartProcessWithPartialPath"></a>
+<h2>checkStartProcessWithPartialPath</h2>
+<b>checkStartProcessWithPartialPath</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for starting a process with no shell.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkStartProcessWithShell" ID="checkStartProcessWithShell"></a>
+<h2>checkStartProcessWithShell</h2>
+<b>checkStartProcessWithShell</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for starting a process with a shell.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkSubprocessPopenWithShell" ID="checkSubprocessPopenWithShell"></a>
+<h2>checkSubprocessPopenWithShell</h2>
+<b>checkSubprocessPopenWithShell</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for use of popen with shell equals true.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="checkSubprocessPopenWithoutShell" ID="checkSubprocessPopenWithoutShell"></a>
+<h2>checkSubprocessPopenWithoutShell</h2>
+<b>checkSubprocessPopenWithoutShell</b>(<i>reportError, context, config</i>)
+
+<p>
+    Function to check for use of popen without shell equals true.
+</p>
+<dl>
+
+<dt><i>reportError</i> (func)</dt>
+<dd>
+function to be used to report errors
+</dd>
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+security context object
+</dd>
+<dt><i>config</i> (dict)</dt>
+<dd>
+dictionary with configuration data
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="getChecks" ID="getChecks"></a>
+<h2>getChecks</h2>
+<b>getChecks</b>(<i></i>)
+
+<p>
+    Public method to get a dictionary with checks handled by this module.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+dictionary containing checker lists containing checker function and
+        list of codes
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+<hr />
+<a NAME="hasShell" ID="hasShell"></a>
+<h2>hasShell</h2>
+<b>hasShell</b>(<i>context</i>)
+
+<p>
+    Function to check, if the node of the context contains the shell keyword.
+</p>
+<dl>
+
+<dt><i>context</i> (SecurityContext)</dt>
+<dd>
+context to be inspected
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing a flag indicating the presence of the 'shell'
+        argument and flag indicating the value of the 'shell' argument
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bool, bool)
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file

eric ide

mercurial