You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passe de durcissement sécurité : auth, RLS, XSS, CSRF.
Suivi interne, pas d'appel à contribution publique et aucune prime rattachée à ce ticket. Les PR externes non sollicitées qui « claim » ce scope ne seront pas récompensées.
Premier correctif RLS (exposition users/donations via la clé anon) : voir #196.
Submitted PR #188 for the security/RLS bounty scope: #188
Summary:
Direct users table reads were effectively public because the RLS SELECT policy included OR true, while the table contains email, reader preferences, location, reading stats, supporter flags, timestamps, and other account metadata.
The PR changes direct users reads to owner-only and adds a public_user_profiles view for safe public profile rendering.
It also splits public read policies from owner-only write/delete policies for reading lists and annotations so public rows are not eligible for mutation if grants are present.
Validation notes are in the PR. I kept the change scoped to database/schema.sql.
Submitted PR #191 for the RLS/security bounty scope: #191
Summary:
collections contains curator-owned draft fields and organization-scoped B2B metadata (curator_user_id, is_published, organization_id), but RLS was not enabled.
collection_books can expose the contents and notes of those collections.
The PR enables RLS for both tables, limits direct public reads to published public-catalog collections, and gates writes through curator ownership.
Validation: git diff --check; runtime schema apply not run locally because this environment has no docker or psql.
Submitted a second non-overlapping PR for the RLS/security bounty scope: #192
Summary:
authors.organization_id and books.organization_id are documented for future B2B tenant rows (NULL = public catalog), but the catalog tables and public catalog view did not enforce that boundary.
The PR enables RLS on the catalog tables and limits direct client reads to public-catalog books/authors and their derived translations/files/ISBN/category links.
It also makes the catalog views security-invoker and filters the catalog dashboard to public-catalog rows so tenant-scoped rows are not exposed through views.
Validation: git diff --check; runtime schema apply not run locally because this environment has no docker or psql.
Submitted a third non-overlapping PR for the RLS/security bounty scope: #193
Summary:
affiliate_retailers contains partner tags, commission rates, inactive routing config, and operator notes, but direct public API access was not guarded by RLS.
The PR enables RLS for affiliate_retailers and intentionally adds no anon/auth policy, keeping direct table access closed while trusted server/service-role code can still manage affiliate URL generation.
It also marks v_affiliate_performance as security_invoker so the revenue/performance dashboard view respects caller RLS instead of bypassing table protections by default.
Validation: git diff --check; pnpm --filter @librarfree/db typecheck could not run because this checkout has no node_modules/tsc; runtime schema apply not run locally because this environment has no psql or docker.
Submitted another non-overlapping hardening PR for the security bounty scope: #194
Summary:
public.handle_new_auth_user() is a SECURITY DEFINER trigger function used by the Supabase auth sync path.
The PR pins its search_path to public, pg_temp, keeping privileged object lookup deterministic and reducing schema/object hijacking risk if future edits add unqualified references.
Validation: git diff --check; pnpm --filter @librarfree/db typecheck could not run because this checkout has no node_modules/tsc; runtime schema apply not run locally because this environment has no psql or docker.
Submitted another non-overlapping RLS hardening PR for the security bounty scope: #195
Summary:
donations allowed direct SELECT for every anonymous = FALSE row, exposing row-level donation data through the raw table.
Those rows include Stripe payment/subscription identifiers, linked user ids, donor messages/display names, campaign metadata, amounts, and timestamps.
The PR makes direct donation table reads owner-only and leaves public transparency to aggregate/safe views such as v_transparency_monthly.
Validation: git diff --check; pnpm --filter @librarfree/db typecheck could not run because this checkout has no node_modules/tsc; runtime schema apply not run locally because this environment has no psql or docker.
Payout/channel clarification before I do additional security-bounty work here:
I have submitted non-overlapping hardening PRs #191, #192, #193, #194, and #195 under this issue scope. The issue says rewards are €50-500 and references “Huntr ou GitHub Security,” but I do not see a specific payout/reporting channel in the issue text.
If any of these PRs are accepted, should payout coordination happen directly in this GitHub issue/PR thread, through GitHub Security/Huntr, or another maintainer-preferred channel? I will hold off on further slices until the payment path is clear.
Activity
legalverb commentedon May 11, 2026
Submitted PR #188 for the security/RLS bounty scope: #188
Summary:
userstable reads were effectively public because the RLS SELECT policy includedOR true, while the table contains email, reader preferences, location, reading stats, supporter flags, timestamps, and other account metadata.usersreads to owner-only and adds apublic_user_profilesview for safe public profile rendering.Validation notes are in the PR. I kept the change scoped to
database/schema.sql.optimystical commentedon May 11, 2026
Submitted PR #190 for the RLS bounty scope: #190
Summary:
Validation: git diff --check.
zaixincheng174-ai commentedon May 12, 2026
Submitted PR #191 for the RLS/security bounty scope: #191
Summary:
collectionscontains curator-owned draft fields and organization-scoped B2B metadata (curator_user_id,is_published,organization_id), but RLS was not enabled.collection_bookscan expose the contents and notes of those collections.Validation:
git diff --check; runtime schema apply not run locally because this environment has nodockerorpsql./claim #100
zaixincheng174-ai commentedon May 12, 2026
Submitted a second non-overlapping PR for the RLS/security bounty scope: #192
Summary:
authors.organization_idandbooks.organization_idare documented for future B2B tenant rows (NULL = public catalog), but the catalog tables and public catalog view did not enforce that boundary.Validation:
git diff --check; runtime schema apply not run locally because this environment has nodockerorpsql./claim #100
zaixincheng174-ai commentedon May 12, 2026
Submitted a third non-overlapping PR for the RLS/security bounty scope: #193
Summary:
affiliate_retailerscontains partner tags, commission rates, inactive routing config, and operator notes, but direct public API access was not guarded by RLS.affiliate_retailersand intentionally adds no anon/auth policy, keeping direct table access closed while trusted server/service-role code can still manage affiliate URL generation.v_affiliate_performanceassecurity_invokerso the revenue/performance dashboard view respects caller RLS instead of bypassing table protections by default.Validation:
git diff --check;pnpm --filter @librarfree/db typecheckcould not run because this checkout has nonode_modules/tsc; runtime schema apply not run locally because this environment has nopsqlordocker./claim #100
zaixincheng174-ai commentedon May 12, 2026
Submitted another non-overlapping hardening PR for the security bounty scope: #194
Summary:
public.handle_new_auth_user()is aSECURITY DEFINERtrigger function used by the Supabase auth sync path.search_pathtopublic, pg_temp, keeping privileged object lookup deterministic and reducing schema/object hijacking risk if future edits add unqualified references.Validation:
git diff --check;pnpm --filter @librarfree/db typecheckcould not run because this checkout has nonode_modules/tsc; runtime schema apply not run locally because this environment has nopsqlordocker./claim #100
zaixincheng174-ai commentedon May 12, 2026
Submitted another non-overlapping RLS hardening PR for the security bounty scope: #195
Summary:
donationsallowed direct SELECT for everyanonymous = FALSErow, exposing row-level donation data through the raw table.v_transparency_monthly.Validation:
git diff --check;pnpm --filter @librarfree/db typecheckcould not run because this checkout has nonode_modules/tsc; runtime schema apply not run locally because this environment has nopsqlordocker./claim #100
zaixincheng174-ai commentedon May 13, 2026
Payout/channel clarification before I do additional security-bounty work here:
I have submitted non-overlapping hardening PRs #191, #192, #193, #194, and #195 under this issue scope. The issue says rewards are €50-500 and references “Huntr ou GitHub Security,” but I do not see a specific payout/reporting channel in the issue text.
If any of these PRs are accepted, should payout coordination happen directly in this GitHub issue/PR thread, through GitHub Security/Huntr, or another maintainer-preferred channel? I will hold off on further slices until the payment path is clear.
[-][P3] Bug bounty — Huntr ou GitHub Security[/-][+][P3] Sécurité — audit auth/RLS/XSS/CSRF (interne)[/+]