Skip to content

Add a SonarQube switch for experimental behaviors - #562

Open
n1ckl0sk0rtge wants to merge 1 commit into
feature/crypto-behavior-taxonomyfrom
feat/experimental-behaviors-setting
Open

n1ckl0sk0rtge wants to merge 1 commit into
feature/crypto-behavior-taxonomyfrom
feat/experimental-behaviors-setting

Conversation

@n1ckl0sk0rtge

Copy link
Copy Markdown
Contributor

PR #494 currently emits experimental behavior annotations for every scan. This adds a boolean SonarQube setting, sonar.cryptoScanner.behaviors, labeled Behaviors (experimental) in global and project settings. It defaults to false; setting it to true enables behavior collection and the cbomkit:behaviors metadata property. The crypto inventory is generated with either value.

The change covers the plugin configuration and output modules, with tests for unset, false and true values and documentation for the UI and scanner options.

Stacked on #494. The base is feature/crypto-behavior-taxonomy; merge #494 first.

Validation: 97 tests passed, covering all output and plugin tests and matching mapper tests. Spotless and Checkstyle passed on Java 21.

JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn -B \
  -pl output,sonar-cryptography-plugin -am spotless:check test \
  -Dtest=AlgorithmTest,RelatedCryptoMaterialsTest,CryptoBehaviorMetadataTest,ProtocolTest,MergeDetectionLocationTest,KeyTest,CryptoBehaviorMapperTest,BehaviorCollectorTest,CryptoBehaviorTaxonomyTest,ScannerManagerTest,HeapAttributionSummaryTest,JavaFileCheckRegistrarTest,RuleAccessorArchitectureTest,PluginTest,OutputFileJobTest \
  -Dsurefire.failIfNoSpecifiedTests=false

Signed-off-by: Nicklas Körtge <Nicklas.Koertge1@ibm.com>
@n1ckl0sk0rtge
n1ckl0sk0rtge requested a review from a team as a code owner November 6, 2026 16:16
@n1ckl0sk0rtge
n1ckl0sk0rtge added this pull request to stack #563 November 6, 2026 16:16
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.

1 participant