Skip to content

Commit 2ec4c4b

Browse files
committed
Add list of supported CWEs
1 parent ffea409 commit 2ec4c4b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

swan-assist/src/main/java/de/fraunhofer/iem/swan/assist/data/JSONFileLoader.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,21 @@ public static Set<Category> getAllCategories() {
234234

235235
Set<Category> categorySet = new HashSet<>();
236236

237-
Set<Category> exclude = new HashSet<>();
238-
exclude.add(Category.CWETEST);
239-
exclude.add(Category.NONE);
240-
exclude.add(Category.RELEVANT);
241-
exclude.add(Category.AUTHENTICATION);
242-
exclude.add(Category.CWE_NONE);
237+
Set<Category> supportedCategories = new HashSet<>();
238+
supportedCategories.add(Category.SOURCE);
239+
supportedCategories.add(Category.SINK);
240+
supportedCategories.add(Category.SANITIZER);
241+
supportedCategories.add(Category.CWE601);
242+
supportedCategories.add(Category.CWE78);
243+
supportedCategories.add(Category.CWE79);
244+
supportedCategories.add(Category.CWE89);
245+
supportedCategories.add(Category.CWE862);
246+
supportedCategories.add(Category.CWE306);
247+
supportedCategories.add(Category.CWE863);
243248

244249
for (Category category : Category.values()) {
245250

246-
if (!exclude.contains(category)) {
251+
if (supportedCategories.contains(category)) {
247252
categorySet.add(category);
248253
}
249254
}

0 commit comments

Comments
 (0)