Feature/rust detection rules 472#474
Open
netanmangal wants to merge 5 commits into
Open
Conversation
Add initial Rust cryptographic detection module following the existing Go module pattern. Includes empty RustDetectionRules, pom.xml, and Inventory rule resources. The Rust module is registered in the parent pom.xml as a new submodule. Signed-off-by: netanmangal <imnetanmangal@gmail.com>
Add detection rules for Rust's ring cryptographic library covering: - RingRSA: key pair import (from_pkcs8, from_der), signing, verification - RingECDSA: key pair import, signing, verification - RingECDH: ephemeral key generation and key agreement Wire all ring rules into RustDetectionRules. Signed-off-by: netanmangal <imnetanmangal@gmail.com>
Add detection rules for Rust's rustls TLS library covering: - ClientConfig/ServerConfig builder and builder_with_protocol_versions - ClientConnection/ServerConnection creation with config dependencies All rules use ProtocolContext with TLS kind, following the GoCryptoTLS pattern. Signed-off-by: netanmangal <imnetanmangal@gmail.com>
…t#472) Add detection rules for post-quantum cryptographic algorithms from the RustCrypto ecosystem: - RustCryptoMLKEM: ML-KEM-512/768/1024 key generation, encapsulation, and decapsulation (FIPS 203) - RustCryptoMLDSA: ML-DSA-44/65/87 key generation, signing, and verification (FIPS 204) These follow the same pattern as GoCryptoMLKEM with depending detection rules chaining from key generation to operations. Signed-off-by: netanmangal <imnetanmangal@gmail.com>
Add tests for all Rust detection rule classes: RustDetectionRules, RingRSA, RingECDSA, RingECDH, RustlsTLS, RustCryptoMLKEM, and RustCryptoMLDSA. Tests verify rule counts, non-null constraints, bundle identifiers, and depending detection rule linkage. Signed-off-by: netanmangal <imnetanmangal@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Rust cryptographic detection rules. It's the first Rust language support in sonar-cryptography.
Relates to #472
22 detection rules across 6 classes:
RingRSARingECDSARingECDHRustlsTLSRustCryptoMLKEMRustCryptoMLDSAFollows the Go module pattern exactly:
RustDetectionRules.javaaggregator, per-library rule classes withDetectionRuleBuilder, SonarQube metadata, 7 test files. Module added to parentpom.xml.