
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@mcpolyglot/security
Advanced tools
Non-bypassable security middleware for mcpolyglot: scopes, redaction, audit, rate-limit, and untrusted-data wrapping.
The non-bypassable security middleware for mcpolyglot. Implements every phase of the pipeline that wraps tool calls in @mcpolyglot/core.
checkScopes — refuses tools whose required scopes aren't in the granted set.RateLimiter — token bucket per session per tool, plus a max-concurrent gate.Redactor — built-in regex set (emails, JWTs, AWS access keys, GitHub tokens, SSNs, credit-card numbers) plus per-table column deny lists.AuditLogger: append-only JSONL audit sink. See Audit log.Every tool call writes one entry, including calls that were denied or failed:
{
"ts": "…",
"sessionId": "…",
"agentId": "claude-code",
"tool": "pg.main.query",
"decision": "deny",
"reason": "Table \"secrets\" is not accessible under this policy.",
"argsHash": "3f9c…",
"scopes": ["…"],
"durationMs": 4,
"rows": 0,
"error": { "code": "forbidden.policy", "message": "…" }
}
agentId is the x-mcpolyglot-agent request header (HTTP), else the MCP client's clientInfo.name.decision: allow, deny (policy, scope, rate limit or timeout), or error (anything else).audit.path: an append-only file.audit.webhookUrl: a best-effort POST. Failures go to stderr, never fail the call, and never echo the URL.reason and error text are scrubbed of scheme://user:pass@ credentials and the built-in redaction patterns (email, JWT, keys, …), then truncated to 500 chars.O_APPEND. Tamper-evidence (hash chains, WORM storage) is out of scope; ship to a webhook or your log pipeline for that.audit: { console: true, path: '~/.mcpolyglot/audit.log', webhookUrl: '${env:AUDIT_WEBHOOK}' }
Tests: src/__tests__/audit.test.ts (sinks, scrubbing) and packages/core/src/__tests__/audit.test.ts (decision, agent id, no raw args or rows).
wrapUntrusted / enforceSize — <mcpolyglot-data> prompt-injection wrapper and a hard byte cap on serialized output.defaultSecurityHooks(opts) — composes all of the above into the SecurityHooks shape McpolyglotServer expects.Connectors, the CLI, and any embedding host all need to construct the security hooks the same way. Keeping them in one package makes that boring and reviewable.
MIT licensed.
FAQs
Non-bypassable security middleware for mcpolyglot: scopes, redaction, audit, rate-limit, and untrusted-data wrapping.
We found that @mcpolyglot/security demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.