aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-09-05 17:29:35 +0200
committersonartech <sonartech@sonarsource.com>2024-09-12 20:02:54 +0000
commit55dfebf3ece23eb11e9d2ea9b862b6fad3dbbfbc (patch)
tree1dd5101d80aad8a0ad309aac649f9fa3a52ef8ab /sonar-plugin-api-impl
parent574637dc96a0655344a0623fa1aae861fe073a86 (diff)
downloadsonarqube-55dfebf3ece23eb11e9d2ea9b862b6fad3dbbfbc.tar.gz
sonarqube-55dfebf3ece23eb11e9d2ea9b862b6fad3dbbfbc.zip
SONAR-22914 Add a Sensor to import FOSSA results
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
index 449c272c8df..6a904f15ee5 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
@@ -44,6 +44,7 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
private RuleType type;
private String engineId;
private String ruleId;
+ private String cveId;
private Map<SoftwareQuality, org.sonar.api.issue.impact.Severity> impacts = new EnumMap<>(SoftwareQuality.class);
private CleanCodeAttribute cleanCodeAttribute;
@@ -84,6 +85,10 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
return ruleId;
}
+ public String cveId() {
+ return cveId;
+ }
+
@Override
public Severity severity() {
return this.severity;
@@ -131,6 +136,11 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
return this;
}
+ public NewExternalIssue cveId(String cveId) {
+ this.cveId = cveId;
+ return this;
+ }
+
@Override
public DefaultExternalIssue forRule(RuleKey ruleKey) {
this.engineId = ruleKey.repository();