Skip to content

Sanitize strategy switch account examples#36

Merged
Pigbibi merged 1 commit into
mainfrom
codex/sanitize-account-examples
Jun 9, 2026
Merged

Sanitize strategy switch account examples#36
Pigbibi merged 1 commit into
mainfrom
codex/sanitize-account-examples

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace real-looking IBKR account identifiers in open-source examples with demo placeholders
  • update docs and tests to use the same placeholder account routes
  • keep runtime behavior and deployed Worker unchanged

Tests

  • jq empty web/strategy-switch-console/account-options.example.json web/strategy-switch-console/strategy-profiles.example.json
  • node --experimental-default-type=module tests/strategy_switch_worker_validation.mjs
  • python3 -m unittest discover -s tests -v
  • python3 scripts/runtime_settings.py validate
  • git diff --check

@Pigbibi Pigbibi merged commit 151610e into main Jun 9, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/sanitize-account-examples branch June 9, 2026 11:55

@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: c0dc2c7caf

ℹ️ 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".

assert.ok(indexHtml.includes("function hasPrivateConfig()"));
assert.ok(indexHtml.includes('el("quick-form").hidden = !showPrivateControls'));
assert.equal(indexHtml.includes("u15998061"), false);
assert.equal(indexHtml.includes("ibkr-primary"), false);

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 Keep checking the original IBKR IDs are absent

Because the sanitization goal is to prevent the real-looking IBKR account identifiers from leaking into the public page, replacing this assertion with the new placeholder weakens the regression test: if index.html or the served HTML accidentally reintroduces u15998061 later, this check still passes as long as ibkr-primary is absent. Keep an assertion for the removed sensitive identifier(s) in addition to any placeholder check so the test continues to cover the leak this commit is meant to prevent.

Useful? React with 👍 / 👎.

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