
    >/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  
========================================
B104: Test for binding to all interfaces
========================================

Binding to all network interfaces can potentially open up a service to traffic
on unintended interfaces, that may not be properly documented or secured. This
plugin test looks for a string pattern "0.0.0.0" that may indicate a hardcoded
binding to all network interfaces.

:Example:

.. code-block:: none

    >> Issue: Possible binding to all interfaces.
       Severity: Medium   Confidence: Medium
       CWE: CWE-605 (https://cwe.mitre.org/data/definitions/605.html)
       Location: ./examples/binding.py:4
    3   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    4   s.bind(('0.0.0.0', 31137))
    5   s.bind(('192.168.0.1', 8080))

.. seealso::

 - https://nvd.nist.gov/vuln/detail/CVE-2018-1281
 - https://cwe.mitre.org/data/definitions/605.html

.. versionadded:: 0.9.0

.. versionchanged:: 1.7.3
    CWE information added

    N)issue)test_propertiesStrB104c                     U R                   S:X  aK  [        R                  " [        R                  [        R                  [        R
                  R                  SS9$ g )Nz0.0.0.0z#Possible binding to all interfaces.)severity
confidencecwetext)
string_valbanditIssueMEDIUMr   CweMULTIPLE_BINDS)contexts    d/home/james-whalen/.local/lib/python3.13/site-packages/bandit/plugins/general_bind_all_interfaces.pyhardcoded_bind_all_interfacesr   +   sF     Y&||]]}}		((6	
 	
 '    )	__doc__r   bandit.corer   r   testcheckstest_idr    r   r   <module>r      sD   
 B   / Uf
  
r   