Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 669 Bytes

B104.md

File metadata and controls

27 lines (17 loc) · 669 Bytes

Pattern: Possible binding to all interfaces

Issue: -

Description

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 rule looks for a string pattern 0.0.0.0 that may indicate a hardcoded binding to all network interfaces.

Example of insecure code:

s.bind(('0.0.0.0', 8080))

Example of secure code:

s.bind(('192.168.0.1', 8080))

Further Reading