Skip to content

Conversation

@dorien-koelemeijer
Copy link
Collaborator

@dorien-koelemeijer dorien-koelemeijer commented Jan 30, 2026

Summary

  • Command and prompt injection ML classifiers now work independently - users can enable one without the other + disabled prompt injection ML classifier will not incorrectly reduce command injection confidence scores
  • Command injection ML detection now appears before prompt injection in settings (since it's a more critical feature) + minor update in description for each of those settings

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Local testing.

Screenshots/Demos (for UX changes)

Before:
Screenshot 2026-01-30 at 10 23 43 am

After:
Screenshot 2026-01-30 at 12 37 59 pm

Copilot AI review requested due to automatic review settings January 30, 2026 05:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the command and prompt injection ML classifiers were not working independently. The key issue was that combine_confidences was always using the confidence field from scan_conversation, even when the prompt classifier was disabled, which could incorrectly reduce command injection confidence scores.

Changes:

  • Modified combine_confidences to accept Option<f32> for context confidence and return tool confidence when None, preventing disabled prompt injection classifier from affecting command injection scores
  • Updated is_ml_scanning_enabled to check both classifiers independently (OR logic instead of just checking prompt classifier)
  • Reordered UI sections to show command injection ML detection before prompt injection (prioritizes the more critical security feature)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/goose/src/security/scanner.rs Fixed confidence combination logic to use ml_confidence (Option) instead of confidence, allowing classifiers to work independently
crates/goose/src/security/mod.rs Updated is_ml_scanning_enabled to check both command and prompt classifier flags with OR logic
ui/desktop/src/components/settings/security/SecurityToggle.tsx Reordered command injection detection section before prompt injection section and updated labels for clarity

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

when clean build LGTM

Copilot AI review requested due to automatic review settings January 30, 2026 05:50
@dorien-koelemeijer
Copy link
Collaborator Author

when clean build LGTM

thank you 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@dorien-koelemeijer dorien-koelemeijer merged commit a3be331 into main Jan 30, 2026
22 checks passed
@dorien-koelemeijer dorien-koelemeijer deleted the fix/update-ui-settings-prompt-injection branch January 30, 2026 05:57
zanesq added a commit that referenced this pull request Jan 30, 2026
* 'main' of github.com:block/goose:
  Fix: Small update UI settings prompt injection (#6830)
  Remove autogenerated .gooseignore files that don't belong in repo (#6824)
  Fix case-insensitive matching for builtin extension names (#6825)
  docs: cli newline keybinding (#6823)
  Update version to 1.22.0 (#6821)
  Refactor: move persisting extension to session outside of route (#6685)
  acp: load configured extensions and refactor tests (#6803)
  docs: usage data collection (#6822)
  feat: platform extension migrator + code mode rename (#6611)
  feat: CLI flag to skip loading profile extensions (#6780)
lifeizhou-ap added a commit that referenced this pull request Feb 2, 2026
* main:
  fix: fixed the broken release (#6887)
  feat: Streamable HTTP transport for ACP + goose-acp usage (#6741)
  Add Laminar for Observability (#6514)
  Missed a couple of places that hard code J for the newline key (#6853)
  fix(ui): preserve working directory when creating new chat (#6789)
  blog: add 5 tips for building MCP Apps that work (#6855)
  docs: session isolation (#6846)
  upgrade react and electron to latest (#6845)
  Fix: Small update UI settings prompt injection (#6830)
  Remove autogenerated .gooseignore files that don't belong in repo (#6824)
  Fix case-insensitive matching for builtin extension names (#6825)
  docs: cli newline keybinding (#6823)
  Update version to 1.22.0 (#6821)
  Refactor: move persisting extension to session outside of route (#6685)
  acp: load configured extensions and refactor tests (#6803)
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.

3 participants