--- policy: /ce/ca/azure/storage/access-keys-regenerated-periodically logic: /ce/ca/azure/storage/access-keys-regenerated-periodically/prod.logic.yaml executionTime: 2026-06-06T12:03:47.490229956Z generationMs: 50 executionMs: 1113 rows: - id: '001' 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: '002' match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 199 actual: 199 conditionText: expected: extract('CA10__primaryKeyCreationTime__c').isEmpty() || extract('CA10__secondaryKeyCreationTime__c').isEmpty() actual: extract('CA10__primaryKeyCreationTime__c').isEmpty() || extract('CA10__secondaryKeyCreationTime__c').isEmpty() runtimeError: {} - id: '003' match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 299 actual: 299 conditionText: expected: not(extract('CA10__primaryKeyCreationTime__c').withinLastDays(90)) || not(extract('CA10__secondaryKeyCreationTime__c').withinLastDays(90)) actual: not(extract('CA10__primaryKeyCreationTime__c').withinLastDays(90)) || not(extract('CA10__secondaryKeyCreationTime__c').withinLastDays(90)) runtimeError: {} - id: '004' match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 300 actual: 300 conditionText: expected: otherwise actual: otherwise runtimeError: {} usedFiles: - path: /ce/ca/azure/storage/access-keys-regenerated-periodically/policy.yaml md5Hash: A5F06E33D3FF48131C37F04B9663ED68 content: | --- names: full: Azure Storage Account Access Keys are not regenerated periodically contextual: Access Keys are not regenerated periodically description: "For increased security, regenerate storage account access keys periodically." type: COMPLIANCE_POLICY categories: - SECURITY frameworkMappings: - "/frameworks/cis-azure-v6.0.0/09/03/01/02" - "/frameworks/cloudaware/secret-and-certificate-governance/expiration-management" similarPolicies: cloudConformity: - url: https://www.trendmicro.com/cloudoneconformity/knowledge-base/azure/StorageAccounts/regenerate-storage-account-access-keys-periodically.html name: Regenerate Storage Account Access Keys Periodically - path: /ce/ca/azure/storage/access-keys-regenerated-periodically/prod.logic.yaml md5Hash: 4571C5B4B4CF42DB5EE035E507BF471A content: | --- inputType: "CA10__CaAzureStorageAccount__c" testData: - file: test-data.json importExtracts: - file: /types/CA10__CaAzureStorageAccount__c/object.extracts.yaml conditions: - status: "UNDETERMINED" currentStateMessage: "Key creation time is missing." check: OR: args: - IS_EMPTY: arg: EXTRACT: "CA10__primaryKeyCreationTime__c" - IS_EMPTY: arg: EXTRACT: "CA10__secondaryKeyCreationTime__c" - status: "INCOMPLIANT" currentStateMessage: "Access keys have not been rotated in over 90 days." remediationMessage: "Rotate access keys at least every 90 days." check: OR: args: - NOT: arg: IS_WITHIN_LAST_DAYS: offsetDays: 90 arg: EXTRACT: "CA10__primaryKeyCreationTime__c" - NOT: arg: IS_WITHIN_LAST_DAYS: offsetDays: 90 arg: EXTRACT: "CA10__secondaryKeyCreationTime__c" otherwise: status: "COMPLIANT" currentStateMessage: "Access keys have been rotated within the last 90 days." - path: /ce/ca/azure/storage/access-keys-regenerated-periodically/test-data.json md5Hash: DDA82DD0A9264CCF7B576BE926F625C4 content: |- [ { "expectedResult": { "status": "DISAPPEARED", "conditionIndex": "99", "conditionText": "isDisappeared(CA10__disappearanceTime__c)", "runtimeError": null }, "context": { "snapshotTime": "2025-11-06T01:39:08Z" }, "CA10__disappearanceTime__c": "2025-10-27T14:29:45Z", "CA10__primaryKeyCreationTime__c": "2023-09-19T17:48:00Z", "CA10__secondaryKeyCreationTime__c": "2023-09-19T17:48:00Z", "Id": "001", "RecordTypeId": "0124x000001OkZ4AAK", "RecordType": { "Id": "0124x000001OkZ4AAK" } }, { "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "199", "conditionText": "extract('CA10__primaryKeyCreationTime__c').isEmpty() || extract('CA10__secondaryKeyCreationTime__c').isEmpty()", "runtimeError": null }, "context": { "snapshotTime": "2025-11-06T01:39:08Z" }, "CA10__disappearanceTime__c": null, "CA10__primaryKeyCreationTime__c": null, "CA10__secondaryKeyCreationTime__c": "2023-03-31T11:01:28Z", "Id": "002", "RecordTypeId": "0124x000001OkZ4AAK", "RecordType": { "Id": "0124x000001OkZ4AAK" } }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "299", "conditionText": "not(extract('CA10__primaryKeyCreationTime__c').withinLastDays(90)) || not(extract('CA10__secondaryKeyCreationTime__c').withinLastDays(90))", "runtimeError": null }, "context": { "snapshotTime": "2025-11-06T01:39:08Z" }, "CA10__disappearanceTime__c": null, "CA10__primaryKeyCreationTime__c": "2023-03-31T11:01:28Z", "CA10__secondaryKeyCreationTime__c": "2023-03-31T11:01:28Z", "Id": "003", "RecordTypeId": "0124x000001OkZ4AAK", "RecordType": { "Id": "0124x000001OkZ4AAK" } }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "300", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2025-11-06T01:39:08Z" }, "CA10__disappearanceTime__c": null, "CA10__primaryKeyCreationTime__c": "2025-09-12T17:27:34Z", "CA10__secondaryKeyCreationTime__c": "2025-09-12T17:27:34Z", "Id": "004", "RecordTypeId": "0124x000001OkZ4AAK", "RecordType": { "Id": "0124x000001OkZ4AAK" } } ] - path: /types/CA10__CaAzureStorageAccount__c/object.extracts.yaml md5Hash: 2FD9F962F192FC3E335D23D11315B8F9 content: "---\nextracts:\n# This is a checkbox. Not nullable. Can't have no access,\ \ retrieved via Microsoft.Storage/storageAccounts\n - name: \"CA10__secureTransferRequired__c\"\ \n value: \n FIELD:\n path: \"CA10__secureTransferRequired__c\"\ \n# Values: Enabled, Disabled. Not Nullable. Can't have no access, retrieved\ \ via Microsoft.Storage/storageAccounts\n - name: \"CA10__requireInfrastructureEncryptionState__c\"\ \n value: \n FIELD:\n path: \"CA10__requireInfrastructureEncryptionState__c\"\ \n undeterminedIf:\n isEmpty: \"Corrupted data. Require Infrastructure\ \ Encryption setting cannot be empty.\"\n# Values: Enabled, Disabled. Not Nullable.\ \ Can't have no access, retrieved via Microsoft.Storage/storageAccounts\n -\ \ name: \"CA10__publicNetworkAccessState__c\"\n value: \n FIELD:\n \ \ path: \"CA10__publicNetworkAccessState__c\"\n undeterminedIf:\n\ \ isEmpty: \"Corrupted data. Public Network Access cannot be empty.\"\ \n# Values: Allow, Deny. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__networkAclsDefaultAction__c\"\n value: \n FIELD:\n\ \ path: \"CA10__networkAclsDefaultAction__c\"\n undeterminedIf:\n\ \ isEmpty: \"Corrupted data. Default Network Action cannot be empty.\"\ \n# Values: any combination of Logging|Metrics|AzureServices or None. Not nullable.\ \ \n# Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__networkAclsBypass__c\"\n value: \n FIELD:\n \ \ path: \"CA10__networkAclsBypass__c\"\n undeterminedIf:\n \ \ isEmpty: \"Corrupted data. Network Bypass cannot be empty.\"\n# Values TLS1_0,\ \ TLS1_1, TLS1_2. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__minimumTlsVersion__c\"\n value: \n FIELD:\n \ \ path: \"CA10__minimumTlsVersion__c\"\n undeterminedIf:\n \ \ isEmpty: \"Corrupted data. TLS Version cannot be empty.\"\n# Values: Allow,\ \ Deny, null (Old storage accounts can have null, which means that the account\ \ can still have replication). \n# Nullable. Can't have no access, retrieved\ \ via Microsoft.Storage/storageAccounts.\n - name: \"CA10__crossTenantReplication__c\"\ \n value: \n FIELD:\n path: \"CA10__crossTenantReplication__c\"\ \n# Values: Allow, Deny. Not nullable. Can't have no access, retrieved via Microsoft.Storage/storageAccounts.\n\ \ - name: \"CA10__blobPublicAccess__c\"\n value: \n FIELD:\n \ \ path: \"CA10__blobPublicAccess__c\"\n undeterminedIf:\n isEmpty:\ \ \"Corrupted data. Allow Blob Anonymous Access cannot be empty.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__blobLoggingReadState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobLoggingReadState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingReadState__c\"\n currentStateMessage: \"Unable to\ \ determine Blob Container Logging Read property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n# Values Enabled,\ \ Disabled. Not Nullable\n - name: \"CA10__blobLoggingWriteState__c\"\n \ \ value: \n FIELD:\n path: \"CA10__blobLoggingWriteState__c\"\n\ \ undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Blob Container Logging Write property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n # Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__blobLoggingDeleteState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobLoggingDeleteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__blobLoggingDeleteState__c\"\n currentStateMessage: \"Unable\ \ to determine Blob Container Logging Delete property. Possible permission issue\ \ with Microsoft.Storage/storageAccounts/blobServices/containers/read\"\n \ \ isEmpty: \"Storage Blob Logging is not populated yet.\"\n# Values Enabled,\ \ Disabled. Not Nullable\n - name: \"CA10__queueLoggingReadState__c\"\n \ \ value: \n FIELD:\n path: \"CA10__queueLoggingReadState__c\"\n\ \ undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__queueLoggingReadState__c\"\n currentStateMessage: \"Unable\ \ to determine Queue Logging Read property. Possible permission issue with Microsoft.Storage/storageAccounts/queueServices/queues/read\"\ \n isEmpty: \"Storage Queue Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__queueLoggingWriteState__c\"\ \n value: \n FIELD:\n path: \"CA10__queueLoggingWriteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__queueLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Queue Logging Write property. Possible permission issue with\ \ Microsoft.Storage/storageAccounts/queueServices/queues/read\"\n isEmpty:\ \ \"Storage Queue Logging is not populated yet.\"\n# Values Enabled, Disabled.\ \ Not Nullable\n - name: \"CA10__queueLoggingDeleteState__c\"\n value: \n\ \ FIELD:\n path: \"CA10__queueLoggingDeleteState__c\"\n undeterminedIf:\n\ \ noAccessDelegate:\n path: \"CA10__queueLoggingDeleteState__c\"\ \n currentStateMessage: \"Unable to determine Queue Logging Delete\ \ property. Possible permission issue with Microsoft.Storage/storageAccounts/queueServices/queues/read\"\ \n isEmpty: \"Storage Queue Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__tableLoggingReadState__c\"\ \n value: \n FIELD:\n path: \"CA10__tableLoggingReadState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__tableLoggingReadState__c\"\n currentStateMessage: \"Unable\ \ to determine Table Logging Read property. Possible permission issue with Microsoft.Storage/storageAccounts/tableServices/tables/read\"\ \n isEmpty: \"Storage Table Logging is not populated yet.\"\n# Values\ \ Enabled, Disabled. Not Nullable\n - name: \"CA10__tableLoggingWriteState__c\"\ \n value: \n FIELD:\n path: \"CA10__tableLoggingWriteState__c\"\ \n undeterminedIf:\n noAccessDelegate:\n path: \"\ CA10__tableLoggingWriteState__c\"\n currentStateMessage: \"Unable\ \ to determine Table Logging Write property. Possible permission issue with\ \ Microsoft.Storage/storageAccounts/tableServices/tables/read\"\n isEmpty:\ \ \"Storage Table Logging is not populated yet.\"\n# Values Enabled, Disabled.\ \ Not Nullable\n - name: \"CA10__tableLoggingDeleteState__c\"\n value: \n\ \ FIELD:\n path: \"CA10__tableLoggingDeleteState__c\"\n undeterminedIf:\n\ \ noAccessDelegate:\n path: \"CA10__tableLoggingDeleteState__c\"\ \n currentStateMessage: \"Unable to determine Table Logging Delete\ \ property. Possible permission issue with Microsoft.Storage/storageAccounts/tableServices/tables/read\"\ \n isEmpty: \"Storage Table Logging is not populated yet.\"\n# Values\ \ Microsoft.Storage, Microsoft.Keyvault. Not Nullable. Can't have no access,\ \ retrieved via Microsoft.Storage/storageAccounts\n - name: \"CA10__encryptionKeySource__c\"\ \n value: \n FIELD:\n path: \"CA10__encryptionKeySource__c\"\n\ \ undeterminedIf:\n isEmpty: \"Corrupted data. Encryption Key\ \ Source cannot be empty.\"\n# Nullable. Can't have no access, retrieved via\ \ Microsoft.Storage/storageAccounts\n - name: \"CA10__encryptionKeyVaultUri__c\"\ \n value: \n FIELD:\n path: \"CA10__encryptionKeyVaultUri__c\"\ \n# Nullable. \n - name: \"CA10__blobRetentionPolicyDays__c\"\n value: \n\ \ FIELD:\n path: \"CA10__blobRetentionPolicyDays__c\"\n# Values:\ \ Enabled, Disabled. Nullable. \n - name: \"CA10__blobRetentionPolicyState__c\"\ \n value: \n FIELD:\n path: \"CA10__blobRetentionPolicyState__c\"\ \n# Nullable. \n - name: \"CA10__containerRetentionPolicyDays__c\"\n value:\ \ \n FIELD:\n path: \"CA10__containerRetentionPolicyDays__c\"\n\ # Values: Enabled, Disabled. Nullable. \n - name: \"CA10__containerRetentionPolicyState__c\"\ \n value: \n FIELD:\n path: \"CA10__containerRetentionPolicyState__c\"\ \n# Nullable. Text field.\n - name: \"CA10__skuName__c\"\n value:\n \ \ FIELD:\n path: \"CA10__skuName__c\"\n# Nullable. Text field.\n -\ \ name: \"CA10__defaultToOAuthAuthentication__c\"\n value:\n FIELD:\n\ \ path: \"CA10__defaultToOAuthAuthentication__c\"\n# Nullable. Text field.\n\ \ - name: \"CA10__sharedKeyAccess__c\"\n value:\n FIELD:\n path:\ \ \"CA10__sharedKeyAccess__c\"\n# Nullable. Text field.\n - name: \"CA10__blobVersioning__c\"\ \n value:\n FIELD:\n path: \"CA10__blobVersioning__c\"\n# Text\ \ field.\n - name: \"CA10__locationName__c\"\n value:\n FIELD:\n \ \ path: \"CA10__locationName__c\"\n# Date/Time field.\n - name: \"CA10__primaryKeyCreationTime__c\"\ \n value:\n FIELD:\n path: \"CA10__primaryKeyCreationTime__c\"\ \n# Date/Time field.\n - name: \"CA10__secondaryKeyCreationTime__c\"\n value:\n\ \ FIELD:\n path: \"CA10__secondaryKeyCreationTime__c\"\n# Nullable.\ \ Number field.\n - name: \"CA10__keyExpirationPeriodDays__c\"\n value:\n\ \ FIELD:\n path: \"CA10__keyExpirationPeriodDays__c\"\n\n \ \ " script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "001", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : "99", "conditionText" : "isDisappeared(CA10__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "002", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "199", "conditionText" : "extract('CA10__primaryKeyCreationTime__c').isEmpty() || extract('CA10__secondaryKeyCreationTime__c').isEmpty()", "runtimeError" : null } }, { "Id" : "003", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "299", "conditionText" : "not(extract('CA10__primaryKeyCreationTime__c').withinLastDays(90)) || not(extract('CA10__secondaryKeyCreationTime__c').withinLastDays(90))", "runtimeError" : null } }, { "Id" : "004", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "300", "conditionText" : "otherwise", "runtimeError" : null } } ]; """; CREATE TEMP FUNCTION mock_CA10__CaAzureStorageAccount__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2025-11-06T01:39:08Z") }, "CA10__disappearanceTime__c" : new Date("2025-10-27T14:29:45Z"), "CA10__primaryKeyCreationTime__c" : new Date("2023-09-19T17:48:00Z"), "CA10__secondaryKeyCreationTime__c" : new Date("2023-09-19T17:48:00Z"), "Id" : "001", "RecordTypeId" : "0124x000001OkZ4AAK" }, { "context" : { "snapshotTime" : new Date("2025-11-06T01:39:08Z") }, "CA10__secondaryKeyCreationTime__c" : new Date("2023-03-31T11:01:28Z"), "Id" : "002", "RecordTypeId" : "0124x000001OkZ4AAK" }, { "context" : { "snapshotTime" : new Date("2025-11-06T01:39:08Z") }, "CA10__primaryKeyCreationTime__c" : new Date("2023-03-31T11:01:28Z"), "CA10__secondaryKeyCreationTime__c" : new Date("2023-03-31T11:01:28Z"), "Id" : "003", "RecordTypeId" : "0124x000001OkZ4AAK" }, { "context" : { "snapshotTime" : new Date("2025-11-06T01:39:08Z") }, "CA10__primaryKeyCreationTime__c" : new Date("2025-09-12T17:27:34Z"), "CA10__secondaryKeyCreationTime__c" : new Date("2025-09-12T17:27:34Z"), "Id" : "004", "RecordTypeId" : "0124x000001OkZ4AAK" } ]; """; CREATE TEMP FUNCTION mock_RecordType() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2025-11-06T01:39:08Z") }, "Id" : "0124x000001OkZ4AAK" } ]; """; CREATE TEMP FUNCTION process_CA10__CaAzureStorageAccount__c( obj STRUCT< CA10__disappearanceTime__c TIMESTAMP, CA10__primaryKeyCreationTime__c TIMESTAMP, CA10__secondaryKeyCreationTime__c TIMESTAMP, Id STRING, RecordTypeId STRING, RecordType STRUCT< Id STRING > >, snapshotTime TIMESTAMP ) RETURNS STRUCT DETERMINISTIC LANGUAGE js AS r""" var IsEmptyLib = new function () { this.simpleIsEmpty = function(arg) { return arg == null; }; this.simpleIsNotEmpty = function(arg) { return arg != null; }; }(); var todayMinus90Day = new Date(snapshotTime.toISOString().substr(0,10)+'T00:00:00.000Z').getTime() + (-90 * 86400000); var todayPlus1Day = new Date(snapshotTime.toISOString().substr(0,10)+'T00:00:00.000Z').getTime() + (1 * 86400000); 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__primaryKeyCreationTime__c; } return this.out; }; function extract6() { if (!this.out) { this.out = obj.CA10__secondaryKeyCreationTime__c; } return this.out; }; references1.push('Primary Key Creation Time [obj.CA10__primaryKeyCreationTime__c]: ' + obj.CA10__primaryKeyCreationTime__c); references1.push('Secondary Key Creation Time [obj.CA10__secondaryKeyCreationTime__c]: ' + obj.CA10__secondaryKeyCreationTime__c); if (IsEmptyLib.simpleIsEmpty(extract3.call(extract3)) || IsEmptyLib.simpleIsEmpty(extract6.call(extract6))) { return {status: 'UNDETERMINED', conditionIndex: 199, conditionText: "extract('CA10__primaryKeyCreationTime__c').isEmpty() || extract('CA10__secondaryKeyCreationTime__c').isEmpty()", currentStateMessage: "Key creation time is missing.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[2], conditionIndex:[200..299] function extract9() { if (!this.out) { this.out = obj.CA10__primaryKeyCreationTime__c; } return this.out; }; function extract13() { if (!this.out) { this.out = obj.CA10__secondaryKeyCreationTime__c; } return this.out; }; if (!(extract9.call(extract9) != null && extract9.call(extract9).getTime() >= todayMinus90Day && extract9.call(extract9).getTime() < todayPlus1Day) || !(extract13.call(extract13) != null && extract13.call(extract13).getTime() >= todayMinus90Day && extract13.call(extract13).getTime() < todayPlus1Day)) { return {status: 'INCOMPLIANT', conditionIndex: 299, conditionText: "not(extract('CA10__primaryKeyCreationTime__c').withinLastDays(90)) || not(extract('CA10__secondaryKeyCreationTime__c').withinLastDays(90))", currentStateMessage: "Access keys have not been rotated in over 90 days.", currentStateReferences: references1.join('\n'), remediation: "Rotate access keys at least every 90 days.", runtimeError: null}; } return {status: 'COMPLIANT', conditionIndex: 300, conditionText: "otherwise", currentStateMessage: "Access keys have been rotated within the last 90 days.", 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.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CA10__primaryKeyCreationTime__c AS CA10__primaryKeyCreationTime__c, sObject.CA10__secondaryKeyCreationTime__c AS CA10__secondaryKeyCreationTime__c, sObject.Id AS Id, sObject.RecordTypeId AS RecordTypeId, STRUCT ( `RecordType`.Id AS Id ) AS RecordType, process_CA10__CaAzureStorageAccount__c( STRUCT( sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c, sObject.CA10__primaryKeyCreationTime__c AS CA10__primaryKeyCreationTime__c, sObject.CA10__secondaryKeyCreationTime__c AS CA10__secondaryKeyCreationTime__c, sObject.Id AS Id, sObject.RecordTypeId AS RecordTypeId, STRUCT ( `RecordType`.Id AS Id ) AS RecordType ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10__CaAzureStorageAccount__c()) AS sObject LEFT JOIN UNNEST(mock_RecordType()) AS `RecordType` ON sObject.RecordTypeId = `RecordType`.Id ) sObject ON sObject.Id = expectedResult.Id;