mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-09-30 11:51:46 +02:00
fix(fix(security): bind server to 127.0.0.1 instead of 0.0.0.0 by default):
This commit is contained in:
1 parent
7b8d238254
commit
6dcda7c931
2 files changed
+4
-4
No files matched your search
@@ -10,13 +10,13 @@ from agentic_security.misc.banner import init_banner
|
|||||||
|
|
||||||
|
|
||||||
class CLI:
|
class CLI:
|
||||||
def server(self, port: int = 8718, host: str = "0.0.0.0"):
|
def server(self, port: int = 8718, host: str = "127.0.0.1"):
|
||||||
"""
|
"""
|
||||||
Launch the Agentic Security server.
|
Launch the Agentic Security server.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
port (int): Port number for the server to listen on. Default is 8718.
|
port (int): Port number for the server to listen on. Default is 8718.
|
||||||
host (str): Host address for the server. Default is "0.0.0.0".
|
host (str): Host address for the server. Default is "127.0.0.1".
|
||||||
"""
|
"""
|
||||||
sys.path.append(os.path.dirname("."))
|
sys.path.append(os.path.dirname("."))
|
||||||
config = uvicorn.Config(
|
config = uvicorn.Config(
|
||||||
@@ -34,7 +34,7 @@ class CLI:
|
|||||||
sys.path.append(os.path.dirname("."))
|
sys.path.append(os.path.dirname("."))
|
||||||
SecurityScanner().entrypoint()
|
SecurityScanner().entrypoint()
|
||||||
|
|
||||||
def init(self, host: str = "0.0.0.0", port: int = 8718):
|
def init(self, host: str = "127.0.0.1", port: int = 8718):
|
||||||
"""
|
"""
|
||||||
Generate the default CI configuration file.
|
Generate the default CI configuration file.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class SettingsMixin:
|
|||||||
return default
|
return default
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def generate_default_settings(self, host: str = "0.0.0.0", port: int = 8718):
|
def generate_default_settings(self, host: str = "127.0.0.1", port: int = 8718):
|
||||||
# Accept host / port as parameters
|
# Accept host / port as parameters
|
||||||
with open(self.default_path, "w") as f:
|
with open(self.default_path, "w") as f:
|
||||||
f.write(
|
f.write(
|
||||||
|
|||||||
Reference in new issue
Block a user