Skip to content

feat(core)!: require encryption and migrate configuration on the v17.1.0 baseline - #2924

Merged
Innei merged 15 commits into
masterfrom
v18-integration
Nov 14, 2026
Merged

Innei merged 15 commits into
masterfrom
v18-integration

Conversation

@Innei

@Innei Innei commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary

Integrates the v18-only work from #2914 onto the v17.1.0 baseline, so the v17.0.5/v17.1.0 fixes (password credential account IDs, 20261113-credential-account-ids, dependency bumps, validation patches) are kept. Supersedes #2914.

  • Cherry-picks the 12 v18-specific commits (required encryption, fixed V2 writes, release-phase canonical config migration, strict config writes, dev encryption key) onto master.
  • release.yml: tags containing - are marked prerelease, do not move latest / major / minor image tags, and do not trigger the production redeploy. The Docker smoke step now receives the required secrets.
  • Canonical config migration drops stored fields that no schema declares (logged by path, never by value). Long-lived installations carry such leftovers and the migration previously aborted on the first one.

Verification

  • pnpm typecheck, admin tsc --noEmit, lint:migrations (50 files): pass.
  • Core suite before the config fix: 3595 passed, 18 failed, 13 skipped. All 18 were 5s timeouts under local load; the 5 affected files pass in isolation (43/43).
  • After the config fix: config, upgrade and secret-storage specs, 98 passed. The full suite has not been re-run locally since.
  • Rehearsed against a real installation snapshot in an isolated database:
    • direct upgrade: rotate JWT → migrate → upgrade:check ready; re-running migrate changes nothing
    • v17.1.0 upgrade:prepare then v18 migrate: API keys, accounts, snippets and webhooks byte-identical across the v18 migrate
    • wrong field key: aborts in canonical-config with exit 1, no rows changed, no ledger row

Not verified

  • A running v18 instance on migrated data (login, API-key auth, config read/write).
  • Plaintext-only and machine-id installations on real data.
  • The release.yml prerelease conditions have not run in CI yet.

Remaining before release

  • Docs still describe this as an unreleased branch.
  • Execution GETs, numeric sort values and retired AI columns are not removed here.

@safedep

safedep Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

Package Details
Package Malware Vulnerability Risky License Report
icon mime-types @ 3.0.2
apps/core/package.json
ok icon
ok icon
ok icon
🔗
icon mkdirp @ 3.0.1
apps/core/package.json
ok icon
ok icon
ok icon
🔗
icon nanoid @ 6.0.2
apps/core/package.json
ok icon
ok icon
ok icon
🔗
icon nodemailer @ 10.2.1
apps/core/package.json
ok icon
ok icon
ok icon
🔗
icon object-scan @ 20.0.4
apps/core/package.json
ok icon
ok icon
ok icon
🔗
icon octokit @ 5.0.5
apps/core/package.json
ok icon
ok icon
ok icon
🔗

View complete scan results →

This report is generated by SafeDep GitHub App

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T09:09:13.736232Z 9e3e0dd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gitguardian

gitguardian Bot commented Nov 14, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
35876281 Triggered Generic Encryption Key adee770 .github/workflows/release.yml View secret
35876281 Triggered Generic Encryption Key b733fac .github/workflows/release.yml View secret
35876281 Triggered Generic Encryption Key b733fac .github/workflows/ci.yml View secret
35876281 Triggered Generic Encryption Key b733fac .github/workflows/ci.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e3e0dd1c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

key: resolveDevelopmentEncryptionKey(
argv.encrypt_key || '',
isDev,
path.join(process.cwd(), 'tmp'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Store the development encryption key outside the cleanup directory

When running in development without an explicit encryption key, this puts the only persisted key inside TEMP_DIR (apps/core/src/constants/path.constant.ts). However, CronBusinessService.cleanTempDirectory() recursively deletes that entire directory, and cron-task.scheduler.ts schedules that operation daily at 3 AM without excluding development. After cleanup, the next restart generates a different key, making previously encrypted configuration and other stored credentials unreadable and potentially blocking startup. Store the key outside the cleanup tree or explicitly preserve it during cleanup.

Useful? React with 👍 / 👎.

@Innei
Innei merged commit cbfde47 into master Nov 14, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant