Restricted signature input nodes to verify nodes

This commit is contained in:
Fredrik Dahlgren
2025-06-02 15:37:33 +02:00
committed by GitHub
parent 5fe17abe31
commit d0739b21e5

View File

@@ -2173,7 +2173,8 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
override NodeBase getChild(string key) {
result = super.getChild(key)
or
// [KNOWN_OR_UNKNOWN]
// [KNOWN_OR_UNKNOWN] - only if we know the type is verify
this.getKeyOperationSubtype() = TVerifyMode() and
key = "Signature" and
if exists(this.getASignatureArtifact())
then result = this.getASignatureArtifact()