@@ -11,17 +11,20 @@ abstract class InsufficientKeySizeSink extends DataFlow::Node { }
1111
1212// TODO: Consider if below 3 sources should be private and if it's possible to only use InsufficientKeySizeSource in the configs
1313// TODO: add QLDocs if keeping non-private
14+ /** A source for an insufficient key size (asymmetric-non-ec). */
1415class AsymmetricNonECSource extends InsufficientKeySizeSource {
1516 AsymmetricNonECSource ( ) { getNodeIntValue ( this ) < 2048 }
1617}
1718
19+ /** A source for an insufficient key size (asymmetric-ec). */
1820class AsymmetricECSource extends InsufficientKeySizeSource {
1921 AsymmetricECSource ( ) {
2022 getNodeIntValue ( this ) < 256 or
2123 getECKeySize ( this .asExpr ( ) .( StringLiteral ) .getValue ( ) ) < 256 // need this for the cases when the key size is embedded in the curve name.
2224 }
2325}
2426
27+ /** A source for an insufficient key size (symmetric). */
2528class SymmetricSource extends InsufficientKeySizeSource {
2629 SymmetricSource ( ) { getNodeIntValue ( this ) < 128 }
2730}
@@ -46,6 +49,7 @@ private int getECKeySize(string algorithm) {
4649
4750// TODO: Consider if below 3 sinks should be private and if it's possible to only use InsufficientKeySizeSink in the configs
4851// TODO: add QLDocs if keeping non-private
52+ /** A sink for an insufficient key size (asymmetric-non-ec). */
4953class AsymmetricNonECSink extends InsufficientKeySizeSink {
5054 AsymmetricNonECSink ( ) {
5155 hasKeySizeInInitMethod ( this , "asymmetric-non-ec" )
@@ -63,6 +67,7 @@ private class AsymmetricNonECSpec extends RefType {
6367 }
6468}
6569
70+ /** A sink for an insufficient key size (asymmetric-ec). */
6671class AsymmetricECSink extends InsufficientKeySizeSink {
6772 AsymmetricECSink ( ) {
6873 hasKeySizeInInitMethod ( this , "asymmetric-ec" )
@@ -71,6 +76,7 @@ class AsymmetricECSink extends InsufficientKeySizeSink {
7176 }
7277}
7378
79+ /** A sink for an insufficient key size (symmetric). */
7480class SymmetricSink extends InsufficientKeySizeSink {
7581 SymmetricSink ( ) { hasKeySizeInInitMethod ( this , "symmetric" ) }
7682}
0 commit comments