---
policy: /ce/ca/azure/virtual-machine/trusted-launch
logic: /ce/ca/azure/virtual-machine/trusted-launch/prod.logic.yaml
executionTime: 2025-04-24T23:46:30.635431293Z
rows:
  - id: test1
    match: true
    status:
      expected: DISAPPEARED
      actual: DISAPPEARED
    conditionIndex:
      expected: 99
      actual: 99
    conditionText:
      expected: isDisappeared(CA10__disappearanceTime__c)
      actual: isDisappeared(CA10__disappearanceTime__c)
    runtimeError: {}
  - id: test2
    match: true
    status:
      expected: INCOMPLIANT
      actual: INCOMPLIANT
    conditionIndex:
      expected: 199
      actual: 199
    conditionText:
      expected: extract('CA10__securityProfileSecurityType__c').isEmpty()
      actual: extract('CA10__securityProfileSecurityType__c').isEmpty()
    runtimeError: {}
  - id: test3
    match: true
    status:
      expected: INCOMPLIANT
      actual: INCOMPLIANT
    conditionIndex:
      expected: 299
      actual: 299
    conditionText:
      expected: extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Disabled'
      actual: extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Disabled'
    runtimeError: {}
  - id: test4
    match: true
    status:
      expected: INCOMPLIANT
      actual: INCOMPLIANT
    conditionIndex:
      expected: 399
      actual: 399
    conditionText:
      expected: extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Disabled'
      actual: extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Disabled'
    runtimeError: {}
  - id: test5
    match: true
    status:
      expected: INCOMPLIANT
      actual: INCOMPLIANT
    conditionIndex:
      expected: 499
      actual: 499
    conditionText:
      expected: extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Enabled'
      actual: extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Enabled'
    runtimeError: {}
  - id: test6
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 599
      actual: 599
    conditionText:
      expected: extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Enabled'
      actual: extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c')
        == 'Enabled'
    runtimeError: {}
usedFiles:
  - path: /ce/ca/azure/virtual-machine/trusted-launch/policy.yaml
    md5Hash: AF961FD62D6CFFA96DC0710DBFAAD415
    content: |
      ---
      names:
        full: Azure Virtual Machine Trusted Launch is not enabled
        contextual: Trusted Launch is not enabled
      description: "When Secure Boot and vTPM are enabled together, they provide a strong\
        \ foundation for protecting your VM from boot attacks. For example,   if an attacker\
        \ attempts to replace the bootloader with a malicious version,   Secure Boot will\
        \ prevent the VM from booting. If the attacker is able to bypass Secure Boot and\
        \ install a malicious bootloader, vTPM can be used to detect the intrusion and alert\
        \ you."
      type: COMPLIANCE_POLICY
      categories:
        - SECURITY
      frameworkMappings:
        - "/frameworks/cis-azure-v2.1.0/07/09"
        - "/frameworks/cis-azure-v3.0.0/08/11"
        - "/frameworks/cloudaware/resource-security/threat-protection"
  - path: /ce/ca/azure/virtual-machine/trusted-launch/prod.logic.yaml
    md5Hash: D5750DA6C7E5992BCAA75407310A5E8D
    content: |-
      ---
      inputType: "CA10__CaAzureVirtualMachine__c"
      importExtracts:
        - file: "/types/CA10__CaAzureVirtualMachine__c/object.extracts.yaml"
      testData:
        - file: "test-data.json"
      conditions:
        - status: "INCOMPLIANT"
          currentStateMessage: "Security Type is not set."
          remediationMessage: "Consider setting the SecurityType of the virtual machine.
           It has to be set to any specified value to enable UefiSettings."
          check:
            IS_EMPTY:
              arg:
                EXTRACT: "CA10__securityProfileSecurityType__c"
        - status: "INCOMPLIANT"
          currentStateMessage: "Secure Boot and vTPM are disabled."
          remediationMessage: "Consider enabling Secure Boot and vTPM."
          check:
            AND:
              args:
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsVTpm__c"
                    right:
                      TEXT: "Disabled"
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsSecureBoot__c"
                    right:
                      TEXT: "Disabled"
        - status: "INCOMPLIANT"
          currentStateMessage: "Secure Boot is disabled."
          remediationMessage: "Consider enabling Secure Boot."
          check:
            AND:
              args:
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsVTpm__c"
                    right:
                      TEXT: "Enabled"
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsSecureBoot__c"
                    right:
                      TEXT: "Disabled"
        - status: "INCOMPLIANT"
          currentStateMessage: "vTPM is disabled."
          remediationMessage: "Consider enabling and vTPM."
          check:
            AND:
              args:
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsVTpm__c"
                    right:
                      TEXT: "Disabled"
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsSecureBoot__c"
                    right:
                      TEXT: "Enabled"
        - status: "COMPLIANT"
          currentStateMessage: "Secure Boot and vTPM are enabled."
          check:
            AND:
              args:
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsVTpm__c"
                    right:
                      TEXT: "Enabled"
                - IS_EQUAL:
                    left:
                      EXTRACT: "CA10__uefiSettingsSecureBoot__c"
                    right:
                      TEXT: "Enabled"
      otherwise:
        status: "UNDETERMINED"
        currentStateMessage: "Unexpected values in the fields."
  - path: /types/CA10__CaAzureVirtualMachine__c/object.extracts.yaml
    md5Hash: BB3E93736AB7B2263BEBED792F8D3D47
    content: "---\nextracts:\n# Values: TrustedLaunch, ConfidentialVM. Nullable. Retrieved\
      \ via Microsoft.Compute/virtualMachines\n  - name: \"CA10__securityProfileSecurityType__c\"\
      \n    value: \n      FIELD:\n        path: \"CA10__securityProfileSecurityType__c\"\
      \n# Values: Enabled, Disabled. Nullable. Retrieved via Microsoft.Compute/virtualMachines\n\
      \  - name: \"CA10__uefiSettingsVTpm__c\"\n    value: \n      FIELD:\n      \
      \  path: \"CA10__uefiSettingsVTpm__c\"\n# Values: Enabled, Disabled. Nullable.\
      \ Retrieved via Microsoft.Compute/virtualMachines\n  - name: \"CA10__uefiSettingsSecureBoot__c\"\
      \n    value: \n      FIELD:\n        path: \"CA10__uefiSettingsSecureBoot__c\"\
      \              "
  - path: /ce/ca/azure/virtual-machine/trusted-launch/test-data.json
    md5Hash: 8E84C72C143C7319969FE5A73A1A8867
    content: |-
      [
          {
              "expectedResult": {
                  "status": "DISAPPEARED",
                  "conditionIndex": "99",
                  "conditionText": "isDisappeared(CA10__disappearanceTime__c)",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test1",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": "2024-06-19T23:28:45Z",
              "CA10__securityProfileSecurityType__c": "TrustedLaunch",
              "CA10__uefiSettingsVTpm__c": "Enabled",
              "CA10__uefiSettingsSecureBoot__c": "Enabled",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          },
          {
              "expectedResult": {
                  "status": "INCOMPLIANT",
                  "conditionIndex": "199",
                  "conditionText": "extract('CA10__securityProfileSecurityType__c').isEmpty()",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test2",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": null,
              "CA10__securityProfileSecurityType__c": "",
              "CA10__uefiSettingsVTpm__c": "",
              "CA10__uefiSettingsSecureBoot__c": "",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          },
          {
              "expectedResult": {
                  "status": "INCOMPLIANT",
                  "conditionIndex": "299",
                  "conditionText": "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test3",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": null,
              "CA10__securityProfileSecurityType__c": "TrustedLaunch",
              "CA10__uefiSettingsVTpm__c": "Disabled",
              "CA10__uefiSettingsSecureBoot__c": "Disabled",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          },
          {
              "expectedResult": {
                  "status": "INCOMPLIANT",
                  "conditionIndex": "399",
                  "conditionText": "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test4",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": null,
              "CA10__securityProfileSecurityType__c": "TrustedLaunch",
              "CA10__uefiSettingsVTpm__c": "Enabled",
              "CA10__uefiSettingsSecureBoot__c": "Disabled",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          },
          {
              "expectedResult": {
                  "status": "INCOMPLIANT",
                  "conditionIndex": "499",
                  "conditionText": "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test5",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": null,
              "CA10__securityProfileSecurityType__c": "TrustedLaunch",
              "CA10__uefiSettingsVTpm__c": "Disabled",
              "CA10__uefiSettingsSecureBoot__c": "Enabled",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          },
          {
              "expectedResult": {
                  "status": "COMPLIANT",
                  "conditionIndex": "599",
                  "conditionText": "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'",
                  "runtimeError": null
              },
              "context": {
                  "snapshotTime": "2024-06-28T08:24:16Z"
              },
              "Id": "test6",
              "RecordTypeId": "RecordTypeId",
              "CA10__disappearanceTime__c": null,
              "CA10__securityProfileSecurityType__c": "TrustedLaunch",
              "CA10__uefiSettingsVTpm__c": "Enabled",
              "CA10__uefiSettingsSecureBoot__c": "Enabled",
              "RecordType": {
                  "DeveloperName": "RecordTypeId",
                  "Id": "RecordTypeId"
              }
          }
      ]
script: |-
  CREATE TEMP FUNCTION mock_ExpectedResult()
  RETURNS ARRAY<STRUCT<
          Id STRING,
          expectedResult STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, runtimeError STRING>
      >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "Id" : "test1",
    "expectedResult" : {
      "status" : "DISAPPEARED",
      "conditionIndex" : "99",
      "conditionText" : "isDisappeared(CA10__disappearanceTime__c)",
      "runtimeError" : null
    }
  }, {
    "Id" : "test2",
    "expectedResult" : {
      "status" : "INCOMPLIANT",
      "conditionIndex" : "199",
      "conditionText" : "extract('CA10__securityProfileSecurityType__c').isEmpty()",
      "runtimeError" : null
    }
  }, {
    "Id" : "test3",
    "expectedResult" : {
      "status" : "INCOMPLIANT",
      "conditionIndex" : "299",
      "conditionText" : "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'",
      "runtimeError" : null
    }
  }, {
    "Id" : "test4",
    "expectedResult" : {
      "status" : "INCOMPLIANT",
      "conditionIndex" : "399",
      "conditionText" : "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'",
      "runtimeError" : null
    }
  }, {
    "Id" : "test5",
    "expectedResult" : {
      "status" : "INCOMPLIANT",
      "conditionIndex" : "499",
      "conditionText" : "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'",
      "runtimeError" : null
    }
  }, {
    "Id" : "test6",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "599",
      "conditionText" : "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'",
      "runtimeError" : null
    }
  } ];
  """;

  CREATE TEMP FUNCTION mock_CA10__CaAzureVirtualMachine__c()
  RETURNS ARRAY<STRUCT<
      Id STRING,
      RecordTypeId STRING,
      CA10__disappearanceTime__c TIMESTAMP,
      CA10__securityProfileSecurityType__c STRING,
      CA10__uefiSettingsVTpm__c STRING,
      CA10__uefiSettingsSecureBoot__c STRING,
      context STRUCT<
          snapshotTime TIMESTAMP
      >
  >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test1",
    "RecordTypeId" : "RecordTypeId",
    "CA10__disappearanceTime__c" : new Date("2024-06-19T23:28:45Z"),
    "CA10__securityProfileSecurityType__c" : "TrustedLaunch",
    "CA10__uefiSettingsVTpm__c" : "Enabled",
    "CA10__uefiSettingsSecureBoot__c" : "Enabled"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test2",
    "RecordTypeId" : "RecordTypeId",
    "CA10__securityProfileSecurityType__c" : "",
    "CA10__uefiSettingsVTpm__c" : "",
    "CA10__uefiSettingsSecureBoot__c" : ""
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test3",
    "RecordTypeId" : "RecordTypeId",
    "CA10__securityProfileSecurityType__c" : "TrustedLaunch",
    "CA10__uefiSettingsVTpm__c" : "Disabled",
    "CA10__uefiSettingsSecureBoot__c" : "Disabled"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test4",
    "RecordTypeId" : "RecordTypeId",
    "CA10__securityProfileSecurityType__c" : "TrustedLaunch",
    "CA10__uefiSettingsVTpm__c" : "Enabled",
    "CA10__uefiSettingsSecureBoot__c" : "Disabled"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test5",
    "RecordTypeId" : "RecordTypeId",
    "CA10__securityProfileSecurityType__c" : "TrustedLaunch",
    "CA10__uefiSettingsVTpm__c" : "Disabled",
    "CA10__uefiSettingsSecureBoot__c" : "Enabled"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "Id" : "test6",
    "RecordTypeId" : "RecordTypeId",
    "CA10__securityProfileSecurityType__c" : "TrustedLaunch",
    "CA10__uefiSettingsVTpm__c" : "Enabled",
    "CA10__uefiSettingsSecureBoot__c" : "Enabled"
  } ];
  """;

  CREATE TEMP FUNCTION mock_RecordType()
  RETURNS ARRAY<STRUCT<
      DeveloperName STRING,
      Id STRING,
      context STRUCT<
          snapshotTime TIMESTAMP
      >
  >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "context" : {
      "snapshotTime" : new Date("2024-06-28T08:24:16Z")
    },
    "DeveloperName" : "RecordTypeId",
    "Id" : "RecordTypeId"
  } ];
  """;

  CREATE TEMP FUNCTION process_CA10__CaAzureVirtualMachine__c(
      obj STRUCT<
          Id STRING,
          RecordTypeId STRING,
          CA10__disappearanceTime__c TIMESTAMP,
          CA10__securityProfileSecurityType__c STRING,
          CA10__uefiSettingsVTpm__c STRING,
          CA10__uefiSettingsSecureBoot__c STRING,
          RecordType STRUCT<
              DeveloperName STRING,
              Id STRING
          >
      >,
      snapshotTime TIMESTAMP
  )
  RETURNS STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, currentStateMessage STRING, currentStateReferences STRING, remediation STRING, runtimeError STRING>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
      var TextLib = new function () {
          this.normalize = function(arg) {
              return arg == null ? '' : arg.replace(/\s+/g, ' ').trim().toLowerCase();
          };
          this.isEmpty = function(arg) {
              return this.normalize(arg) == '';
          };
          this.isNotEmpty = function(arg) {
              return this.normalize(arg) != '';
          };
          this.equal = function(left, right) {
              return this.normalize(left) == this.normalize(right);
          };
          this.notEqual = function(left, right) {
              return this.normalize(left) != this.normalize(right);
          };
          this.startsWith = function(arg, substring) {
              return this.normalize(arg).startsWith(this.normalize(substring));
          };
          this.endsWith = function(arg, substring) {
              return this.normalize(arg).endsWith(this.normalize(substring));
          };
          this.contains = function(arg, substring) {
              return this.normalize(arg).includes(this.normalize(substring));
          };
      }();
      var references1 = [];
      // condition[0], conditionIndex:[0..99]
      references1.push('Deleted From Azure [CA10__disappearanceTime__c]: ' + obj.CA10__disappearanceTime__c);
      if (obj.CA10__disappearanceTime__c != null) {
          return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
      }
      // condition[1], conditionIndex:[100..199]
      function extract3() { if (!this.out) { this.out = obj.CA10__securityProfileSecurityType__c; } return this.out; };
      references1.push('Security Profile: Security Type [obj.CA10__securityProfileSecurityType__c]: ' + obj.CA10__securityProfileSecurityType__c);
      if (TextLib.isEmpty(extract3.call(extract3))) {
          return {status: 'INCOMPLIANT', conditionIndex: 199, conditionText: "extract('CA10__securityProfileSecurityType__c').isEmpty()", currentStateMessage: "Security Type is not set.", currentStateReferences: references1.join('\n'), remediation: "Consider setting the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.", runtimeError: null};
      }
      // condition[2], conditionIndex:[200..299]
      function extract6() { if (!this.out) { this.out = obj.CA10__uefiSettingsVTpm__c; } return this.out; };
      function extract9() { if (!this.out) { this.out = obj.CA10__uefiSettingsSecureBoot__c; } return this.out; };
      references1.push('UEFI Settings: vTPM [obj.CA10__uefiSettingsVTpm__c]: ' + obj.CA10__uefiSettingsVTpm__c);
      references1.push('UEFI Settings: Secure Boot [obj.CA10__uefiSettingsSecureBoot__c]: ' + obj.CA10__uefiSettingsSecureBoot__c);
      if (TextLib.equal(extract6.call(extract6), 'Disabled') && TextLib.equal(extract9.call(extract9), 'Disabled')) {
          return {status: 'INCOMPLIANT', conditionIndex: 299, conditionText: "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'", currentStateMessage: "Secure Boot and vTPM are disabled.", currentStateReferences: references1.join('\n'), remediation: "Consider enabling Secure Boot and vTPM.", runtimeError: null};
      }
      // condition[3], conditionIndex:[300..399]
      function extract12() { if (!this.out) { this.out = obj.CA10__uefiSettingsVTpm__c; } return this.out; };
      function extract15() { if (!this.out) { this.out = obj.CA10__uefiSettingsSecureBoot__c; } return this.out; };
      if (TextLib.equal(extract12.call(extract12), 'Enabled') && TextLib.equal(extract15.call(extract15), 'Disabled')) {
          return {status: 'INCOMPLIANT', conditionIndex: 399, conditionText: "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Disabled'", currentStateMessage: "Secure Boot is disabled.", currentStateReferences: references1.join('\n'), remediation: "Consider enabling Secure Boot.", runtimeError: null};
      }
      // condition[4], conditionIndex:[400..499]
      function extract18() { if (!this.out) { this.out = obj.CA10__uefiSettingsVTpm__c; } return this.out; };
      function extract21() { if (!this.out) { this.out = obj.CA10__uefiSettingsSecureBoot__c; } return this.out; };
      if (TextLib.equal(extract18.call(extract18), 'Disabled') && TextLib.equal(extract21.call(extract21), 'Enabled')) {
          return {status: 'INCOMPLIANT', conditionIndex: 499, conditionText: "extract('CA10__uefiSettingsVTpm__c') == 'Disabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'", currentStateMessage: "vTPM is disabled.", currentStateReferences: references1.join('\n'), remediation: "Consider enabling and vTPM.", runtimeError: null};
      }
      // condition[5], conditionIndex:[500..599]
      function extract24() { if (!this.out) { this.out = obj.CA10__uefiSettingsVTpm__c; } return this.out; };
      function extract27() { if (!this.out) { this.out = obj.CA10__uefiSettingsSecureBoot__c; } return this.out; };
      if (TextLib.equal(extract24.call(extract24), 'Enabled') && TextLib.equal(extract27.call(extract27), 'Enabled')) {
          return {status: 'COMPLIANT', conditionIndex: 599, conditionText: "extract('CA10__uefiSettingsVTpm__c') == 'Enabled' && extract('CA10__uefiSettingsSecureBoot__c') == 'Enabled'", currentStateMessage: "Secure Boot and vTPM are enabled.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
      }
      return {status: 'UNDETERMINED', conditionIndex: 600, conditionText: "otherwise", currentStateMessage: "Unexpected values in the fields.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
  """;


  SELECT
    expectedResult.Id as Id,
    IF (
      IFNULL(expectedResult.expectedResult.status, '') = IFNULL(sObject.result.status, '')
      AND IFNULL(expectedResult.expectedResult.conditionIndex, -1) = IFNULL(sObject.result.conditionIndex, -1)
      AND IFNULL(expectedResult.expectedResult.conditionText, '') = IFNULL(sObject.result.conditionText, '')
      AND IFNULL(expectedResult.expectedResult.runtimeError, '') = IFNULL(sObject.result.runtimeError, ''),
      "MATCH",
      "FAIL"
    ) as match,
    expectedResult.expectedResult.status as expectedStatus, sObject.result.status as actualStatus,
    expectedResult.expectedResult.conditionIndex as expectedConditionIndex, sObject.result.conditionIndex as actualConditionIndex,
    expectedResult.expectedResult.conditionText as expectedConditionText, sObject.result.conditionText as actualConditionText,
    expectedResult.expectedResult.runtimeError as expectedRuntimeError, sObject.result.runtimeError as actualRuntimeError
  FROM UNNEST(mock_ExpectedResult()) expectedResult
  LEFT JOIN (
      SELECT
          sObject.Id AS Id,
          sObject.RecordTypeId AS RecordTypeId,
          sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c,
          sObject.CA10__securityProfileSecurityType__c AS CA10__securityProfileSecurityType__c,
          sObject.CA10__uefiSettingsVTpm__c AS CA10__uefiSettingsVTpm__c,
          sObject.CA10__uefiSettingsSecureBoot__c AS CA10__uefiSettingsSecureBoot__c,
          STRUCT (
              `RecordType`.DeveloperName AS DeveloperName,
              `RecordType`.Id AS Id
          ) AS RecordType,
          process_CA10__CaAzureVirtualMachine__c(
              STRUCT(
                  sObject.Id AS Id,
                  sObject.RecordTypeId AS RecordTypeId,
                  sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c,
                  sObject.CA10__securityProfileSecurityType__c AS CA10__securityProfileSecurityType__c,
                  sObject.CA10__uefiSettingsVTpm__c AS CA10__uefiSettingsVTpm__c,
                  sObject.CA10__uefiSettingsSecureBoot__c AS CA10__uefiSettingsSecureBoot__c,
                  STRUCT (
                      `RecordType`.DeveloperName AS DeveloperName,
                      `RecordType`.Id AS Id
                  ) AS RecordType
              ),
              sObject.context.snapshotTime
          ) as result
      FROM UNNEST(mock_CA10__CaAzureVirtualMachine__c()) AS sObject
      LEFT JOIN UNNEST(mock_RecordType()) AS `RecordType`
          ON sObject.RecordTypeId = `RecordType`.Id
  ) sObject ON sObject.Id = expectedResult.Id;
