aws / aws/amazon-q-developer-cli

bug: Conflict between agent configs - toolSettings and allowedTools

Offen
#2,884 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Rust
Sterne
2k
Forks
439
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Checks
Operating system

MacOS

Expected behaviour

When fs_write is not added to the list of allowedTools, then having a field for fs_write in "toolSettings" should not assume fs_write is trusted.

  • allowedTools should take precedence over toolSettings, at least for fs_write. allowedTools should be the only source of truth for trust settings.
Actual behaviour

When fs_write in present in toolSettings of cli-agent configuration, it assumes fs_write is trusted even when allowedTools does not contain fs_write.

Also, running /tools in this case does not show fs_write as trusted, even though it is used as a trusted tool.

Steps to reproduce
  1. Add some toolSettings for fs_write - say allowedPaths in a cli-agent configuration
  2. Start q chat with the agent loaded.
  3. Ask it to make changes to a file in the configured allowedPaths. It will proceed to do so as a trusted tool.
  4. Check /tools, which shows fs_write as not trusted.
Environment
[q-details]
version = "1.15.0"
hash = "eb8db5c635fc469f3bd94ead16bb4bfb32d7443b"
date = "2025-09-02T17:57:24.662205Z (13d ago)"
variant = "full"

[system-info]
os = "macOS 15.6.1 (24G90)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "32.00 GB"

...

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die cli-agent-Konfiguration mit fs_write in toolSettings, aber nicht in allowedTools, zu reproduzieren; vergleiche anschließend das Verhalten des Tools mit der /tools-Anzeige nach der Ausführung von q restart. Verfolge, wie allowedTools und toolSettings das Vertrauen bestimmen, und betrachte das Issue als erledigt, wenn sowohl die Ausführung als auch /tools fs_write konsistent als nicht vertrauenswürdig behandeln, sofern allowedTools es nicht enthält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
authorization, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.