feat(amazonq): include recommendation text in the explain message #7973
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Customers complained about missing the old deterministic message.
Solution
As the agent to include this message at the start of its explain response. It was stored in the recommendation.text field.
The agent does some paraphrasing, so the deterministic message
We detected that this code sets key specifications more than once, key size more than once, or sets both. To make your code more secure, we recommend that you set either KeySpec or NumberOfBytes once. Do not set both.Gets turned into
The CWE-327,328,326,208,1240 - Insecure cryptography issue at line 63 in CsvIterator.java occurs because the code sets both KeySpec and NumberOfBytes parameters on the same GenerateDataKeyRequest object, which are mutually exclusive in AWS KMS.There is more information in the explanation after this, but this is the part related to the deterministic recommendation.text
feature/xbranches will not be squash-merged at release time.