@@ -78,6 +78,7 @@ public class RuleMetadataLoaderTest {
7878 private static final SonarRuntime SONAR_RUNTIME_10_10 = SonarRuntimeImpl .forSonarLint (Version .create (10 , 10 ));
7979 private static final SonarRuntime SONAR_RUNTIME_10_11 = SonarRuntimeImpl .forSonarLint (Version .create (10 , 11 ));
8080 private static final SonarRuntime SONAR_RUNTIME_11_4 = SonarRuntimeImpl .forSonarLint (Version .create (11 , 4 ));
81+ private static final SonarRuntime SONAR_RUNTIME_13_3 = SonarRuntimeImpl .forSonarLint (Version .create (13 , 3 ));
8182
8283 @ Before
8384 public void setup () {
@@ -530,72 +531,148 @@ class TestRule {
530531 RulesDefinition .Rule rule = context .repository (RULE_REPOSITORY_KEY ).rule ("S2092" );
531532 assertThat (rule .type ()).isEqualTo (RuleType .SECURITY_HOTSPOT );
532533 assertThat (rule .securityStandards ())
533- .containsExactlyInAnyOrder ("cwe:311" , "cwe:315" , "cwe:614" , "owaspTop10:a2" , "owaspTop10:a3" , "owaspTop10-2021:a4" , "owaspTop10-2021:a5" );
534+ .containsExactlyInAnyOrder (
535+ "cwe:311" ,
536+ "cwe:315" ,
537+ "cwe:614" ,
538+ "owaspTop10:a2" ,
539+ "owaspTop10:a3" ,
540+ "owaspTop10-2021:a4" ,
541+ "owaspTop10-2021:a5" );
542+ }
543+
544+ @ Test
545+ public void test_security_standards_on_13_3 () {
546+ Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_13_3 );
547+ assertThat (securityStandards ).containsExactlyInAnyOrder (
548+ "cwe:311" ,
549+ "cwe:315" ,
550+ "cwe:614" ,
551+ "masvs-1:MSTG-STORAGE-14" ,
552+ "masvs-2:MASVS-STORAGE-15" ,
553+ "owaspTop10:a2" ,
554+ "owaspTop10:a3" ,
555+ "owaspTop10-2021:a4" ,
556+ "owaspTop10-2021:a5" ,
557+ "owaspTop10-2025:a6" ,
558+ "owaspTop10-2025:a7" ,
559+ "pciDss-3.2:1.1.1" ,
560+ "pciDss-3.2:1.1.2" ,
561+ "owaspAsvs-4.0:2.1.1" ,
562+ "owaspAsvs-4.0:2.1.2" ,
563+ "owaspAsvs-5:2.1.3" ,
564+ "owaspAsvs-5:2.1.4" ,
565+ "stig-ASD_V5R3:V-222612" ,
566+ "stig-ASD_V6:V-222613" ,
567+ "owaspMobileTop10-2024:m3" ,
568+ "owaspMobileTop10-2024:m4" ,
569+ "owaspLlmTop10-2025:llm01" ,
570+ "owaspLlmTop10-2025:llm10"
571+ );
534572 }
535573
536574 @ Test
537575 public void test_security_standards_on_11_4 () {
538576 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_11_4 );
539577 assertThat (securityStandards ).containsExactlyInAnyOrder (
540- "cwe:311" , "cwe:315" , "cwe:614" ,
541- "owaspTop10:a2" , "owaspTop10:a3" ,
542- "owaspTop10-2021:a4" , "owaspTop10-2021:a5" ,
543- "pciDss-3.2:1.1.1" , "pciDss-3.2:1.1.2" ,
544- "owaspAsvs-4.0:2.1.1" , "owaspAsvs-4.0:2.1.2" ,
545- "stig-ASD_V5R3:V-222612" ,
546- "owaspMobileTop10-2024:m3" , "owaspMobileTop10-2024:m4"
578+ "cwe:311" ,
579+ "cwe:315" ,
580+ "cwe:614" ,
581+ "owaspTop10:a2" ,
582+ "owaspTop10:a3" ,
583+ "owaspTop10-2021:a4" ,
584+ "owaspTop10-2021:a5" ,
585+ "pciDss-3.2:1.1.1" ,
586+ "pciDss-3.2:1.1.2" ,
587+ "owaspAsvs-4.0:2.1.1" ,
588+ "owaspAsvs-4.0:2.1.2" ,
589+ "owaspAsvs-5:2.1.3" ,
590+ "owaspAsvs-5:2.1.4" ,
591+ "stig-ASD_V5R3:V-222612" ,
592+ "stig-ASD_V6:V-222613" ,
593+ "owaspMobileTop10-2024:m3" ,
594+ "owaspMobileTop10-2024:m4"
547595 );
548596 }
549597
550598 @ Test
551599 public void test_security_standards_on_10_10_return_stig () {
552600 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_10_10 );
553601 assertThat (securityStandards ).containsExactlyInAnyOrder (
554- "cwe:311" , "cwe:315" , "cwe:614" ,
555- "owaspTop10:a2" , "owaspTop10:a3" ,
556- "owaspTop10-2021:a4" , "owaspTop10-2021:a5" ,
557- "pciDss-3.2:1.1.1" , "pciDss-3.2:1.1.2" ,
558- "owaspAsvs-4.0:2.1.1" , "owaspAsvs-4.0:2.1.2" ,
559- "stig-ASD_V5R3:V-222612"
602+ "cwe:311" ,
603+ "cwe:315" ,
604+ "cwe:614" ,
605+ "owaspTop10:a2" ,
606+ "owaspTop10:a3" ,
607+ "owaspTop10-2021:a4" ,
608+ "owaspTop10-2021:a5" ,
609+ "pciDss-3.2:1.1.1" ,
610+ "pciDss-3.2:1.1.2" ,
611+ "owaspAsvs-4.0:2.1.1" ,
612+ "owaspAsvs-4.0:2.1.2" ,
613+ "owaspAsvs-5:2.1.3" ,
614+ "owaspAsvs-5:2.1.4" ,
615+ "stig-ASD_V5R3:V-222612" ,
616+ "stig-ASD_V6:V-222613"
560617 );
561618 }
562619
563620 @ Test
564621 public void test_security_standards_on_9_9_return_asvs () {
565622 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_9_9 );
566623 assertThat (securityStandards ).containsExactlyInAnyOrder (
567- "cwe:311" , "cwe:315" , "cwe:614" ,
568- "owaspTop10:a2" , "owaspTop10:a3" ,
569- "owaspTop10-2021:a4" , "owaspTop10-2021:a5" ,
570- "pciDss-3.2:1.1.1" , "pciDss-3.2:1.1.2" ,
571- "owaspAsvs-4.0:2.1.1" , "owaspAsvs-4.0:2.1.2" );
624+ "cwe:311" ,
625+ "cwe:315" ,
626+ "cwe:614" ,
627+ "owaspTop10:a2" ,
628+ "owaspTop10:a3" ,
629+ "owaspTop10-2021:a4" ,
630+ "owaspTop10-2021:a5" ,
631+ "pciDss-3.2:1.1.1" ,
632+ "pciDss-3.2:1.1.2" ,
633+ "owaspAsvs-4.0:2.1.1" ,
634+ "owaspAsvs-4.0:2.1.2" ,
635+ "owaspAsvs-5:2.1.3" ,
636+ "owaspAsvs-5:2.1.4" );
572637 }
573638
574639 @ Test
575640 public void test_security_standards_on_9_5_return_pci_dss () {
576641 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_9_5 );
577642 assertThat (securityStandards ).containsExactlyInAnyOrder (
578- "cwe:311" , "cwe:315" , "cwe:614" ,
579- "owaspTop10:a2" , "owaspTop10:a3" ,
580- "owaspTop10-2021:a4" , "owaspTop10-2021:a5" ,
581- "pciDss-3.2:1.1.1" , "pciDss-3.2:1.1.2" );
643+ "cwe:311" ,
644+ "cwe:315" ,
645+ "cwe:614" ,
646+ "owaspTop10:a2" ,
647+ "owaspTop10:a3" ,
648+ "owaspTop10-2021:a4" ,
649+ "owaspTop10-2021:a5" ,
650+ "pciDss-3.2:1.1.1" ,
651+ "pciDss-3.2:1.1.2" );
582652 }
583653
584654 @ Test
585655 public void test_security_standards_on_9_3_return_owasp_2021 () {
586656 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_9_3 );
587657 assertThat (securityStandards ).containsExactlyInAnyOrder (
588- "cwe:311" , "cwe:315" , "cwe:614" ,
589- "owaspTop10:a2" , "owaspTop10:a3" ,
590- "owaspTop10-2021:a4" , "owaspTop10-2021:a5" );
658+ "cwe:311" ,
659+ "cwe:315" ,
660+ "cwe:614" ,
661+ "owaspTop10:a2" ,
662+ "owaspTop10:a3" ,
663+ "owaspTop10-2021:a4" ,
664+ "owaspTop10-2021:a5" );
591665 }
592666
593667 @ Test
594668 public void test_security_standards_before_9_3 () {
595669 Set <String > securityStandards = getSecurityStandards (SONAR_RUNTIME_9_2 );
596670 assertThat (securityStandards ).containsExactlyInAnyOrder (
597- "cwe:311" , "cwe:315" , "cwe:614" ,
598- "owaspTop10:a2" , "owaspTop10:a3" );
671+ "cwe:311" ,
672+ "cwe:315" ,
673+ "cwe:614" ,
674+ "owaspTop10:a2" ,
675+ "owaspTop10:a3" );
599676 }
600677
601678 @ Test
@@ -714,7 +791,8 @@ public String attribute() {
714791 assertThat (rule .param ("Param0" ).description ()).isEqualTo ("Param0 Description" );
715792 assertThat (rule .param ("Param1" ).type ()).isEqualTo (RuleParamType .INTEGER );
716793 assertThat (rule .param ("Param1" ).defaultValue ()).isEqualTo ("10" );
717- assertThat (rule .param ("Param1" ).description ()).isEqualTo ("Param1 Description" ); }
794+ assertThat (rule .param ("Param1" ).description ()).isEqualTo ("Param1 Description" );
795+ }
718796
719797 @ Test
720798 public void test_create_rule_from_rule_manifest_with_constant_remediation () {
0 commit comments