Build Delivery MCP Server handles bot tokens, WhatsApp session credentials, and untrusted build artifacts on behalf of agencies and indie developers. Security issues here are real-world impact, not academic. We take them seriously.
This policy describes how to report a vulnerability, what we consider in scope, the response timelines we commit to, and the security guarantees the project itself enforces.
- Supported versions
- Reporting a vulnerability
- What's in scope
- What's out of scope
- Our response timeline
- Coordinated disclosure
- Built-in security guarantees
- Known risks accepted by design
- Operator hardening checklist
- Acknowledgements
Security fixes land on the latest minor release. Older minors are not patched.
| Version | Security fixes |
|---|---|
1.x (current) |
✅ Supported |
< 1.0 (pre-release) |
❌ No |
Once 2.x ships, 1.x will receive critical-severity fixes for 90 days, then be retired.
If you're running this in production, pin a tagged version, not main, and watch the Releases page for advisories.
Do not open a public GitHub issue for a security bug. Public issues create a window between disclosure and fix that attackers can exploit.
Use one of these private channels:
- Go to https://github.com/Razepriv/Build-Delivery-MCP-Server/security/advisories/new
- Fill in the template — affected versions, reproduction, impact.
- We'll be notified privately and respond within the timelines below.
Email raze.priv@gmail.com with subject [SECURITY] Build Delivery MCP — <short title>.
PGP encryption is welcome but not required. If you want a key, request one in the email and we'll exchange before any sensitive material is sent.
- Affected version (commit SHA, tag, or branch).
- Reproduction: minimal, runnable steps. A failing test is gold.
- Impact: what an attacker can do, what they need (network access, local access, a crafted APK, etc.).
- Suggested fix, if you have one — happy to credit you in the patch.
- Your preferred name and link for the acknowledgements section, or "anonymous" if you prefer.
Do not include real bot tokens, real WhatsApp session files, or real customer data in your report. If a token has been exposed, rotate it before sending us anything.
These categories receive priority response:
- Remote code execution through any MCP tool input or config file path.
- Arbitrary file read/write outside the configured staging and watch directories.
- Bot token / session token leakage in logs, tool responses, error messages, or transmitted payloads.
- Authentication bypass of any kind in WhatsApp session restoration or the MCP transport.
- Path traversal via
filePath,directory, or template-rendered filenames.
- Command injection in the
aapt/aapt2/bundletoolinvocation paths (src/utils/androidSdk.ts, parsers). - Zip-bomb / malicious APK that crashes or hangs the parser/watcher in a way that takes down the server.
- Insecure deserialisation of
config.jsonor session blobs. - Cryptographic weaknesses in any future credential-storage code (we don't roll our own crypto today, but watch for it).
- Denial of service with a small, single-shot input.
- TOCTOU bugs in the file watcher / staging / cleanup pipeline.
- Race conditions that cause the same build to be delivered multiple times, or to the wrong recipient.
- Resource exhaustion through unbounded log files, history retention, or session-cache growth.
- Information disclosure of internal paths, profile names, or non-secret config in error messages returned to MCP clients.
- Missing security headers / hardening in any future HTTP surface (none today; if added, this becomes High).
- Unvalidated user input in non-tool surfaces (the wizard, env-var parsing) where the impact is bounded to the local operator.
- Outdated dependencies with known CVEs that aren't actually exploitable in our usage.
These are not security issues for the purposes of this policy. We're happy to discuss them as feature requests or operational concerns, but they don't qualify for the security disclosure track.
whatsapp-web.jsToS risk. Usingwhatsapp-web.jsviolates Meta's WhatsApp Terms of Service. This is a product trade-off documented in the PRD, not a vulnerability. See Known risks accepted by design.- Telegram bot 50MB cap. This is an upstream limit, not a bug.
- Self-DOS via misconfiguration. Running the server with broken config, missing dependencies, or a watch directory pointing at
/is operator error. - Vulnerabilities in upstream dependencies that haven't been triaged for our specific use. Run
npm auditand open a regular issue if the dep needs bumping. - Local privilege escalation by an attacker who already has the same user as the server process. The threat model assumes the local user is trusted.
- Social-engineering of the operator to scan a malicious WhatsApp QR code. We can't fix that from inside the server.
If you're not sure whether something is in scope, report it privately anyway and let us decide. Better safe than the alternative.
We commit to:
| Event | Target |
|---|---|
| Acknowledge receipt of report | 72 hours |
| Initial triage + severity assignment | 7 days |
| Patch ready for Critical severity | 14 days |
| Patch ready for High severity | 30 days |
| Patch ready for Medium / Low severity | 90 days |
| Public disclosure after patch | +14 days (negotiable) |
If we're going to miss any of these, we'll tell you and explain why.
The default is coordinated disclosure:
- You report privately.
- We acknowledge, triage, and develop a fix.
- We release a patched version with a CVE if warranted.
- We publish a security advisory crediting you (unless you opt out).
- The advisory includes a workaround for operators who can't upgrade immediately.
We will not disclose your identity or report contents without your consent.
If a vulnerability is being actively exploited in the wild, we may shorten the timeline and publish the advisory with a fix or workaround as soon as one exists, even if not all operators have upgraded. We'll tell you before we do.
These are properties the codebase enforces today. If you find a way to break any of them, that's an in-scope vulnerability.
- Tokens are truncated to 10 chars before being logged or returned in MCP tool responses (
truncateSecret()insrc/utils/logger.ts). Full tokens exist only inconfig.jsonon the operator's local disk. - Winston is configured with a redaction format that scrubs known secret-key fields (
botToken,token,sessionToken,password,apiKey) from log output. .env,config.json,.wwebjs_auth/, andlogs/are in.gitignoreby default. Adding any of them to git is treated as a Critical security issue.
- Every MCP tool handler validates input with
zodbefore any filesystem or network call. Validation failures return a structured error and never side-effect. - Schema is the single source of truth. Public types in
src/types.tsand validation schemas insrc/config/schema.ts/src/tools/schemas.tsdefine every shape the server accepts.
- The original build file is never mutated or deleted. The pipeline copies to staging, delivers, and cleans up staging only. Asserted by
tests/smoke/e2e-pipeline.ts. - Filename sanitisation is applied to template-rendered names: app names lowercase to alphanumeric+underscore, version preserves dots/dashes only, generic fields strip path-unsafe characters.
- Collision handling uses
_1,_2, … suffixes — never overwrites an existing file in staging.
aapt,aapt2, andbundletoolare resolved at runtime fromANDROID_HOMEand a small allowlist of platform-specific defaults. The path is never user-supplied; the binary name is hardcoded.execFileis used (notexec), so user-controlled inputs cannot be interpreted as shell metacharacters.maxBufferandtimeoutare bounded on every tool invocation (64 MB,30s).
- stdout is reserved for MCP JSON-RPC. Logs and human-readable output go to stderr. A bug that prints anything to stdout is treated as a Critical issue (it corrupts the protocol stream).
- Telegram delivery uses
telegrafwith a default 120s timeout per document. - WhatsApp delivery uses
whatsapp-web.jswithpuppeteerin headless+sandboxed mode (--no-sandbox --disable-setuid-sandboxare deliberately disabled to allow operation in containers; if you need stronger isolation, run the server inside its own container). - No outbound HTTP/HTTPS calls are made except by these two libraries to their respective APIs. We do not phone home.
These are deliberate product trade-offs, not vulnerabilities. They're documented here so reporters know not to file them.
The WhatsApp delivery channel uses the unofficial whatsapp-web.js library, which scrapes WhatsApp Web. This violates Meta's WhatsApp Terms of Service. Meta has been known to ban accounts that use it.
Mitigation: Operators are warned in the PRD (§16) and the README. A future SaaS deployment will swap to Meta Cloud API. For now, the trade-off (zero setup friction for agencies) is accepted.
The LocalAuth strategy persists session credentials to ./.wwebjs_auth/<profile>/. Anyone with read access to that directory can hijack the WhatsApp session.
Mitigation: .wwebjs_auth/ is in .gitignore. Operators are responsible for filesystem permissions on the directory hosting the server. Don't run the server on a multi-tenant machine where untrusted users have read access.
To avoid prompting on every startup, config.json stores Telegram bot tokens at rest in plaintext.
Mitigation: config.json is in .gitignore. Operators can use environment variables instead, which gives them OS-level credential management. A future version may add an encrypted-at-rest config option (see roadmap, Phase 5 enterprise features).
The watcher hands every APK in the watched directory to aapt/aapt2. A malicious APK could potentially exploit a bug in those binaries. We do not parse the APK ourselves.
Mitigation: We rely on the security posture of Android SDK build-tools. The parser falls back to filename heuristics if the tool fails or crashes. The pipeline is single-shot per file — a parser crash does not affect other builds. If you discover a bug in aapt itself, report it to Google.
If you're running this server in a production-ish setting, work through this checklist:
- Pin a tagged release, not
main. Watch the Releases page for advisories. - Run on a dedicated machine or container. Don't share with untrusted workloads.
- Restrict filesystem permissions on the project directory (especially
config.jsonand.wwebjs_auth/) to the user running the server. - Use a separate Telegram bot per project / per profile. Don't share bot tokens across deployments.
- Use a dedicated WhatsApp number for QR sessions if you can. A burner SIM in a spare phone is the safest pattern.
- Rotate bot tokens periodically and immediately if anyone unauthorised had access to
config.json. - Set
LOG_LEVEL=info(the default) in production.debuglogs more detail than you want in long-term storage. - Rotate
logs/regularly. Uselogrotateor equivalent. - Backup
.wwebjs_auth/if you depend on it — losing it means re-scanning the QR. - Don't expose stdio or any port from the MCP server to a network. This is a local tool; it doesn't bind a TCP port. If you wrap it in something that does, you take responsibility for that surface.
- Review
package-lock.jsonon every dependency bump. Runnpm audit. Treat new vulnerabilities as a triage event.
This section will list reporters who have responsibly disclosed security issues.
- (none yet — be the first)
If you'd like to be added (or omitted, or anonymised), tell us in your report.
- GitHub Security Advisories: https://github.com/Razepriv/Build-Delivery-MCP-Server/security/advisories/new
- Email:
raze.priv@gmail.com - Subject prefix:
[SECURITY] Build Delivery MCP — <short title>
Last updated: 2026-04-25.