Skip to content

Commit 2c7d7a9

Browse files
memosrteknium1
authored andcommitted
fix(security): bind Meet node server to localhost and restrict token file to owner read
1 parent cdde0c8 commit 2c7d7a9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

plugins/google_meet/node/server.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class NodeServer:
4343

4444
def __init__(
4545
self,
46-
host: str = "0.0.0.0",
46+
host: str = "127.0.0.1",
4747
port: int = 18789,
4848
token_path: Optional[Path] = None,
4949
display_name: str = "hermes-meet-node",
@@ -76,6 +76,13 @@ def ensure_token(self) -> str:
7676
json.dumps({"token": tok, "generated_at": time.time()}, indent=2),
7777
encoding="utf-8",
7878
)
79+
# Restrict to owner-read-write only — the token grants full RPC
80+
# access to the meet bot (start, transcribe, speak in meetings).
81+
try:
82+
tmp.chmod(0o600)
83+
except (OSError, NotImplementedError):
84+
# Best-effort on non-POSIX filesystems; mode is set on POSIX.
85+
pass
7986
tmp.replace(self.token_path)
8087
self._token = tok
8188
return tok

0 commit comments

Comments
 (0)