ó
    >›/i  ã                   ó‚   • S r SSKrSSKJr  SSKJr  \R                  " S5      \R                  " S5      S 5       5       rg)aî  
==============================================
B601: Test for shell injection within Paramiko
==============================================

Paramiko is a Python library designed to work with the SSH2 protocol for secure
(encrypted and authenticated) connections to remote machines. It is intended to
run commands on a remote host. These commands are run within a shell on the
target and are thus vulnerable to various shell injection attacks. Bandit
reports a MEDIUM issue when it detects the use of Paramiko's "exec_command"
method advising the user to check inputs are correctly sanitized.

:Example:

.. code-block:: none

    >> Issue: Possible shell injection via Paramiko call, check inputs are
       properly sanitized.
       Severity: Medium   Confidence: Medium
       CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
       Location: ./examples/paramiko_injection.py:4
    3    # this is not safe
    4    paramiko.exec_command('something; really; unsafe')
    5

.. seealso::

 - https://security.openstack.org
 - https://github.com/paramiko/paramiko
 - https://www.owasp.org/index.php/Command_Injection
 - https://cwe.mitre.org/data/definitions/78.html

.. versionadded:: 0.12.0

.. versionchanged:: 1.7.3
    CWE information added

é    N)Úissue)Útest_propertiesÚCallÚB601c                 ó  • SnS Hx  nU R                  U5      (       d  M  U R                  S;   d  M-  [        R                  " [        R                  [        R                  [
        R                  R                  US9s  $    g )NzPPossible shell injection via Paramiko call, check inputs are properly sanitized.)Úparamiko)Úexec_command)ÚseverityÚ
confidenceÚcweÚtext)Úis_module_imported_likeÚcall_function_nameÚbanditÚIssueÚMEDIUMr   ÚCweÚOS_COMMAND_INJECTION)ÚcontextÚ
issue_textÚmodules      Ú[/home/james-whalen/.local/lib/python3.13/site-packages/bandit/plugins/injection_paramiko.pyÚparamiko_callsr   0   sg   € ð	"ð ó ˆØ×*Ñ*¨6×2Ó2Ø×)Ñ)Ð-=Õ=Ü—|’|Ü#Ÿ]™]Ü%Ÿ}™}ÜŸ	™	×6Ñ6Ø#ñ	ò ò ó    )	Ú__doc__r   Úbandit.corer   r   ÚtestÚchecksÚtest_idr   © r   r   Ú<module>r!      sD   ðñ
%óL Ý Ý /ð ‡‚ˆVÓØ‡‚ˆfÓñó ó ñr   