Skip to content

Conversation

@amed-xyz
Copy link
Collaborator

@amed-xyz amed-xyz commented Aug 13, 2025

Follow up from

Detect potentially harmful content in recipes upon loading and alert users through the existing warning modal system.

When Recipe with potentially harmful content is loaded

Triggered on new Recipes only.

Screenshot 2025-08-15 at 12 27 30 PM

When Recipe without potentially harmful content is loaded

Existing behaviour preserved: only triggered on new Recipes.

Screenshot 2025-08-15 at 11 43 10 AM

@amed-xyz amed-xyz self-assigned this Aug 13, 2025
@amed-xyz amed-xyz force-pushed the amed/recipe-security-alert branch 5 times, most recently from 89a1fc2 to 9c06bca Compare August 15, 2025 18:20
@amed-xyz amed-xyz marked this pull request as ready for review August 15, 2025 18:51
Copy link
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

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

the screenshot looks great. there's a bunch of oddities in the code though we could address...

assert_eq!(extensions.len(), 0);
}

#[test]
Copy link
Collaborator

Choose a reason for hiding this comment

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

this test strikes me as too trivial to do any good

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just making sure we're not bypassing any of the places we want to look into

onConfirm,
onCancel,
recipeDetails,
hasSecurityWarnings = false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the default?

Copy link
Collaborator Author

@amed-xyz amed-xyz Aug 15, 2025

Choose a reason for hiding this comment

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

assume there's no security warnings until we run the check and find any

console.error('Failed to scan recipe:', error);
throw error;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need this wrapper? we call this once and we have the generated code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no strong reason, was just following same pattern as the other endpoints

} catch (error) {
console.error('Error checking recipe acceptance:', error);
// If there's an error, assume the recipe hasn't been accepted
setHasSecurityWarnings(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

if there is an error here, we show the dialog but never the secuirty warning, even if the scan failed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, basically we default to a generic warning (current behaviour) instead of assuming there's an actual security warning and saying so

@amed-xyz amed-xyz force-pushed the amed/recipe-security-alert branch 2 times, most recently from b294618 to 0529a4f Compare August 19, 2025 17:00
@amed-xyz amed-xyz force-pushed the amed/recipe-security-alert branch from 0529a4f to 4e0720e Compare August 19, 2025 17:53
@amed-xyz amed-xyz merged commit 4f4e8ac into main Aug 19, 2025
11 checks passed
@amed-xyz amed-xyz deleted the amed/recipe-security-alert branch August 19, 2025 21:05
zanesq added a commit that referenced this pull request Aug 19, 2025
…-visual-improvements

* 'main' of github.com:block/goose: (21 commits)
  Custom providers update (#4099)
  docs: goose_terminal env var (#4205)
  Desktop alerts when suspicious unicode characters found in Recipe (#4080)
  chore: remove the google drive built-in extension (#4187)
  Move out app init (#4185)
  Remove unused extension stuff (#4166)
  Added tests for extensions functionality (#3794)
  chore(release): release version 1.5.0 (#4169)
  Fix tests from upstream changes and add testing to lint staged and ci (#4127)
  Unlist figma tutorial (#4186)
  feat(ui): Implement in-place message editing with re-response (#3798)
  Retry all 500 codes (#4160)
  blog: Transforming AI Assistance with Goose Mentor Mode (#4151)
  upgraded all npm packages and fixed related issues (#4072)
  Docs: @-mentions in goosehints (#4171)
  fix: consistent font sizing in ToolCallWithResponse (#4167)
  Temporarily disable TODO Tool (#4158)
  docs: add integrated MCP server config to jetbrains tutorial  (#4120)
  docs: remove figma MCP from suggested servers (#4123)
  Blog: The AI Skeptic’s Guide to Context Windows (#4152)
  ...
ayax79 pushed a commit to ayax79/goose that referenced this pull request Aug 21, 2025
michaelneale added a commit that referenced this pull request Aug 21, 2025
* main:
  docs: add figma tutorial (#4231)
  Add Nix flake for reproducible builds (#4213)
  Enhanced onboarding page visual design (#4156)
  feat: adds mtls to all providers (#2794) (#2799)
  Don't show a confirm dialog for quitting (#4225)
  Fix: Missing smart_approve in CLI /mode help text and error message (#4132)
  Clean up langfuse docs and scripts (#4220)
  feat: add remark-breaks plugin to preserve single newlines in markdown (#4217)
  feat(mcp/developer): accept -1 for insert_line number (#4112)
  Remove dead code and old settings migration (#4180)
  removed tests from lint-staged (#4203)
  docs: openrouter and ollama easy desktop setup (#4195)
  Custom providers update (#4099)
  docs: goose_terminal env var (#4205)
  Desktop alerts when suspicious unicode characters found in Recipe (#4080)
  chore: remove the google drive built-in extension (#4187)
  Move out app init (#4185)
@alexhancock alexhancock mentioned this pull request Aug 22, 2025
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