Repository navigation
v0.13.4
Security
-
POSTGRES_MCP_SANDBOXno longer turns itself off without a word; when
the sandbox cannot be applied, the launcher refuses to start (#41). Four
paths left an operator believing they were sandboxed when they were not, and
none of them printed anything.- The value. Only the exact value
1enabled the sandbox, sotrue,
1andTRUEran unsandboxed. It now reads like the audit variables:
1ortrueon,0,falseoroffoff, trimmed and case-insensitive.
Any other value (yes,on) stops the launcher with a message naming the
accepted ones. So does a value that is set but empty or only whitespace,
as the audit variables have done since 0.13.3: that is what
"POSTGRES_MCP_SANDBOX": "${SANDBOX}"becomes when the variable is unset
where the MCP client runs, and reading it as unset ran the server
unsandboxed for an operator who had asked for the sandbox. Only a variable
that is not set at all counts as unset. - The runtime.
POSTGRES_MCP_RUNTIME=node, no usable oam underauto,
and an oam that failed to spawn all served without--permission-- in
the launcher's own process, or handed off to Node -- with no message at all
when no oam existed. Each now refuses, in every mode and on every host,
with the fix named. - The network grant. An unset
DATABASE_URL, a URL with no host
(postgres:///dbleaning onPGHOST,postgres://u@/db), a host list
with ports, or anythingnew URL()rejected produced a bare--allow-net:
every host on the internet.postgres://h1,h2/dbproduced
--allow-net=h1,h2:5432, which oam reads ash1on every port plus
h2:5432. And?host=,?port=,PGPORTand percent-encoded hosts were
ignored, which denied working setups their own database. The grant is now
the onehost:portthe pg driver dials, resolved the driver's way --
?host=/?port=, then the URL, thenPGHOST/PGPORT, then
localhost:5432-- and the suite checks it against the bundled pg on
thousands of generated connection strings. WithDATABASE_URLunset no
--allow-netis passed at all, so every connection is denied and the
server reports the missing variable as it does unsandboxed. A Unix socket,
a host list, a port outside 1-65535, a host an exact grant cannot match, or
an unreadable or non-postgres://URL now refuses;DATABASE_URLis never
printed. - Windows. An allowlisted variable spelled in another case (
pghost,
postgres_audit_log) reached the launcher, because Node reads names
case-insensitively there, and was then stripped from the sandboxed server,
because oam matches them exactly -- so a lower-case audit variable silently
switched the audit trail off. Each is now passed in its exact spelling.
Upgrading: this stops setups that only appeared to be sandboxed: the
sandbox set with no usable oam underauto, with
POSTGRES_MCP_RUNTIME=node, to a value such asyes, or to an empty value.
Each now gets a message naming the fix; removePOSTGRES_MCP_SANDBOXor set
it to0to keep running without it. - The value. Only the exact value