docs: add GitBook public documentation#18
Conversation
…-agents, first-pipeline)
…urity, upgrading)
Greptile SummaryThis PR adds a complete 22-page public documentation site ( Issues found:
Verified as accurate:
Confidence Score: 4/5
Last reviewed commit: 88784cb |
| | Sensitive node config fields | AES-256-GCM | SHA-256 hash of `NEXTAUTH_SECRET` | | ||
| | User passwords | bcrypt (cost 12) | Built-in salt | | ||
| | TOTP secrets | AES-256-GCM | SHA-256 hash of `NEXTAUTH_SECRET` | | ||
| | 2FA backup codes | SHA-256 hash | -- | |
There was a problem hiding this comment.
The encryption-at-rest table shows 2FA backup codes as stored via "SHA-256 hash", but this is incomplete. In the codebase (src/auth.ts and src/server/services/totp.ts), backup codes are hashed with SHA-256, but the resulting array of hashes is then encrypted with AES-256-GCM before database storage. This should match the description in reference/database.md (lines 233–238), which correctly indicates User.totpBackupCodes is in the AES-encrypted section.
For clarity and consistency with the database schema documentation, the storage algorithm should be updated to reflect the actual encryption method:
| | 2FA backup codes | SHA-256 hash | -- | | |
| | 2FA backup codes | AES-256-GCM | SHA-256 hash of `NEXTAUTH_SECRET` | |
(The backup codes themselves are hashed for comparison, but the encrypted storage method is what's relevant in this table.)
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/public/operations/security.md
Line: 64
Comment:
The encryption-at-rest table shows 2FA backup codes as stored via "SHA-256 hash", but this is incomplete. In the codebase (src/auth.ts and src/server/services/totp.ts), backup codes are hashed with SHA-256, but the resulting array of hashes is then encrypted with AES-256-GCM before database storage. This should match the description in `reference/database.md` (lines 233–238), which correctly indicates `User.totpBackupCodes` is in the AES-encrypted section.
For clarity and consistency with the database schema documentation, the storage algorithm should be updated to reflect the actual encryption method:
```suggestion
| 2FA backup codes | AES-256-GCM | SHA-256 hash of `NEXTAUTH_SECRET` |
```
(The backup codes themselves are hashed for comparison, but the encrypted storage method is what's relevant in this table.)
How can I resolve this? If you propose a fix, please make it concise.
Summary
docs/public/) for GitBook Git SyncDocumentation Structure
GitBook Integration
.gitbook.yamlconfig points GitBook atdocs/public/SUMMARY.mddefines sidebar navigationdocs/screenshots/llms.txt, andllms-full.txtwhen publishedTest plan
llms.txtandllms-full.txtare generated