Skip to content

fix(amazonq): require exact approval for sensitive paths - #2943

Closed
hezelin-work wants to merge 1 commit into
feature/OHIfrom
fix/file-tools-sensitive-approval
Closed

hezelin-work wants to merge 1 commit into
feature/OHIfrom
fix/file-tools-sensitive-approval

Conversation

@hezelin-work

Copy link
Copy Markdown

Problem

Path approvals for file tools applied more broadly than intended.

Solution

Require a separate approval for sensitive paths, and record an approval only after the tool succeeds.

Behavior change: the agent may ask again before using a sensitive file in a folder the user already approved.

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.

@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hezelin-work
hezelin-work marked this pull request as ready for review October 16, 2026 20:24
@hezelin-work
hezelin-work requested a review from a team as a code owner October 16, 2026 20:24
- Sensitive paths need their own approval, not a parent directory's.
- Keep executeBash file checks for approved paths.
- Record an approved path after the tool succeeds.
@hezelin-work
hezelin-work force-pushed the fix/file-tools-sensitive-approval branch from 1d64717 to aa29175 Compare October 16, 2026 21:45
@hezelin-work

Copy link
Copy Markdown
Author

Moved to #2952.

@hezelin-work
hezelin-work deleted the fix/file-tools-sensitive-approval branch October 20, 2026 16:22
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.

2 participants