fix(security,config): harden secret guards, scrub Caddyfile, fix deploy docs (Batch D) - #5
Merged
Merged
Conversation
… deploy docs Batch D — 5 audit Criticals + related: - auth.js/crypto.js: production guards now reject the .env.example placeholder secrets and any value < 32 chars (not just the empty/dev-default), so a self-hoster copying .env.example unchanged can't run prod with public keys. - .env.example: add POSTGRES_PASSWORD (+ matching DATABASE_URL) and META_APP_SECRET; document the >=32-char / no-placeholder requirement + openssl generation. - Caddyfile: replace the real domain forgechat.akilsadik.live with forgechat.example.com + an explicit 'replace with your domain' note. - DEPLOY.md: fix wrong env var names (FORGECRM_JWT_SECRET -> JWT_SECRET, FORGECRM_META_WEBHOOK_VERIFY_TOKEN -> META_WEBHOOK_VERIFY_TOKEN), drop the unused COOKIE_PARENT_DOMAINS, add POSTGRES_PASSWORD/META_APP_SECRET. - admin seed: write the generated one-time password to a 0600 file instead of stdout (avoids credential persistence in log aggregators). - health check: backend route is /health (not /api/health); add an nginx location so it's reachable externally, and fix both deploy guides' smoke test. Audit refs: REVIEW.md P0 #4,#5,#6,#7,#8 (lanes 04,24,25). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: KingArthur000 <sathyaprakashelango@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch D — 5 audit Criticals + related (REVIEW.md P0 #4–#8).
auth.js/crypto.js) now reject the.env.exampleplaceholders and values < 32 chars — copying the example unchanged can no longer boot prod with public-known keys..env.example: addPOSTGRES_PASSWORD(+ matching DATABASE_URL) andMETA_APP_SECRET; document the entropy requirement +opensslgeneration.Caddyfile: real domainforgechat.akilsadik.live→forgechat.example.com+ 'replace me' note (missed by the earlier scrub).DEPLOY.md: fix wrong env var names (FORGECRM_JWT_SECRET→JWT_SECRET, etc.), drop unusedCOOKIE_PARENT_DOMAINS, addPOSTGRES_PASSWORD/META_APP_SECRET./health; added nginx location + fixed both guides' smoke test (was/api/health→ 404).