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.
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.
- 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-aiintentionally accepts it (tls_insecure_set(True)) because there is no trust anchor available — this is by design for LAN-only use. bambulabs_api2.6.x has been the upstream MQTT/FTP client during initial development. Track its advisories.
- From the printer's screen: Settings → WLAN → tap connected network → regenerate Access Code (or factory-reset the WLAN settings).
- Update your
.env. - 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.