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

Thu, 04 Jan 2024 18:02:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 04 Jan 2024 18:02:25 +0100
branch
eric7
changeset 10479
856476537696
parent 9325
8157eb19aba5
permissions
-rw-r--r--

Fine tuned the source code documentation template and regenerated the source code documentation.

<!DOCTYPE html>
<html><head>
<title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.injectionShell</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</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>
flag indicating the value of the 'shell' argument
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial