Repository navigation
fix(amazonq): ask before modifying workspace configuration files - #2953
hezelin-work wants to merge 1 commit into
Conversation
|
Blocking: the memory bank exemption can pre-approve a write outside the workspace
I checked this on the merge preview (
Suggested fix: add a memory bank path only when its resolved path is inside the canonical workspace folder ( Non-blocking: exact-path approval on Windows
|
9cf4449 to
c3d472f
Compare
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
1f423e6 to
8aabac6
Compare
|
Thanks @laileni-aws — both are addressed.
Since your review I also made the memory bank flag per request rather than per session, and the root |
356b635 to
e905e5e
Compare
- Ask before fsWrite or fsReplace modifies files in .amazonq, .vscode, or .git folders in the workspace, including linked folders, the AmazonQ.md rules file, or the global Amazon Q configuration when the workspace includes it. - Memory bank generation can still write its own files, only in the request that asked for the memory bank.
e905e5e to
9468f8a
Compare
Problem
Changes to workspace configuration files did not ask for approval.
Solution
Ask before fsWrite or fsReplace modifies files in the .amazonq, .vscode, or .git folders of the workspace, including the files that links in them and .git files point to, the AmazonQ.md rules file, or the global Amazon Q configuration when the workspace includes it. Memory bank generation can still write its own files.
Behavior change: the agent now asks before editing files such as .vscode/settings.json or AmazonQ.md.
Testing: added unit tests.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.