Skip to content

Save generated GitHub App credentials securely by default - #78

Merged
jacobprall merged 1 commit into
render-examples:mainfrom
starmorph:codex/secure-app-setup
Oct 28, 2026
Merged

jacobprall merged 1 commit into
render-examples:mainfrom
starmorph:codex/secure-app-setup

Conversation

@starmorph

Copy link
Copy Markdown
Contributor

Running npm run setup:app without --write-env previously printed the generated GitHub App private key and webhook secret into terminal output. Updating an existing .env could also preserve broader file permissions, leaving new secrets under the file's previous access mode.

Setup now always saves credentials to .env and reports only their names and destination. Existing POSIX files are restricted to 0600 before secrets are written; new files retain owner-only permissions. The documented --write-env option remains accepted, and the runbook explains the secure default.

This makes the normal onboarding command safe without requiring developers to know an optional flag. The manifest, installation steps, and separation of gateway/Workflows credentials are preserved.

Validation: npm run check passed — 27 files, 171 tests. Four new regression tests use fake manifest credentials and temporary files to cover default and legacy command output, saved values, and owner-only permissions on new/existing files. No live credential or service calls were used.

Fixes #74.

@jacobprall
jacobprall merged commit c07f940 into render-examples:main Oct 28, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[P1] Save GitHub App credentials securely by default

2 participants