Skip to content

Conversation

@mattjoyce
Copy link
Contributor

@mattjoyce mattjoyce commented Jan 14, 2026

Summary

  • automatically create .gooseignore the first time we need the built-in safety patterns so the defaults are visible/
    editable instead of hidden in code
  • share those defaults through a single constant and cover them with an explicit test

Testing

  • cargo fmt
  • cargo test -p goose-mcp test_default_patterns_when_no_ignore_files

@mattjoyce mattjoyce force-pushed the gooseignore-visible-defaults branch 2 times, most recently from 6cff713 to 26e68ed Compare January 14, 2026 12:06
@blackgirlbytes
Copy link
Contributor

love that the default is there to keep average users from messing up their secrets files, but if theyre more advanced..they have the option to edit the ignore file.

@mattjoyce mattjoyce force-pushed the gooseignore-visible-defaults branch from 26e68ed to e451223 Compare January 14, 2026 21:45
@mattjoyce
Copy link
Contributor Author

Thinking about it, we can help user more. I have added some guidance into the default .gooseignore, including some other examples of files that users might unintentionally expose.

@mattjoyce mattjoyce force-pushed the gooseignore-visible-defaults branch from e451223 to f9e6b0f Compare January 24, 2026 07:15
Instead of using hardcoded ignore patterns when no .gooseignore exists,
automatically create a .gooseignore file with the default patterns and
helpful comments showing commonly-used patterns users can uncomment.

This makes the default ignore behavior discoverable and easily customizable.

Signed-off-by: matt joyce <[email protected]>
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.

seems reasonable safety feature, thanks!

@zanesq zanesq merged commit a4959fe into block:main Jan 27, 2026
17 checks passed
zanesq added a commit that referenced this pull request Jan 27, 2026
* 'main' of github.com:block/goose:
  Create default gooseignore file when missing (#6498)
  fix slash and @ keyboard navigation popover background color (#6550)
  fix[format/openai]: return error on empty msg. (#6511)
  Fix: ElevenLabs API Key Not Persisting (#6557)
  Logging uplift for model training purposes (command injection model) [Small change] (#6330)
  fix(goose): only send agent-session-id when a session exists (#6657)
  BERT-based command injection detection in tool calls (#6599)
  chore: [CONTRIBUTING.md] add Hermit to instructions (#6518)
  fix: update Gemini context limits (#6536)
  Document r slash command (#6724)
  Upgrade GitHub Actions to latest versions (#6700)
  fix: Manual compaction does not update context window. (#6682)
  Removed the Acceptable Usage Policy (#6204)
  Document spellcheck toggle (#6721)
  fix: docs workflow cleanup and prevent cancellations (#6713)
  Docs: file bug directly (#6718)
@zanesq
Copy link
Collaborator

zanesq commented Jan 27, 2026

@mattjoyce just realized that we should probably add a default .gooseignore to this project also or add it to .gitignore if we don't think we need one do you want to follow up with that change?

@mattjoyce
Copy link
Contributor Author

mattjoyce commented Jan 30, 2026

@mattjoyce just realized that we should probably add a default .gooseignore to this project also or add it to .gitignore if we don't think we need one do you want to follow up with that change?

Done. I think .gitignore is most robust.
#6826

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.

4 participants