Security hardening for bit Boilerplate's sign-in codes, sessions, chatbot, push, uploads, token storage and CD
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C#
- スター
- 1.4k
- フォーク
- 264
- 平均マージ
- 13時間 15分
- マージ済み PR(30日)
- 344
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bitfoundation/bitplatform のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bitfoundation/bitplatform#14070 ·
メンテナーはふだん 1 日以内に返信
-
BitSwipeTrap sets itself up again on every render while its first setup is pending対応中かも @yasmoradi が今日担当しました。 オープン
bitfoundation/bitplatform#14143 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bit BlazorUI's trimming tests fail on Linux対応中かも @yasmoradi が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bitfoundation/bitplatform#14132 ·
メンテナーはふだん 1 日以内に返信
-
BbScanner improvements対応中かも @msynk が 1 日前に担当しました。 オープンarea / bbscanner
bitfoundation/bitplatform#14128 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
BitTimeZonePicker builds its whole time zone list while it is closed対応中かも @yasmoradi が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
bitfoundation/bitplatform#14125 ·
メンテナーはふだん 1 日以内に返信
bitfoundation/bitplatform の issue をすべて見る
似ている issue
-
area-multitenancy area-security p1-recommended priority-high technical-debt
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
help wanted needs-unity ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eyalgolan/statecraft-israel#1542 ·
メンテナーはふだん 1 日以内に返信
-
kind/enhancement Provider Upgrade pulumi/pulumi-azure R1 Task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
pulumi/pulumi-azure#3669 ·
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信