Skip to content

security: 5 vulnerability fixes (#20, #21, #22, #23, #25)#27

Merged
study8677 merged 7 commits into
mainfrom
security-fixes-integration
May 21, 2026
Merged

security: 5 vulnerability fixes (#20, #21, #22, #23, #25)#27
study8677 merged 7 commits into
mainfrom
security-fixes-integration

Conversation

@study8677
Copy link
Copy Markdown
Owner

Summary

Bundles the 5 valuable security fixes from Codex/Aardvark reviews. Tests updated to align with new (stricter) auth & credential behavior.

PR #24 is functionally redundant with #25; will close. PR #19 is the active feature branch and not included.

Test plan

  • pytest tests/test_publishers.py tests/test_trial_platform.py tests/test_email_verification.py tests/test_settings_multitenant.py tests/test_geo_ask.py — 69 passed locally
  • CI green

study8677 added 7 commits May 21, 2026 17:02
- test_publishers.py: replace env vars with llm.set_request_keys() since
  publish credentials no longer fall back to os.environ (account-scoped).
- test_trial_platform.py: add _seed_admin() helper that activates the
  bootstrapped !unusable admin row directly, since signup can no longer
  claim that row to prevent admin privilege escalation.
@study8677 study8677 merged commit 146290d into main May 21, 2026
3 checks passed
Copy link
Copy Markdown

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

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: a05abbc310

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

Comment on lines +193 to +194
if row and row[1] == "!unusable" and normalized == admin_email:
raise ValueError("email_exists")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore one-time activation path for bootstrapped admin

create_user_with_account now returns email_exists when the bootstrapped admin row (password_hash == "!unusable") is used, but _ensure_admin_account still creates that unusable admin user on startup (src/opencmo/storage/_db.py). This removes the only self-service path that previously converted that row into a real login, so a fresh deployment cannot sign in as admin unless someone manually updates the database (the updated tests now do exactly that). Please add an explicit one-time admin-claim flow (or equivalent) before blocking this signup path.

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