Your application should not listen on all interfaces

이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

ID: python-flask/listen-all-interfaces

Language: Python

Severity: Notice

Category: Security

CWE: 668

Description

Avoid giving access to your resources to all connected interfaces. Instead, bind the resources on a specific interface. Running the server on 0.0.0.0 exposes the server publicly.

Learn More

Non-Compliant Code Examples

#ruleid:avoid_app_run_with_bad_host
app.run(host="0.0.0.0")

#ruleid:avoid_app_run_with_bad_host
app.run("0.0.0.0")

Compliant Code Examples

#ruleid:avoid_app_run_with_bad_host
app.run(host="192.168.10.4")

#ruleid:avoid_app_run_with_bad_host
app.run("192.168.10.4")