fix(webhooks): Ignore the local-webhook escape hatch on mainnet and read it through one helper
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design, security
Direzione di ricerca
Start with the two environment variable reads in crates/webhooks/src/lib.rs and the startup checks and tests in bin/server/src/mainnet_guard.rs. Trace how the server determines whether it is on mainnet, then read the related documentation in docs/environment-variables.md and docs/threat-model.md. Done means one helper serves both reads, startup rejects the override on mainnet with a test, and both docs explain the development and tests only restriction.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
OCTO_ALLOW_LOCAL_WEBHOOKS=1 disables the SSRF guard entirely and is read in two places in crates/webhooks/src/lib.rs (around lines 398 and 482). Nothing stops it from being set in production, and it is not in docs/environment-variables.md.
Requirements and context
- Where:
crates/webhooks/src/lib.rs,bin/server/src/mainnet_guard.rs,docs/environment-variables.md - Security: This variable turns off SSRF protection; on mainnet it must be impossible to enable by accident.
- Testing:
just fmt-check,just lintandjust testmust pass; add or update tests for the change. - Documentation: Document in
docs/environment-variables.mdanddocs/threat-model.md.
Suggested execution
- Comment on this issue to claim it, then fork the repository and branch from
main. - Branch name:
git checkout -b fix/webhooks-allow-local-mainnet
Implement changes
- Add one
allow_local_webhooks()helper and use it at both read sites. - Refuse to start on mainnet when the variable is set (add a message to
mainnet_guard.rs). - Document the variable as 'development and tests only'.
Test and commit
- Add a
mainnet_guardtest: variable set + mainnet = configuration error. - Run
just fmt,just lintandjust testlocally before pushing (seeCONTRIBUTING.md). - Commit with a conventional message and keep the change small and focused.
Example commit message
fix(webhooks): forbid local webhook override on mainnet
Guidelines
- Open the PR against
mainand link it withCloses #<this issue>. - Keep the diff focused on this issue; no unrelated refactors or formatting churn.
- One line per comment, no bloated code; follow patterns already used in the crate.
- Never commit secrets,
.envfiles or real keys; use public test vectors only. - CI (fmt, clippy
-D warnings, tests) must be green before requesting review. - Ask in the issue thread if anything is unclear before starting.
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 91
- Merge medio
- 5h 23m
- PR unite (30g)
- 4
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Octo-Protocol-org/Octo-Protocol
-
area/integration area/testing enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area/integration area/testing enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area/integration area/testing enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area/integration area/testing enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area/integration area/testing enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Octo-Protocol-org/Octo-Protocol#701 · 1 commento ·
Tutte le issue di Octo-Protocol-org/Octo-Protocol
Issue simili
-
macos parity priority: low ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
storytold/vectorcraft#8766 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or laterForse già presa @colinhacks l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tursodatabase/libsql#2333 ·
I maintainer di solito rispondono entro 11 giorni
-
area:plugins kind:perf priority:p3 ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
pbakaus/impeccable#1601 ·
I maintainer di solito rispondono entro 1 giorno