You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/scan-with-snyk/pull-requests/pull-request-checks/pull-request-experience.md
+52-7Lines changed: 52 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ The following features are part of the Pull Request Experience:
10
10
## Prerequisites for the Snyk Pull Request Experience
11
11
12
12
* Snyk PR Checks must be enabled. For more information, see [Configure Pull Request Checks](configure-pull-request-checks.md).
13
-
* For the GitHub integration, a specific GitHub account needs to be set to open fix and upgrade PRs. The Personal Access Token (PAT) configured in this way is required by the Pull Request Experience to provide a consistent comment experience. See[](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md)[Opening fix and upgrade pull requests from a fixed GitHub account](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md) for more information.
14
-
* For inline comments, the **Code analysis PR checks** setting needs to be enabled at the [integration level](https://docs.snyk.io/scan-with-snyk/pull-requests/pull-request-checks/pull-request-experience#configure-pull-request-experience-at-the-integration-level). In the Snyk Web UI, under **Settings** > **Integrations** > **Edit settings**, verify that the option is enabled under **Pull request status checks** > **Code analysis**. If "Code analysis" is not visible, please reach out to your Snyk account team to enable Snyk Code for your account. If it is already enabled, check under **Settings** > **Snyk Code** to ensure it is turned on.
13
+
* For the GitHub integration, you must specify a GitHub account to provide a consistent comment experience. For more information, see [Opening fix and upgrade pull requests from a fixed GitHub account](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md).
14
+
* For inline comments, enable the **Code analysis PR checks** setting at the [integration level](https://docs.snyk.io/scan-with-snyk/pull-requests/pull-request-checks/pull-request-experience#configure-pull-request-experience-at-the-integration-level). In the Snyk Web UI, under **Settings** > **Integrations** > **Edit settings**, verify that the option is enabled under **Pull request status checks** > **Code analysis**.
15
15
16
16
<figure><imgsrc="../../../.gitbook/assets/Screenshot 2024-11-27 at 14.14.35.png"alt=""><figcaption><p>Code analysis feature for Pull Request status checks</p></figcaption></figure>
17
17
@@ -39,7 +39,7 @@ The Inline Comments feature adds a detailed comment for each issue identified by
39
39
40
40
This feature is limited to 10 inline comments at Pull Request level. The Summary Comment will display a message if the cap is surpassed.
41
41
42
-
<figure><imgsrc="../../../.gitbook/assets/Screenshot 2024-11-27 at 14.03.12.png"alt=""><figcaption><p>Inline Comment feature for Pull Request Experience</p></figcaption></figure>
42
+
<figure><imgsrc="../../../.gitbook/assets/inline_comment_feature.png"alt=""><figcaption><p>Inline Comment feature for Pull Request Experience</p></figcaption></figure>
43
43
44
44
## Configure Pull Request Experience
45
45
@@ -55,13 +55,13 @@ Configure the Pull Request Experience for one or more integrations in your Snyk
55
55
56
56
1. In the Snyk Organization you wish to activate and configure the Pull Request Experience for, navigate to **Settings** > **Integrations** and select **Edit settings** your connected source code manager to open the settings configuration.
57
57
2. Configure and save the following changes:
58
-
1. Enable issue summary comment: Enable this option to create an Issue Summary Comment on each pull request, which aggregates the PR Check results. If it is disabled, the entire Pull Request Experience is disabled.
58
+
1.**Enable Issue Summary Comment:** Enable this option to create an Issue Summary Comment on each pull request, which aggregates the PR Check results. If it is disabled, the entire Pull Request Experience is disabled.
59
59
2.**Create comments for success cases:** By default, an Issue Summary Comment is created even if no vulnerabilities are detected by the PR Check. Disable this option to stop creating Issue Summary Comments for non-failing PR Checks.
60
-
3. Enable inline comments: Enable inline comments to add a comment for each issue found by Snyk Code PR Check.
60
+
3.**Enable Inline Comments:** Enable inline comments to add a comment for each issue found by Snyk Code PR Check.
61
61
62
62
<figure><imgsrc="../../../.gitbook/assets/Screenshot 2024-11-27 at 11.44.50.png"alt=""><figcaption><p>Configuration details for the GitHub integration</p></figcaption></figure>
63
63
64
-
For the GitHub integration, configure opening fix and upgrade pull requests from a fixed GitHub account, by providing a Personal Access Token (PAT), which has `write` permissions or above to the repos monitored by Snyk. See[](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md)[Opening fix and upgrade pull requests from a fixed GitHub account](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md) for more information.
64
+
For the GitHub integration, configure opening fix and upgrade pull requests from a fixed GitHub account, by providing a Personal Access Token (PAT), which has `write` permissions or above to the repos monitored by Snyk. See[](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md)[Opening fix and upgrade pull requests from a fixed GitHub account](../snyk-pull-or-merge-requests/opening-fix-and-upgrade-pull-requests-from-a-fixed-github-account.md) for more information.
65
65
66
66
<figure><imgsrc="../../../.gitbook/assets/image (1).png"alt=""><figcaption><p>Configuration details for the GitHub integration</p></figcaption></figure>
67
67
@@ -77,8 +77,53 @@ Support for Snyk Pull Request Experience is available for GitLab and Azure Repos
77
77
78
78
* The Data Flow section in the inline comments is not available.
79
79
* Inline comments for vulnerabilities introduced outside of modified lines are unavailable for GitLab.
80
-
* Inline comments for Code Analysis done using Snyk Local Code Engine is unavailable.
80
+
* Inline comments for Code Analysis done using Snyk Local Code Engine are unavailable.
81
81
82
82
### Broker
83
83
84
84
Support for Snyk Pull Request Experience is available for Brokered integrations with the following limitation: the Data Flow section in the inline comments is available only for GitHub, GitHub Cloud App, Bitbucket Cloud, and Bitbucket Connect App.
85
+
86
+
## Frequently Asked Questions (FAQs)
87
+
88
+
### How can I handle false positives?
89
+
90
+
If a finding is a false positive, you can manually resolve the comment in the SCM. It will remain resolved even if the issue is detected again in a subsequent PR check.
91
+
92
+
### What happens to comments when a new commit is pushed?
93
+
94
+
#### **Issue Summary Comment**
95
+
96
+
When a new commit is pushed to the pull request, the existing summary comment is updated with the latest Snyk scan results for that commit. This means the issues count is refreshed to reflect the most recent analysis. No new issue summary comment is added, ensuring developers get a concise view of potential vulnerabilities without being flooded with notifications.
97
+
98
+
#### **Inline Comments**
99
+
100
+
For every pushed commit, a review is created if Snyk Code PR Check detects new issues. Each issue is added as an inline comment. If an issue from a previous commit is fixed in the new commit, its comment is marked as resolved. Unresolved issues remain as inline comments.
101
+
102
+
### Why are PR comments not appearing in my repository?
103
+
104
+
To ensure your repository receives PR comments, review the [Prerequisites for the Snyk Pull Request Experience](pull-request-experience.md#prerequisites-for-the-snyk-pull-request-experience) section. Ensure all required conditions are met and properly fulfilled.
105
+
106
+
Inline comments are available only for issues detected by Snyk Code PR Checks. To ensure that issues appear as inline comments, verify the following requirements:
107
+
108
+
1.**Snyk Code** is enabled for your Organization.
109
+
110
+
<figure><imgsrc="../../../.gitbook/assets/enable_snyk_code.png"alt=""><figcaption><p>Configuration details to enable Snyk Code</p></figcaption></figure>
111
+
112
+
2.**Code Analysis** is enabled in the Pull request status checks section for your integration.
113
+
114
+
<figure><imgsrc="../../../.gitbook/assets/enable_code_analysis.png"alt=""><figcaption><p>Configuration details to enable Code Analysis</p></figcaption></figure>
115
+
116
+
3.**Inline Comments** are enabled in the **Pull Request Experience** section for your integration.
117
+
118
+
<figure><imgsrc="../../../.gitbook/assets/enable_inline_comments.png"alt=""><figcaption><p>Configuration details to enable Inline Comments</p></figcaption></figure>
119
+
120
+
### Why are some findings not appearing as inline comments?
121
+
122
+
Inline comments are only available for issues detected by Snyk Code PR Checks. Their behavior may vary depending on the SCM platform. On most platforms, an inline comment is added for each issue found. However, on GitLab, inline comments are only added for issues found within the files that were modified in the pull request.
123
+
124
+
### Is Snyk Broker supported?
125
+
126
+
Yes. Brokered integrations are supported for both Issue Summary Comment and Inline Comments, with compatibility for both Classic and Universal Broker. 
0 commit comments