فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
docs(holoo): flag inherited public DML and EXECUTE grants
Davood Mehraban committed
Nov 22, 2026 at 22:18 UTC
dabfd5f61fee8fd8eb51981251b29c589e33d237
2 files changed
+29
docs/holoo-lab-public-grants-findings.md
new
+20
@@ -0,0 +1,20 @@
1
+# LAB SQL permission findings — 2026-11-22
2
+
3
+Status: **NO-GO**. Evidence: read-only execution of `scripts/holoo-lab-principal-inventory.ps1` against `ARAM\TNC` / `HolooBackup_050808_LAB_20261110`.
4
+
5
+## Observed inventory
6
+
7
+- Current login: `ARAM\Davood`, database user: `dbo`; 14 database principals, 1 database role-membership record, 168 database permission records, 4 server role-membership records.
8
+- Database permissions grouped by grantee and permission: `public` has 130 `GRANT SELECT`, 31 `GRANT EXECUTE`, 3 `GRANT REFERENCES`, and one each `GRANT INSERT`, `GRANT UPDATE`, `GRANT DELETE`; `dbo` has one `GRANT CONNECT`.
9
+- The three `public` DML grants target **`dbo.dtproperties`**, not `dbo.FACTURE`, `dbo.FACTART`, or `dbo.SANAD`.
10
+- `public` is inherited by every database user; the presence of these grants means a future account with only three explicit table SELECT grants is **not necessarily database-wide read-only**.
11
+- The 31 `public EXECUTE` grants require per-object inspection: an EXECUTE grant can expose data mutations through stored procedures even when direct table DML is denied.
12
+
13
+## Required before identity provisioning
14
+
15
+1. Read-only inspect all 31 public EXECUTE target object definitions and permissions, including dynamic SQL, ownership chaining, and callable nested procedures. Record unknown or encrypted definitions as blockers.
16
+2. Check effective permissions for the proposed account on **all objects**, plus server-level grants and inherited Windows groups; checking three invoice tables alone is insufficient.
17
+3. Decide whether to isolate the lab in a distinct database with tighter `public` privileges or otherwise establish a tested effective read-only identity. Do not modify Holoo default grants without a reviewed compatibility and rollback plan.
18
+4. No SQL principal, GRANT, REVOKE, DENY, data writes, or service changes have been performed as part of this finding.
19
+
20
+**Important limitation:** counts are catalog metadata, not proof that every permission is effective for a specific identity. No stored procedure was executed to test mutation.
tests/holoo-lab-public-grants-findings.test.mjs
new
+9
@@ -0,0 +1,9 @@
1
+import test from 'node:test';
2
+import assert from 'node:assert/strict';
3
+import { readFileSync } from 'node:fs';
4
+import { fileURLToPath } from 'node:url';
5
+const file=fileURLToPath(new URL('../docs/holoo-lab-public-grants-findings.md',import.meta.url));
6
+test('public grants findings preserve write risk and no-go',()=>{
7
+ const text=readFileSync(file,'utf8');
8
+ for(const phrase of ['NO-GO','dbo.dtproperties','31 `GRANT EXECUTE`','not necessarily database-wide read-only','No SQL principal']) assert.ok(text.includes(phrase),phrase);
9
+});