Skip to content

Commit 313e02e

Browse files
SamMorrowDrumsjc-clarkmchammer01
authored
Add new limits to Code Scanning results-exceed-limit.md (#52640)
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent a5a3522 commit 313e02e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

content/code-security/code-scanning/troubleshooting-sarif-uploads/results-exceed-limit.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ redirect_from:
2525
Analysis SARIF file exceeded alert limits
2626
Rule tags in SARIF file exceed limits
2727
Alert in SARIF upload exceeded thread flow location limits
28+
Repository is at risk of exceeding the alert limit.
2829
2930
# SARIF results exceed hard limit
3031
Alert(s) in SARIF file exceeded thread flow location limits
@@ -34,6 +35,7 @@ redirect_from:
3435
Analysis SARIF file rejected due to result limits
3536
Analysis SARIF file rejected due to rule limits
3637
Analysis SARIF file rejected due to run limits
38+
All analysis uploads blocked due to alert limit
3739
```
3840

3941
{% data variables.product.prodname_code_scanning_caps %} sets two types of limits on fields in SARIF results files.
@@ -85,3 +87,23 @@ The best way to resolve this problem is usually to identify the query that repor
8587
## Fixing "Analysis SARIF file rejected due to rule tag limits"
8688

8789
You need to update the SARIF file or the generator so that the array of tags reported for each `reportingDescriptor` object is fewer than 10. For more information, see `properties.tags[]` in "[AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#reportingdescriptor-object)."
90+
91+
## Fixing "Repository is at risk of exceeding the alert limit" & "All analysis uploads blocked due to alert limit"
92+
93+
This limit is triggered by a repository producing more unique alerts than should ever exist as part of a well functioning {% data variables.product.prodname_code_scanning %} configuration.
94+
It is possible that this is due to the output of a third-party tool being used, and may not be a user configuration error.
95+
Both user configuration error and tool vendor error are possible causes.
96+
97+
There are a few steps to fix this problem.
98+
99+
1. Look at the SARIF files you are producing to identify the cause of {% data variables.product.prodname_code_scanning %} alerts being classed as distinct across runs of a tool. Usually this is due to one of the following:
100+
* The SARIF `artifactLocation.uri` property (filepath in the {% data variables.product.prodname_code_scanning %} alert user interface) is not deterministic due to the inclusion of temporary directories or generated file names.
101+
* The tool used produces unstable SARIF rule names or `artifactLocation object uri property` values, which is usually the result of using hashes (from git commits or docker image SHAs, for example) or other sources of data that change across runs or environments.
102+
1. Once you have identified the source of the issue, you should update your configuration accordingly, and contact the tool vendor if their tool is the source of the unstable SARIF results.
103+
1. Stop uploading code scanning results for any third-party tools that produce non-deterministic output until they have been fixed by the tool vendor.
104+
105+
### Additional steps for "All analysis uploads blocked due to alert limit"
106+
107+
On top of fixing the code scanning configuration and removing or fixing the output of third-party tools, you will need to contact {% data variables.contact.contact_support %} to assist you in deleting the alerts for any offending configurations.
108+
109+
**There is no self-service method for deleting alerts at this time, so contacting customer support is neccessary before code-scanning can be re-enabled.**

data/reusables/code-scanning/sarif-limits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
| Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. |
1010
| Location per result | 1,000 | Only 100 locations will be included. |
1111
| Tags per rule | 20 | Only 10 tags will be included. |
12+
| Alert Limit | 1,000,000 | None |
1213

1314
{% endrowheaders %}

0 commit comments

Comments
 (0)