Skip to content

Harden Fireworks provider integration - #8693

Closed
JSRRosenbaum wants to merge 2 commits into
NousResearch:mainfrom
JSRRosenbaum:pr-3564-security
Closed

Harden Fireworks provider integration#8693
JSRRosenbaum wants to merge 2 commits into
NousResearch:mainfrom
JSRRosenbaum:pr-3564-security

Conversation

@JSRRosenbaum

Copy link
Copy Markdown

Security hardening follow-up for Fireworks provider support.

This patch:

  • fixes API-key provider auto-detect priority drift
  • sanitizes remote Fireworks model IDs before terminal display/use
  • bounds Fireworks control-plane pagination
  • refuses API-key prompting when stdin is not interactive

Validation:

  • python3 -m pytest -q -o addopts='' tests/hermes_cli/test_api_key_providers.py tests/hermes_cli/test_models.py tests/hermes_cli/test_model_provider_persistence.py
  • 204 passed

paraddox and others added 2 commits April 12, 2026 20:03
This squashes the Fireworks branch into one decision record on top of current main.
It keeps Fireworks aligned with the existing API-key provider seams across auth,
model catalogs, setup, CLI selection, runtime resolution, and the rebased test
baselines needed to stay compatible with current upstream behavior.

Constraint: Must preserve current main's provider architecture while keeping Fireworks usable end to end
Rejected: Keep four-commit branch history | unnecessary review noise after repeated rebases
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: On future rebases, keep current main behavior and reapply only Fireworks-specific provider deltas
Tested: Fireworks provider pytest slice after squash
Not-tested: Full pytest suite; known upstream failures remain outside the Fireworks slice
@alt-glitch alt-glitch added type/security Security vulnerability or hardening P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #8632 — same Fireworks provider hardening scope. Also related to #6054, #3757, #3564 (Fireworks provider PRs).

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the hardening work. Current main has moved Fireworks onto the shared model-provider path, so this needs a focused salvage rather than a direct application.

Problems

  • providers/base.py:216 on current main returns remote catalog id values verbatim, and hermes_cli/models.py:2485 consumes that generic result for Fireworks. The PR's sanitizer only protects the retired Fireworks-specific control-plane fetch in hermes_cli/models.py, so it would not cover the active path.
  • The added FIREWORKS_BASE_URL setting conflicts with the secret/config split. Commit 31152ae108e84325db1d75a2c7f0f49037c866ee deliberately removed it; current docs use model.base_url in config.yaml.
  • The Fire Pass router list resurrects scope from issue #3510, which was closed as not planned; current Fireworks defaults are PAYG /models/ IDs.

Suggested changes

  • Move ID validation to the shared ProviderProfile.fetch_models() boundary and test it through provider_model_ids("fireworks").
  • Drop the base-URL env var and Fire Pass catalog additions.

Automated hermes-sweeper review.

Comment thread hermes_cli/config.py
@@ -784,6 +792,14 @@ def _ensure_hermes_home_managed(home: Path):
"category": "provider",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove this non-secret endpoint override. Current main deliberately removed FIREWORKS_BASE_URL in 31152ae108e84325db1d75a2c7f0f49037c866ee; endpoint overrides belong in model.base_url in config.yaml.

Comment thread hermes_cli/models.py
@@ -68,6 +73,10 @@ def _codex_curated_models() -> list[str]:
return _add_forward_compat_models(list(DEFAULT_CODEX_MODELS))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please do not add the Fire Pass router catalog here. Issue #3510 was closed as not planned, and current main's Fireworks profile intentionally uses PAYG accounts/fireworks/models/... defaults only.

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing alongside #8632 (same scope, this is the subset) — see the explanation there: these harden the never-merged #3564 Fireworks integration; the plugin-based integration that shipped doesn't contain the code paths being hardened, and the autodetect-priority concern doesn't reproduce on current main. Thanks for the work, and a fresh PR against the current integration is welcome if any gap remains.

@teknium1 teknium1 closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants