Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify rules S2259;S2583;S2589;S3518;S3655;S3959: undo deprecation #4245

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions rules/S2259/java/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"status": "deprecated",
"tags": [],
"tags": [
"cwe",
"cert",
"symbolic-execution"
],
"securityStandards": {
"CERT": [
"EXP34-C.",
Expand All @@ -9,6 +12,5 @@
"CWE": [
476
]
},
"defaultQualityProfiles": []
}
}
4 changes: 0 additions & 4 deletions rules/S2259/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._

== Why is this an issue?

A reference to `null` should never be dereferenced/accessed.
Expand Down
13 changes: 9 additions & 4 deletions rules/S2583/java/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"status": "deprecated",
"tags": [],
"tags": [
"cwe",
"cert",
"unused",
"suspicious",
"pitfall",
"symbolic-execution"
],
"securityStandards": {
"CERT": [
"MSC12-C."
Expand All @@ -10,6 +16,5 @@
571,
570
]
},
"defaultQualityProfiles": []
}
}
4 changes: 0 additions & 4 deletions rules/S2583/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._

== Why is this an issue?

include::../description.adoc[]
Expand Down
9 changes: 6 additions & 3 deletions rules/S2589/java/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"status": "deprecated",
"tags": [],
"defaultQualityProfiles": []
"tags": [
"cwe",
"suspicious",
"redundant",
"symbolic-execution"
]
}
4 changes: 0 additions & 4 deletions rules/S2589/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._

include::../description-common.adoc[]

=== Code examples
Expand Down
11 changes: 7 additions & 4 deletions rules/S3518/java/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"status": "deprecated",
"tags": [],
"tags": [
"cwe",
"denial-of-service",
"cert",
"symbolic-execution"
],
"securityStandards": {
"CERT": [
"NUM02-J.",
Expand All @@ -12,6 +16,5 @@
"STIG ASD_V5R3": [
"V-222612"
]
},
"defaultQualityProfiles": []
}
}
4 changes: 0 additions & 4 deletions rules/S3518/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._


If the denominator to an integer division or remainder operation is zero, a
`ArithmeticException` is thrown.

Expand Down
7 changes: 4 additions & 3 deletions rules/S3655/java/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"title": "Optional value should only be accessed after calling isPresent()",
"status": "deprecated",
"tags": [],
"defaultQualityProfiles": []
"tags": [
"cwe",
"symbolic-execution"
]
}
6 changes: 1 addition & 5 deletions rules/S3655/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._

== Why is this an issue?

``++Optional++`` value can hold either a value or not. The value held in the ``++Optional++`` can be accessed using the ``++get()++`` method, but it will throw a
``++Optional++`` value can hold either a value or not. The value held in the ``++Optional++`` can be accessed using the ``++get()++`` method, but it will throw a

``++NoSuchElementException++`` if there is no value present. To avoid the exception, calling the ``++isPresent()++`` or ``++! isEmpty()++`` method should always be done before any call to ``++get()++``.

Expand Down
19 changes: 16 additions & 3 deletions rules/S3959/java/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,29 @@
},
"attribute": "LOGICAL"
},
"status": "deprecated",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "10min"
},
"tags": [],
"tags": [
"java8",
"symbolic-execution"
],
"extra": {
"replacementRules": [

],
"legacyKeys": [

]
},
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-3959",
"sqKey": "S3959",
"scope": "All",
"defaultQualityProfiles": [],
"defaultQualityProfiles": [
"Sonar way"
],
"quickfix": "unknown"
}
4 changes: 0 additions & 4 deletions rules/S3959/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

_We are deprecating our legacy symbolic execution engine in favor of our more advanced commercial engine.
The legacy engine will remain Open Source for the community as a separate plugin and will receive no further updates by SonarSource._

== Why is this an issue?

Stream operations are divided into intermediate and terminal operations, and are combined to form stream pipelines. After the terminal operation is performed, the stream pipeline is considered consumed, and cannot be used again. Such a reuse will yield unexpected results.
Expand Down
Loading