Skip to content

ACOMMONS-34 Expose Standards OWASP LLM Top 10 2025, OWASP Top 10 2025, ASVS 5.0, STIG ASD_V6, MASVS 2 metadata#370

Merged
nicolas-gauthier-sonarsource merged 4 commits intomasterfrom
NG/ACOMMONS-34
Oct 30, 2025
Merged

ACOMMONS-34 Expose Standards OWASP LLM Top 10 2025, OWASP Top 10 2025, ASVS 5.0, STIG ASD_V6, MASVS 2 metadata#370
nicolas-gauthier-sonarsource merged 4 commits intomasterfrom
NG/ACOMMONS-34

Conversation

@nicolas-gauthier-sonarsource
Copy link
Copy Markdown
Contributor

@nicolas-gauthier-sonarsource nicolas-gauthier-sonarsource commented Oct 29, 2025

ACOMMONS-34

Part of

@nicolas-gauthier-sonarsource nicolas-gauthier-sonarsource marked this pull request as ready for review October 30, 2025 07:49
Copy link
Copy Markdown
Contributor

@nils-werner-sonarsource nils-werner-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Some nitpick comments

pom.xml Outdated
<properties>
<!-- versions -->
<version.sonar>11.4.0.2922</version.sonar>
<version.sonar>13.3.0.3209</version.sonar>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth renaming the property to sonar-plugin-api. In the past, the API was released with SQS, but it now has its own development cycle.

Comment on lines +534 to +536
.containsExactlyInAnyOrder("cwe:311", "cwe:315", "cwe:614",
"owaspTop10:a2", "owaspTop10:a3",
"owaspTop10-2021:a4", "owaspTop10-2021:a5");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Since this is a list, I prefer not to have two values on the same line, as it suggests a key-value mapping.

Comment on lines +543 to +554
"cwe:311", "cwe:315", "cwe:614",
"masvs-1:MSTG-STORAGE-14", "masvs-2:MASVS-STORAGE-15",
"owaspTop10:a2", "owaspTop10:a3",
"owaspTop10-2021:a4", "owaspTop10-2021:a5",
"owaspTop10-2025:a6", "owaspTop10-2025:a7",
"pciDss-3.2:1.1.1", "pciDss-3.2:1.1.2",
"owaspAsvs-4.0:2.1.1", "owaspAsvs-4.0:2.1.2",
"owaspAsvs-5:2.1.3", "owaspAsvs-5:2.1.4",
"stig-ASD_V5R3:V-222612",
"stig-ASD_V6:V-222613",
"owaspMobileTop10-2024:m3", "owaspMobileTop10-2024:m4",
"owaspLlmTop10-2025:llm01", "owaspLlmTop10-2025:llm10"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having three, two, or just one value on a line makes it harder to read.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each line refers to one version of a standard.

"owaspTop10:a2", "owaspTop10:a3", -> OWASP Top 10 2017
"owaspTop10-2021:a4", "owaspTop10-2021:a5", -> OWASP Top 10 2021
"owaspTop10-2025:a6", "owaspTop10-2025:a7", -> OWASP Top 10 2025
"pciDss-3.2:1.1.1", "pciDss-3.2:1.1.2", -> PCI DSS 3.2

IMO, it helps to follow what is related to each of them.
What would you prefer as an alternative?
I can put everything on one line (with a max size) (not my favorite):

assertThat(securityStandards).containsExactlyInAnyOrder(
      "cwe:311", "cwe:315", "cwe:614", "masvs-1:MSTG-STORAGE-14", "masvs-2:MASVS-STORAGE-15", "owaspTop10:a2", "owaspTop10:a3", "owaspTop10-2021:a4", "owaspTop10-2021:a5",
      "owaspTop10-2025:a6", "owaspTop10-2025:a7", "pciDss-3.2:1.1.1", "pciDss-3.2:1.1.2", "owaspAsvs-4.0:2.1.1", "owaspAsvs-4.0:2.1.2", "owaspAsvs-5:2.1.3", "owaspAsvs-5:2.1.4", 
      "stig-ASD_V5R3:V-222612", "stig-ASD_V6:V-222613", "owaspMobileTop10-2024:m3", "owaspMobileTop10-2024:m4", "owaspLlmTop10-2025:llm01", "owaspLlmTop10-2025:llm10"
    );

Or just have one element per line (IMO it's long but readable):

assertThat(securityStandards).containsExactlyInAnyOrder(
      "cwe:311",
      "cwe:315",
      "cwe:614",
      "masvs-1:MSTG-STORAGE-14",
      "masvs-2:MASVS-STORAGE-15",
      "owaspTop10:a2",
      "owaspTop10:a3",
      "owaspTop10-2021:a4",
      "owaspTop10-2021:a5",
      "owaspTop10-2025:a6",
      "owaspTop10-2025:a7",
      "pciDss-3.2:1.1.1",
      "pciDss-3.2:1.1.2",
      "owaspAsvs-4.0:2.1.1",
      "owaspAsvs-4.0:2.1.2",
      "owaspAsvs-5:2.1.3",
      "owaspAsvs-5:2.1.4",
      "stig-ASD_V5R3:V-222612",
      "stig-ASD_V6:V-222613",
      "owaspMobileTop10-2024:m3",
      "owaspMobileTop10-2024:m4",
      "owaspLlmTop10-2025:llm01",
      "owaspLlmTop10-2025:llm10"
    );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the second option. While grouping standards by line can be helpful, it is not clear what would happen if we have six OWASP mobile standards, as we could exceed the character limit for that line.

"owaspAsvs-4.0:2.1.1", "owaspAsvs-4.0:2.1.2",
"stig-ASD_V5R3:V-222612",
"owaspMobileTop10-2024:m3", "owaspMobileTop10-2024:m4"
"cwe:311", "cwe:315", "cwe:614",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@sonarqube-next
Copy link
Copy Markdown

@nicolas-gauthier-sonarsource nicolas-gauthier-sonarsource merged commit ddf4a1b into master Oct 30, 2025
4 checks passed
@nicolas-gauthier-sonarsource nicolas-gauthier-sonarsource deleted the NG/ACOMMONS-34 branch October 30, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants