Open-source document signature platform. Not affiliated with DocuSign.
TypeScript
Test on separate data, cite only tests that prove the row, say sign-in attempts are not audited
Claude685e725ffffe
diff --git a/docs/part11/change-control.md b/docs/part11/change-control.mdindex a2c27c3..f019385 100644--- a/docs/part11/change-control.md+++ b/docs/part11/change-control.md@@ -16,8 +16,10 @@ For a commit, the run on the GitHub Actions page is your test evidence. Save its1. **Identify** the commit you want, and list the commits between it and the one you run now (`git log <current>..<new> --oneline`).2. **Assess** which ones touch the files in the [traceability matrix](traceability-matrix.md). Any database migration (`db/migrations/`) is a change to the record structure and needs a closer look.3. **Check** that CI passed for the new commit, and file the run link.-4. **Test** on a separate test install, not on production:- - Deploy the new commit to a Vercel preview or a second project with its own database.+4. **Test** on a separate test install with **its own database and Blob store**, never on production data:+ - Use a second Vercel project with its own Neon database and Blob store, or set the Preview environment's database and storage variables to separate test resources. By default a preview deployment uses the same database as production, so testing on one would change real records.+ - A preview build does not apply migrations unless `MIGRATE_ON_PREVIEW=1` is set for the Preview environment. Set it only when previews have their own database.+ - Deploy the new commit there, and check in the build log that the migrations ran.- Re-run the [OQ](operational-qualification.md) scripts for every requirement a changed file touches.- Re-run OQ-04 and OQ-07 for any change at all.5. **Approve** the change: who reviewed it, what was tested, any deviations, and the decision.diff --git a/docs/part11/known-gaps.md b/docs/part11/known-gaps.mdindex 9135b96..70735b4 100644--- a/docs/part11/known-gaps.md+++ b/docs/part11/known-gaps.md@@ -2,16 +2,16 @@What Part 11 mode does not do yet, and what to do instead. These are also listed in the [risk assessment](risk-assessment.md).-| Gap | Part 11 | What to do for now |-| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------- |-| **No idle timeout.** A signed-in session lasts up to 7 days. Each signature needs the password again, but someone at an unlocked computer could see records. | 11.200(a)(1)(ii), 11.10(d) | Screen lock by policy and device management (SOP-2). |-| **No password aging or reuse rules.** Passwords need 15 or more characters and are checked against breach lists, but they never expire. | 11.300(b) | Set a change interval in SOP-2 if your organization requires one. |-| **Sign-in lockout is a rate limit only.** Wrong passwords at _signing_ lock the account. Wrong passwords at the normal _sign-in_ are rate limited but don't lock it. | 11.300(d) | Review sign-in rate-limit events and failed signings in the audit trail. |-| **No biometrics or passkeys.** Signing uses email and password. | 11.200(b) | Not needed: email and password meet 11.200(a). |-| **Some admin changes are not in the install audit trail.** These are the logo, and the sender-address check on the Email panel. Settings, roles, identity, locks and Part 11 mode are recorded. | 11.10(e) | Record logo and email changes in change control. |-| **No signature meaning on templates.** A draft made from a template needs a meaning chosen for each signer before it can be sent. | none | The send is refused until each meaning is chosen, so nothing goes out without one. |-| **Full database access can rewrite the audit chain** consistently. | 11.10(e) | Limit database access, and file audit exports outside the database (SOP-5). |-| **No built-in backup of the PDFs** in Vercel Blob. | 11.10(c) | Copy the Blob store on a schedule, and test a restore (SOP-5). |-| **Signers outside your organization** need an account on your install, and an administrator must confirm who they are. | 11.100 | Fine for staff. For outside parties, decide whether this is workable or keep those records out of Part 11 mode. |+| Gap | Part 11 | What to do for now |+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |+| **No idle timeout.** A signed-in session lasts up to 7 days. Each signature needs the password again, but someone at an unlocked computer could see records. | 11.200(a)(1)(ii), 11.10(d) | Screen lock by policy and device management (SOP-2). |+| **No password aging or reuse rules.** Passwords need 15 or more characters and are checked against breach lists, but they never expire. | 11.300(b) | Set a change interval in SOP-2 if your organization requires one. |+| **Sign-in lockout is a rate limit only, and sign-in attempts are not audited.** Wrong passwords at _signing_ lock the account and are in the audit trail. Wrong passwords at the normal _sign-in_ are rate limited but don't lock the account, and they are not recorded in either audit trail. | 11.300(d) | If you need to watch sign-in attempts, do it outside SignuDoc, for example with Vercel's firewall and log drains to your monitoring. |+| **No biometrics or passkeys.** Signing uses email and password. | 11.200(b) | Not needed: email and password meet 11.200(a). |+| **Some admin changes are not in the install audit trail.** These are the logo, and the sender-address check on the Email panel. Settings, roles, identity, locks and Part 11 mode are recorded. | 11.10(e) | Record logo and email changes in change control. |+| **No signature meaning on templates.** A draft made from a template needs a meaning chosen for each signer before it can be sent. | none | The send is refused until each meaning is chosen, so nothing goes out without one. |+| **Full database access can rewrite the audit chain** consistently. | 11.10(e) | Limit database access, and file audit exports outside the database (SOP-5). |+| **No built-in backup of the PDFs** in Vercel Blob. | 11.10(c) | Copy the Blob store on a schedule, and test a restore (SOP-5). |+| **Signers outside your organization** need an account on your install, and an administrator must confirm who they are. | 11.100 | Fine for staff. For outside parties, decide whether this is workable or keep those records out of Part 11 mode. |Suggestions and fixes are welcome on the project's GitHub.diff --git a/docs/part11/traceability-matrix.md b/docs/part11/traceability-matrix.mdindex 26f4554..f82bd26 100644--- a/docs/part11/traceability-matrix.md+++ b/docs/part11/traceability-matrix.md@@ -20,9 +20,9 @@ Three kinds of test evidence back the matrix:| SYS-05 install audit trail | `src/lib/services/system-audit.ts`, `src/lib/part11.ts`, `src/lib/people.ts`, `src/app/api/admin/settings/route.ts` | `part11.dbtest.ts`: "five wrong passwords lock signing…"; e2e Part 11 test (site audit has `part11_mode_changed`, `identity_verified`) | OQ-09 || SYS-06 hash chain | `computeAuditRowHash`, `computeSystemAuditRowHash`, `verifyAuditChain`, `verifySystemAuditChain` | `part11.dbtest.ts`: "the install audit trail is one hash chain that shows a changed row"; `part11.test.ts`: "the install audit hash changes…" | OQ-09 || SYS-07 void reason | `voidSentEnvelope` in `src/lib/envelopes.ts`, void dialog in `src/components/envelopes/envelope-detail-shell.tsx` | none yet: covered by the OQ | OQ-11 |-| SYS-08 signing order | `sign_order` in `src/lib/envelopes.ts` and `src/lib/signing.ts` | `copy-recipients.dbtest.ts`: "…stay out of the signing order" | OQ-06 |+| SYS-08 signing order | `sign_order` in `src/lib/envelopes.ts` and `src/lib/signing.ts` | none that signs out of order: covered by the OQ (`copy-recipients.dbtest.ts` checks only that the order is saved) | OQ-06 || SYS-09 seal | `src/lib/services/pdf-seal.ts` | `pdf-seal.test.ts`: "a sealed PDF verifies, and any change to it is detected" | OQ-07 |-| SYS-10 rules kept per record | `envelopes.part11`, `signers.user_id` set at send in `sendDraftEnvelope` | e2e Part 11 test (mode turned off at the end) | OQ-12 |+| SYS-10 rules kept per record | `envelopes.part11`, `signers.user_id` set at send in `sendDraftEnvelope` | none yet: covered by the OQ | OQ-12 || SIG-01 own account | `sendDraftEnvelope` binds `signers.user_id`; `findSignerAccounts` in `src/lib/part11.ts` | `part11.test.ts`: "a send is refused for each missing Part 11 condition…" | OQ-03 || SIG-02 identity confirmed | `describePart11SignerProblem`, `setIdentityVerification` | `part11.test.ts` (same test); e2e Part 11 test (step "it is not sent until an administrator confirms who the signer is") | OQ-02, OQ-03 || SIG-03 re-checked | `checkSigningCredentials` in `src/lib/part11.ts` | `part11.dbtest.ts`: "an identity confirmation taken back after send stops the signature" | OQ-05 |