MCPTap v2.0.0 #3
pczerkas
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Changelog
[2.0.0]
Added
openat2interception (Linux 5.6+) — the LD_PRELOAD file-block librarynow intercepts
openat2via a raw syscall wrapper (glibc has noopenat2wrapper) and exports the
openat2()symbol for direct-link compatibility.exec*interceptors to close the setuid escape vector —execve,execv,execvp,execvpe,posix_spawn, andposix_spawnpare nowintercepted in the parent process. The library scans
argvbefore the childis spawned, blocking arguments that resolve to a blocked path. This closes the
escape vector where
glibcdropsLD_PRELOADfor setuid binaries (sudo,su,doas,pkexec, …), sosudo cat <blocked>is refused whileunrelated
sudocalls are still allowed.argv[0]isa privilege-escalator and a later argument is an interpreter (
bash,sh,python3,perl,xargs,dd, …), the concatenated payload is searchedfor a blocklist path as a substring (with
~expanded anywhere). This blockssudo bash -c 'cat ~/.fzf-history'without affecting legitimate uses likesudo bash -c 'systemctl restart nginx'. Configurable via:MCPTAP_FB_ESCALATORS— override the default escalator listMCPTAP_FB_INTERPRETERS— override the default interpreter listMCPTAP_FB_DISABLE_ESCALATOR_CHECK=1— disable the layer entirelyresolved via
realpath, so./,../, and symlink aliases can no longerbypass the blocklist.
interceptors (
openat,openat2,open64,fopen64,statx,faccessat,…), Python-level interceptors (
access,lstat,readlink,realpath,shutil.copy2), blocklist parsing, dynamic blocklist updates, andtool-level blocking (
cp,mv,dd, directory blocking).setup.sh— the "Installation complete" section isshown in green; errors (
die(), unknown options, diagnostic heredocs) areshown in red. Colors are gated on TTY detection (no color when piped).
hook=status in per-request log — the INFO log line now includeshook=True/Falsealongsideintercept=....Changed
loop now runs when either MCP tool interception or the tool-call hook
(
MCP_TAP_USE_TOOL_HOOK) is enabled. Previously the hook was silentlydisabled when
MCP_TAP_INTERCEPT_YAMLwas empty. The two features areindependent: the hook can gate client tool calls and write
blocked_filesfor the LD_PRELOAD library even without any MCP intercept config.
--with-file-blockwires both settings —wire_file_block_in_proxy_envnow enables both
MCP_TAP_USE_TOOL_HOOKandMCP_TAP_FILE_BLOCK_LIBinproxy.env(previously only the library path was wired). The wiring runs onevery
--with-file-blockinvocation, not only on new installations./tmp/mcptap/per_session_idto
/tmp/mcptap/per_sessionto match the directory actually created by theproxy.
LD_PRELOADisapplied at command launch (
LD_PRELOAD=… codex …) rather than throughproxy.env. The exampleproxy.envno longer containsMCP_TAP_FILE_BLOCK_LIB.use_tool_hook.pysimplified — the hook now consistentlyreturns an
allowaction while preserving the sensitive-file block list,instead of reading stdin and applying resource-based blocking.
/home/user/placeholder substitution — during installation,sedreplaces all
/home/user/occurrences in copied example config files withthe real
$HOMEpath.(stdin/heredoc payloads, obfuscated paths, path-normalization aliases),
the setuid escape vector, and the escalator/interpreter configuration
environment variables.
Fixed
syscall()interceptorforwarded all non-
openat2syscalls throughva_argwith 6 arguments,corrupting argument passing for syscalls with fewer arguments. This caused
Electron/Node.js (used by
code --locate-extensionin the Codex wrapper) todeadlock on
getrandom/futex/thread synchronization. Thesyscall()interceptor has been removed entirely; the exported
openat2()wrappersymbol is retained.
LC_ALL=Cis now set in thetest environment to ensure English error messages.
Removed
syscall()interceptor — removed because it brokeElectron/Node.js (see Fixed above). Raw
syscall(__NR_openat2, …)is nolonger intercepted; programs linking against the
openat2()wrapper symbolare still intercepted.
Full Changelog
v1.3.0...v2.0.0
This discussion was created from the release MCPTap v2.0.0.
All reactions