AWS amazonq documentation change
Summary
Restructured documentation to clarify code review workflows, added example prompts, and expanded guidance on initiating file/project reviews. Added explicit references to vulnerability detection in code issue explanations.
Security assessment
The changes explicitly mention detecting 'vulnerable' code in code issue explanations (Step 7.2 in JetBrains section), indicating documentation of security-related capabilities. However, there is no evidence of addressing a specific security vulnerability in the service itself.
Diff
diff --git a/amazonq/latest/qdeveloper-ug/start-review.md b/amazonq/latest/qdeveloper-ug/start-review.md index fe50c96c4..cde910d28 100644 --- a//amazonq/latest/qdeveloper-ug/start-review.md +++ b//amazonq/latest/qdeveloper-ug/start-review.md @@ -5 +5 @@ -Review as you codeReview a file or project +Review a file, project, or workspaceExample tasks and promptsReview as you code @@ -9 +9 @@ Review as you codeReview a file or project -Amazon Q can review your entire codebase, or auto-review your code as you write it. +Amazon Q can review your entire file or codebase, or auto-review your code as you write it. @@ -15 +15 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo - * Review as you code + * Review a file, project, or workspace @@ -17 +17 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo - * Review a file or project + * Example tasks and prompts @@ -18,0 +19 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo + * Review as you code @@ -22 +22,0 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo -## Review as you code @@ -24 +24 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo -###### Note +## Review a file, project, or workspace @@ -26 +26 @@ Before you get started, make sure you've installed Amazon Q in an IDE that suppo -Amazon Q auto-reviews are only available with a [Amazon Q Developer Pro subscription](./getting-started-q-dev.html). +You can initiate a review from the chat panel to have Amazon Q review a particular file or project. File and project reviews include both rule-based and generative AI-powered reviews. @@ -28,3 +28 @@ Amazon Q auto-reviews are only available with a [Amazon Q Developer Pro subscrip -Auto-reviews are rule-based reviews powered by [Amazon Q detectors ](https://docs.aws.amazon.com/codeguru/detector-library/). Amazon Q automatically reviews the file you are actively coding in, generating code issues as soon as they are detected in your code. When Amazon Q performs auto reviews, it doesn’t generate in-place code fixes. - -Auto-reviews are enabled by default when you use Amazon Q. Use the following procedure to pause or resume auto-reviews. +After Amazon Q completes a review, you can investigate the issue and get a code fix to remediate the issue. For more information, see [Addressing code issues](./address-code-issues.html). @@ -32 +30 @@ Auto-reviews are enabled by default when you use Amazon Q. Use the following pro -###### Pause and resume auto-reviews +To start a file or project review, complete the following steps for your IDE: @@ -34,5 +32 @@ Auto-reviews are enabled by default when you use Amazon Q. Use the following pro -To pause auto-reviews, complete the following steps. - - 1. Choose **Amazon Q** from the bottom of the IDE window. - -The Amazon Q task bar opens. +JetBrains @@ -40 +33,0 @@ The Amazon Q task bar opens. - 2. Choose **Pause Auto-Reviews**. To resume auto-reviews, choose **Resume Auto-Reviews**. @@ -41,0 +35 @@ The Amazon Q task bar opens. + 1. Open a file or project you want to review in your IDE. @@ -42,0 +37 @@ The Amazon Q task bar opens. + 2. Choose the Amazon Q icon to open the chat panel. @@ -43,0 +39 @@ The Amazon Q task bar opens. + 3. Using natural language, describe the type of code review you want to run. You can review only your recent code changes, or an entire file. Code changes are determined based on the output of the git diff command on your file. If applicable, Amazon Q will only review your code changes by default unless otherwise specified. @@ -45 +41 @@ The Amazon Q task bar opens. -## Review a file or project + 4. With your code project or file open in the IDE, you can enter things like: @@ -47 +43 @@ The Amazon Q task bar opens. -You can also initiate a review from the chat panel to have Amazon Q review a particular file or project. File and project reviews include both rule-based and generative AI-powered reviews. Code issues generated during file or project reviews can include in-place code fixes. + 1. `Review my code changes` – Amazon Q will review any code changes in your codebase @@ -49 +45 @@ You can also initiate a review from the chat panel to have Amazon Q review a par -To start a file or project review, complete the following steps: + 2. `Run a code review on this entire file` – Amazon Q will review all code in your file, not only changes @@ -51 +47 @@ To start a file or project review, complete the following steps: -JetBrains + 3. `Review this repository` – Amazon Q will review your entire codebase, not only changes @@ -52,0 +49 @@ JetBrains +For more detailed code review scenarios and associated prompts, see Example prompts. @@ -54 +51 @@ JetBrains - 1. Open a file or project you want to review in your IDE. + 5. Amazon Q will begin reviewing your file or project. Once complete, it will summarize the highest priority issues and observations. @@ -56 +53 @@ JetBrains - 2. Choose the Amazon Q icon to open the chat panel. Ask Amazon Q to review your code. + 6. If any issues were detected, the **Code Issues** tab opens with a list of the issues Amazon Q found. @@ -58 +55 @@ JetBrains - 3. A new chat tab opens. Amazon Q prompts you to choose a project or file to review. If you’re reviewing a file, the file you want to review must be open and active in the IDE. If you’re reviewing a project, the project must be open in the IDE. + 7. To learn more about a code issue, navigate to the **Code Issues** panel. From there, you can do the following: @@ -60 +57 @@ JetBrains - 4. Choose the type of review you want to run. Amazon Q begins reviewing the project or file that you currently have open in the IDE. + 1. Select an issue to be redirected to the specific area of the file where the vulnerable or low-quality code was detected. @@ -62 +59 @@ JetBrains - 5. When the review is complete, the **Code Issues** tab opens above the chat panel with a list of the issues Amazon Q found. + 2. To get an explanation of the code issue, choose the magnifying glass icon next to the name of the code issue. Amazon Q will provide details about the issue and suggest a remediation that you can insert into your code. @@ -64 +61 @@ JetBrains - 6. You can choose an issue to be redirected to the specific area of the file where the vulnerable or low-quality code was detected. + 3. To fix the code issue, choose the wrench icon next to the name of the code issue. Amazon Q will provide a brief explanation of the fix and then make an in-place fix in your code file. You will see the code change in your file, and have the option to undo the change from the chat panel. @@ -66 +63 @@ JetBrains -To see more details about the issue, choose the magnifying glass icon to the right of the code issue name in the **Code Issues** tab. A **Code Issue Details** panel opens with information about the issue. + 4. You can also use natural language to ask more about an issue, get an explanation of proposed fixes, or ask for alternative solutions. @@ -68 +65 @@ To see more details about the issue, choose the magnifying glass icon to the rig - 7. To address your code issues, see [Addressing code issues with Amazon Q Developer](./address-code-issues.html). + 8. For more information about addressing code issues, see [Addressing code issues with Amazon Q Developer](./address-code-issues.html). @@ -80 +77,5 @@ Visual Studio Code - 3. Using natural language, describe the type of code review you want to run. You can review only your recent code changes, or an entire file. Code changes are determined based on the output of the git diff command on your file. + 3. Using natural language, describe the type of code review you want to run. You can review only your recent code changes, or an entire file. Code changes are determined based on the output of the git diff command on your file. If applicable, Amazon Q will only review your code changes by default unless otherwise specified. + + 4. With your code project or file open in the IDE, you can enter things like: + + 1. `Review my code changes` – Amazon Q will review any code changes in your codebase @@ -82 +83 @@ Visual Studio Code -With your code project or file open in the IDE, you can enter things like: + 2. `Run a code review on this entire file` – Amazon Q will review all code in your file, not only changes @@ -84 +85 @@ With your code project or file open in the IDE, you can enter things like: - * `Review my code changes` + 3. `Review this repository` – Amazon Q will review your entire codebase, not only changes @@ -86 +87 @@ With your code project or file open in the IDE, you can enter things like: - * `Run a code review on this file` +For more detailed code review scenarios and associated prompts, see Example prompts. @@ -88 +89 @@ With your code project or file open in the IDE, you can enter things like: - 4. Amazon Q will begin reviewing your file or project. Once complete, it will summarize the highest priority issues and observations. + 5. Amazon Q will begin reviewing your file or project. Once complete, it will summarize the highest priority issues and observations. @@ -90 +91 @@ With your code project or file open in the IDE, you can enter things like: -If any issues were detected, the **Code Issues** panel opens above the chat panel with a list of the issues Amazon Q found. + 6. If any issues were detected, the **Code Issues** tab opens with a list of the issues Amazon Q found. @@ -92 +93 @@ If any issues were detected, the **Code Issues** panel opens above the chat pane - 5. To learn more about a code issue, navigate to the **Code Issues** panel above the chat panel. From there, you can do the following: + 7. To learn more about a code issue, navigate to the **Code Issues** panel. From there, you can do the following: @@ -100 +101,3 @@ If any issues were detected, the **Code Issues** panel opens above the chat pane - 6. For more information about addressing code issues, see [Addressing code issues with Amazon Q Developer](./address-code-issues.html). + 4. You can also use natural language to ask more about an issue, get an explanation of proposed fixes, or ask for alternative solutions. + + 8. For more information about addressing code issues, see [Addressing code issues with Amazon Q Developer](./address-code-issues.html). @@ -124,0 +128,52 @@ For information about viewing and addressing findings, see [Addressing code issu +## Example tasks and prompts + +There are several scenarios that you might be in when initiating a code review. Following is an overview of some of the ways to initiate a code review and how to prompt Amazon Q to run the review you want. + + * To review just the code changes for a single file: + + * Open the file in your IDE and enter `Review my code` + + * Enter Review the code in `<filename>` + + * To review an entire code file: + + * Open a file without changes and enter `Review my code` + + * Open a file with changes and enter `Review my entire code file` + + * Enter Review all the code in `<filename>` + + * To review all code changes in your repository: + + * Open the repository in your IDE and enter `Review my code` + + * To review your entire repository, not just the changes: + + * Open the repository in your IDE and enter `Review my repository` + + + + +## Review as you code + +###### Note + +Amazon Q auto-reviews are only available with a [Amazon Q Developer Pro subscription](./getting-started-q-dev.html). + +Auto-reviews are rule-based reviews powered by [Amazon Q detectors ](https://docs.aws.amazon.com/codeguru/detector-library/). Amazon Q automatically reviews the file you are actively coding in, generating code issues as soon as they are detected in your code. When Amazon Q performs auto reviews, it doesn’t generate in-place code fixes. + +Auto-reviews are enabled by default when you use Amazon Q. Use the following procedure to pause or resume auto-reviews. + +###### Pause and resume auto-reviews + +To pause auto-reviews, complete the following steps. + + 1. Choose **Amazon Q** from the bottom of the IDE window. + +The Amazon Q task bar opens. + + 2. Choose **Pause Auto-Reviews**. To resume auto-reviews, choose **Resume Auto-Reviews**. + + + + @@ -133 +188 @@ Reviewing code -Understanding code issues +Addressing code issues