15 lines
576 B
Markdown
15 lines
576 B
Markdown
|
|
---
|
||
|
|
globs:
|
||
|
|
- "core/**/*.rs"
|
||
|
|
- "core/**/Cargo.toml"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Backend Rules (Archipelago — Rust)
|
||
|
|
|
||
|
|
- Backend binds `127.0.0.1` only — nginx handles external access
|
||
|
|
- Validate all input before path construction — reject `..`, `/`, null bytes
|
||
|
|
- Timeouts on all external operations (10s default, 30s for heavy like Bitcoin RPC)
|
||
|
|
- Use `anyhow::Result` for error propagation, not `.unwrap()` in handlers
|
||
|
|
- Log with `tracing`, never `println!` or `eprintln!` in production paths
|
||
|
|
- Container commands through `PodmanClient` (core/container/), never raw `Command::new("podman")`
|