@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / f2e8d35
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 06:45 UTC

docs(phase1): record owner request and read-only security audit scope

davoodmehraban89 committed Oct 13, 2026 at 12:58 UTC f2e8d35c4d24b32f2429d37e34da5e2f1c9a3b49
1 file changed +6
PROJECT_STATE.md
+6
@@ -158,6 +158,12 @@ The latest user message is the sole source of new instructions. Read AGENTS.md t
158 - **Next discriminator:** owner keeps **same computer and browser** and temporarily changes only Internet access to a phone mobile hotspot; clicks the same built-in connectivity test once more, returns only four status codes and optional login success/time. If Auth and REST respond on hotspot, investigate current ISP/DNS/routing/firewall/proxy. If both still time out, assess local device/browser/proxy or service edge via privacy-safe diagnostics before any code change. Do not request email/password/tokens/cookies/HAR. No Auth/RLS/schema/roles, financial history, invoice or OTP modifications. A bounded runtime fix, if proven necessary, needs independent Chromium/Golden/DB/Security gates and owner retest. Issue #106 OPEN.
159 - **Change boundary:** evidence-only documentation update and Issue #106 comment; rollback revert docs-only PR. No runtime change or customer production mutation.
160
161 +### 2026-10-13 Owner: pause Phase 0 login performance; progress independent Phase 1 security — EXECUTION STARTED
162 +- **Latest owner instruction:** defer sign-in/startup slowness, continue approved Finora execution phases. **Explicit boundary:** leave F0-01 / #106 OPEN; do not optimize login or claim Phase 0 complete. Per approved eight-phase roadmap, perform a **Phase 1 read-only security/data-integrity audit** in parallel with blocked owner-authenticated Phase 0 gates. No production Auth/RLS/schema/role, data, permissions, billing, or finance cutover changes authorized by this instruction.
163 +- **Verified beginning main:** `1fa5cf99be9eb790d1192b7597d2dbf65cc9d3fa`. Live Supabase `hcsixhqbyuhpshfwqpjx` ACTIVE_HEALTHY; **82 migrations** last `20261012075507`; existing open PR #58 contains a migration archive under a **different timestamp** (`20261007163500`) from the production-recorded `20261007165208`, and mixes old auth/frontend features; do **not** merge, rename blindly, reapply, or issue replacement SQL. Outstanding PR #6/#39/#40 also not accepted.
164 +- **Initial independently executed read-only catalog findings:** public tables **18/18 RLS**, private tables **3/10 RLS**, **zero anon/authenticated SELECT grants to all 10 private tables**; SECURITY DEFINER routines: public **27** (of which **21 authenticated EXECUTE**, **0 anon EXECUTE**, **27 configured search_path**); private **66** (of which **43 authenticated EXECUTE**, **0 anon EXECUTE**, **66 configured search_path**). Authenticated has USAGE on private schema, whereas anon does not; this requires reviewing actual API exposure and callable routine guards, **not** assuming no possible access or an exploitable vulnerability. The 21 public authenticated-callable warnings are review inputs. Six sampled public admin-license mutators explicitly call `public.is_admin()`; sampled organization invitation/workflow functions use `auth.uid()` and capability checks, but this is **source review, not authenticated adversarial execution proof**.
165 +- **This isolated slice:** deliver an executable **read-only permissions/assertion SQL audit** and a Phase 1 evidence memo with repeat procedure, expected invariants, unresolved negative tests and risk priority. Verify against live metadata with SELECT only, plus repo presence/readback; no DB or service changes, no test identities. Record exact output, SHA and outcome after the fact. This is a **Phase 1 verification slice**, not Phase 1 acceptance; additional two-user revocation, adversarial grants, backup/restore, advisor reviews and sign-off remain OPEN. Rollback revert docs/test-file PR.
166 +
167 ## Current change ledger
168 | 2026-10-07 | Owner requested accounting/product usability refinement from live screenshots: automatic non-user-entered floating-detail codes, contextual in-product guides (especially accounting/chart/dimensions), remove duplicate product internal tax ID and use product code as internal item ID, strengthen in-control product/person search, introduce hierarchical product group/subgroup coding with deterministic 6-digit product codes, and keep sale/purchase commercial-document workspace layout stable while only semantic fields change. | **IMPLEMENTED / LOCAL VERIFICATION PASSED / CI PENDING** | Baseline main = `7e58c75f7d754f378d94ca3f356c1ae580aa7ee3`. Automatic dimension type/value codes, contextual guides, product-code-as-internal-ID, normalized multi-token search, and additive six-digit product coding implemented. Existing historical codes preserved. Commercial sale/purchase workspaces now share a stable `صدور سند تجاری` header/actions layout; duplicate purchase sidebar injection removed; the public selector is the single document-type selector and the legacy internal invoice-kind control is hidden. Local syntax/static/commerce/UX/accounting phases 2–6/Golden checks passed; protected-branch CI remains pending. |
169