Csharp first comprehensive rules - #520
Open
fynnth wants to merge 11 commits into
Open
Conversation
Ports the AES/AesGcm/AesCcm rule expansion from the aes-related-crypto reference branch: CreateEncryptor/CreateDecryptor, EncryptCbc/DecryptCbc, EncryptEcb/DecryptEcb, EncryptCfb/DecryptCfb, Try* variants, GenerateKey/ GenerateIV, and AesGcm/AesCcm Encrypt/Decrypt operations as depending detection rules on the existing constructor/factory rules. Adds ModeFactory(String) to emit a constant Mode value when the mode is encoded in the method name (e.g. EncryptCbc) rather than a parameter, and wires ENCRYPT/DECRYPT/GENERATEKEY/GENERATEIV functionality translation into CSharpCipherContextTranslator. Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
…s extensive testing to be verified and assumed correct Signed-off-by: Fynn Thierling <fynnth@outlook.de>
…ication and testing Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
Signed-off-by: Fynn Thierling <fynnth@outlook.de>
…ring the batch run Signed-off-by: Fynn Thierling <fynnth@outlook.de>
fynnth
marked this pull request as ready for review
August 21, 2026 09:53
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.
Hi all,
This adds the first iteration of comprehensive detection rule coverage for System.security.cryptography (without chacha20poly1305 since this is covered by #506).
There are known gaps:
But what is done correctly:
I have tested this in the following manner:
I think this is a good state to make the pr before reworking the engine for parameters and extending to some additional namespaces.
Best regards,
Fynn