mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Crypto: Add support to trace keys, add support to find prior key gen properties that configure downstream operations. Add key size tests
This commit is contained in:
@@ -1051,7 +1051,11 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
||||
digestLength = 512 // TODO: verify
|
||||
}
|
||||
|
||||
abstract private class KeyCreationOperationInstance extends OperationInstance {
|
||||
/**
|
||||
* Users should not extend this class directly, but instead use
|
||||
* `KeyCreationOperationInstance` or `KeyDerivationOperationInstance`.
|
||||
*/
|
||||
abstract class KeyCreationOperationInstance extends OperationInstance {
|
||||
abstract string getKeyCreationTypeDescription();
|
||||
|
||||
/**
|
||||
@@ -1732,6 +1736,12 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
||||
|
||||
override string getInternalType() { result = instance.getKeyCreationTypeDescription() }
|
||||
|
||||
NodeBase getAKeySizeSource() {
|
||||
result = instance.getKeySizeConsumer().getConsumer().getAGenericSourceNode()
|
||||
or
|
||||
result = instance.getKeySizeConsumer().getConsumer().getAKnownSourceNode()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the key artifact produced by this operation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user