Security hardening for bit Boilerplate's sign-in codes, sessions, chatbot, push, uploads, token storage and CD
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #14114 di @yasmoradi — integrata
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
Direzione di ricerca
The issue lists findings across server, clients, and pipelines, and links open pull request #14114. Start by reviewing that pull request and its changed files to see which findings are already being addressed. The issue does not name tests or specific files; done would require resolving the listed security findings across the affected areas.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A security review of bit Boilerplate found the problems below.
Server
- The security stamp is inside every access, refresh and OAuth token, and the 6-digit codes (OTP, magic link, reset password, step-up, phone/email 2FA) are TOTP codes keyed on that stamp. Anyone who can read a token can compute the user's codes.
- The phone/email 2FA code uses the fixed
TwoFactorpurpose, so one code stays valid for its whole TOTP window and works more than once. - The AI chat has no limit on message length, answer length or how often one user or IP can chat, so a single caller can run up the AI bill.
- A web push subscription's
Endpointcan be any URL, and the server POSTs to it through an HttpClient that follows redirects and resolves service discovery names (SSRF). The push endpoints have no rate limit either. - A SignalR connection keeps working for its session after the session is revoked or the security stamp changes.
- Resetting the password of an account with 2FA on only needs the code sent to email or SMS, so whoever controls the inbox or the SIM takes the account over.
- Uploaded images go to whatever ImageMagick coder matches them (SVG, PS, PDF, ...), and the
*Originalkinds are served back in the uploaded format. - The send-token endpoints answer
UserNotFoundfor unknown identifiers and sign-up answersDuplicateEmailOrPhoneNumber, so anyone can check which emails and phone numbers have accounts.
Clients
- Tokens are stored in plain text: MAUI keeps them in
Preferences(which Android backs up) and Windows in a plain JSON file. - Other browser tabs don't notice a sign-in, a sign-out or a user change. A tab can keep showing user A while its API calls carry user B's token.
- Signing in while already signed in (for example by opening a magic link) leaves the old session behind. It stays in the sessions list and can hold a privileged session slot for 14 days.
- A token refresh that completes after a sign-out writes the tokens back, so the user is signed in again.
- When a connection goes straight from user A to user B,
AppHubleaves the connection id on A's session too, so A's OTP,PROFILE_UPDATEDandSESSION_REVOKEDmessages reach B. SESSION_REVOKEDcarries no session id, so the client signs out whoever is current, andPROFILE_UPDATEDis applied without checking the user id.
Pipelines
cd-production.ymldeploys every push tomainwithout running the tests, and nothing applies EF migrations outside Development.- The pipelines, the dev container and the docs install
Bit.Cliwith--prerelease.
- Lingua principale
- C#
- Stelle
- 1.4k
- Fork
- 264
- Merge medio
- 10h 31m
- PR unite (30g)
- 405
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 bitfoundation/bitplatform
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bitfoundation/bitplatform#14428 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bitfoundation/bitplatform#14070 ·
I maintainer di solito rispondono entro 1 giorno
-
Add end-to-end tests that the lazy-loadable utility libraries work in a published, trimmed WebAssembly appForse già presa @msynk l’ha presa oggi. Apertaarea / infra
bitfoundation/bitplatform#14427 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Fix security issues in bit BrouterForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 4/5 1-2 giorni Idoneità per principianti 15/100
bitfoundation/bitplatform#14404 ·
I maintainer di solito rispondono entro 1 giorno
-
Fix security issues in bit BswupForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
bitfoundation/bitplatform#14403 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bitfoundation/bitplatform
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area: core priority: low type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
RicoSuter/Namotion.Interceptor#863 ·
I maintainer di solito rispondono entro 1 giorno
-
area-cli
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
0.3.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 2 giorni