Skip to content

Security: abe238/bambu-ai

Security

SECURITY.md

Security policy

Reporting a vulnerability

If you find a security issue in bambu-ai, please open a private security advisory on GitHub: https://github.com/abe238/bambu-ai/security/advisories/new. Do not file a public issue for security bugs.

Expect an acknowledgment within 7 days.

Secret handling — what bambu-ai treats as sensitive

This project talks to a 3D printer that is auth'd by an Access Code. The Access Code is the only thing standing between someone on your LAN and full control of the printer (start prints, change temps, push G-code). Treat it like a password.

The following values are kept out of git and never logged to stdout:

Value Why it's sensitive
ACCESS_CODE Auth credential — full printer control
NTFY_TOPIC ntfy.sh is unauthenticated; the topic name is effectively a shared secret
ANTHROPIC_API_KEY (optional, [vision]) Anthropic API credential
Printer LAN IP Reveals home subnet layout
Printer serial Identifies your specific device

All five live in .env, which is in .gitignore. .env.example ships only placeholder values. A pre-commit hook (see issue #19) blocks commits that match these patterns.

What the LAN protocol does not protect against

  • Anyone on your local network with the Access Code can fully control the printer. Don't expose port 8883 to the public internet.
  • The MQTT broker on the printer uses a self-signed certificate. bambu-ai intentionally accepts it (tls_insecure_set(True)) because there is no trust anchor available — this is by design for LAN-only use.
  • bambulabs_api 2.6.x has been the upstream MQTT/FTP client during initial development. Track its advisories.

What to do if you accidentally leak your Access Code

  1. From the printer's screen: Settings → WLAN → tap connected network → regenerate Access Code (or factory-reset the WLAN settings).
  2. Update your .env.
  3. If the code appeared in a public commit, rewrite that history (git filter-repo) and force-push. Edits to issue comments are NOT sufficient — GitHub preserves edit history.

There aren't any published security advisories