--- policy: /ce/ca/oracle/iam/customer-secrets-are-not-rotated-every-90-days logic: /ce/ca/oracle/iam/customer-secrets-are-not-rotated-every-90-days/prod.logic.yaml executionTime: 2026-09-22T15:07:57.31937196Z generationMs: 54 executionMs: 896 rows: - id: test1 match: true status: expected: DISAPPEARED actual: DISAPPEARED conditionIndex: expected: 99 actual: 99 conditionText: expected: isDisappeared(CA10O1__disappearanceTime__c) actual: isDisappeared(CA10O1__disappearanceTime__c) runtimeError: {} - id: test2 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 199 actual: 199 conditionText: expected: extract('CA10O1__timeCreated__c').beyondLastDays(90) actual: extract('CA10O1__timeCreated__c').beyondLastDays(90) runtimeError: {} - id: test3 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 200 actual: 200 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: test4 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 200 actual: 200 conditionText: expected: otherwise actual: otherwise runtimeError: {} - id: test5 match: true status: expected: UNDETERMINED actual: UNDETERMINED conditionIndex: expected: 101 actual: 101 conditionText: expected: CA10O1__timeCreated__c.isEmpty() actual: CA10O1__timeCreated__c.isEmpty() runtimeError: {} usedFiles: - path: /ce/ca/oracle/iam/customer-secrets-are-not-rotated-every-90-days/policy.yaml md5Hash: DF75CDA66FF630A85906FFB787AC74CE content: | --- names: full: "Oracle IAM Customer Secret Keys are not rotated every 90 days" contextual: "IAM Customer Secret Keys are not rotated every 90 days" description: > Oracle IAM customer secret keys should be rotated before they are more than 90 days old. Stale customer secret keys increase the exposure window for compromised long-term credentials. type: "COMPLIANCE_POLICY" categories: - "SECURITY" frameworkMappings: - "/frameworks/cis-oracle-v3.1.0/01/09" - "/frameworks/cloudaware/identity-and-access-governance/credential-lifecycle-management" similarPolicies: internal: - "dec-x-087d4ffc" - path: /ce/ca/oracle/iam/customer-secrets-are-not-rotated-every-90-days/prod.logic.yaml md5Hash: 66F209385F54AAC14A0DA9FE0071EEA3 content: | --- inputType: "CA10O1__CaOracleIamCustomerSecretKey2__c" testData: - file: "test-data.json" importExtracts: - file: "/types/CA10O1__CaOracleIamCustomerSecretKey2__c/object.extracts.yaml" conditions: - status: "INCOMPLIANT" currentStateMessage: "This Oracle IAM customer secret key was created more than 90 days ago." remediationMessage: "Create a replacement customer secret key, update dependent workloads, and delete this stale key." check: IS_BEYOND_LAST_DAYS: arg: EXTRACT: "CA10O1__timeCreated__c" offsetDays: 90 otherwise: status: "COMPLIANT" currentStateMessage: "This Oracle IAM customer secret key is not more than 90 days old." - path: /ce/ca/oracle/iam/customer-secrets-are-not-rotated-every-90-days/test-data.json md5Hash: 2D65C9B0D5DFBC29EA93778093E34DCA content: | [ { "expectedResult": { "status": "DISAPPEARED", "conditionIndex": "99", "conditionText": "isDisappeared(CA10O1__disappearanceTime__c)", "runtimeError": null }, "context": { "snapshotTime": "2026-04-12T00:00:00Z" }, "Id": "test1", "CA10O1__disappearanceTime__c": "2026-04-11T00:00:00Z", "CA10O1__timeCreated__c": "2025-01-01T00:00:00Z" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "199", "conditionText": "extract('CA10O1__timeCreated__c').beyondLastDays(90)", "runtimeError": null }, "context": { "snapshotTime": "2026-04-12T00:00:00Z" }, "Id": "test2", "CA10O1__disappearanceTime__c": null, "CA10O1__timeCreated__c": "2025-01-01T00:00:00Z" }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "200", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2026-04-12T00:00:00Z" }, "Id": "test3", "CA10O1__disappearanceTime__c": null, "CA10O1__timeCreated__c": "2026-04-01T00:00:00Z" }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "200", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2026-04-12T00:00:00Z" }, "Id": "test4", "CA10O1__disappearanceTime__c": null, "CA10O1__timeCreated__c": "2026-01-12T00:00:00Z" }, { "expectedResult": { "status": "UNDETERMINED", "conditionIndex": "101", "conditionText": "CA10O1__timeCreated__c.isEmpty()", "runtimeError": null }, "context": { "snapshotTime": "2026-04-12T00:00:00Z" }, "Id": "test5", "CA10O1__disappearanceTime__c": null, "CA10O1__timeCreated__c": null } ] - path: /types/CA10O1__CaOracleIamCustomerSecretKey2__c/object.extracts.yaml md5Hash: 25AFAF2CD60F68FEB27D2B922ABE5975 content: | --- extracts: - name: "CA10O1__timeCreated__c" value: FIELD: path: "CA10O1__timeCreated__c" undeterminedIf: isEmpty: "Unable to determine when this Oracle IAM customer secret key was created." script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "test1", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : "99", "conditionText" : "isDisappeared(CA10O1__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "test2", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "199", "conditionText" : "extract('CA10O1__timeCreated__c').beyondLastDays(90)", "runtimeError" : null } }, { "Id" : "test3", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "200", "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "test4", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "200", "conditionText" : "otherwise", "runtimeError" : null } }, { "Id" : "test5", "expectedResult" : { "status" : "UNDETERMINED", "conditionIndex" : "101", "conditionText" : "CA10O1__timeCreated__c.isEmpty()", "runtimeError" : null } } ]; """; CREATE TEMP FUNCTION mock_CA10O1__CaOracleIamCustomerSecretKey2__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2026-04-12T00:00:00Z") }, "CA10O1__disappearanceTime__c" : new Date("2026-04-11T00:00:00Z"), "CA10O1__timeCreated__c" : new Date("2025-01-01T00:00:00Z"), "Id" : "test1" }, { "context" : { "snapshotTime" : new Date("2026-04-12T00:00:00Z") }, "CA10O1__timeCreated__c" : new Date("2025-01-01T00:00:00Z"), "Id" : "test2" }, { "context" : { "snapshotTime" : new Date("2026-04-12T00:00:00Z") }, "CA10O1__timeCreated__c" : new Date("2026-04-01T00:00:00Z"), "Id" : "test3" }, { "context" : { "snapshotTime" : new Date("2026-04-12T00:00:00Z") }, "CA10O1__timeCreated__c" : new Date("2026-01-12T00:00:00Z"), "Id" : "test4" }, { "context" : { "snapshotTime" : new Date("2026-04-12T00:00:00Z") }, "Id" : "test5" } ]; """; CREATE TEMP FUNCTION process_CA10O1__CaOracleIamCustomerSecretKey2__c( obj STRUCT< CA10O1__disappearanceTime__c TIMESTAMP, CA10O1__timeCreated__c TIMESTAMP, 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 references1 = []; // condition[0], conditionIndex:[0..99] references1.push('Deleted From Oracle [CA10O1__disappearanceTime__c]: ' + obj.CA10O1__disappearanceTime__c); if (obj.CA10O1__disappearanceTime__c != null) { return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10O1__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[1], conditionIndex:[100..199] function fieldChecked4() { if (IsEmptyLib.simpleIsEmpty(obj.CA10O1__timeCreated__c)) { throw new Error("UNDETERMINED condition:101", {cause: {status: 'UNDETERMINED', conditionIndex: 101, conditionText: "CA10O1__timeCreated__c.isEmpty()", currentStateMessage: "Unable to determine when this Oracle IAM customer secret key was created.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10O1__timeCreated__c; } function extract3() { if (!this.out) { this.out = fieldChecked4(); } return this.out; }; references1.push('Time Created [obj.CA10O1__timeCreated__c]: ' + obj.CA10O1__timeCreated__c); try { if (extract3.call(extract3) != null && extract3.call(extract3).getTime() < todayMinus90Day) { return {status: 'INCOMPLIANT', conditionIndex: 199, conditionText: "extract('CA10O1__timeCreated__c').beyondLastDays(90)", currentStateMessage: "This Oracle IAM customer secret key was created more than 90 days ago.", currentStateReferences: references1.join('\n'), remediation: "Create a replacement customer secret key, update dependent workloads, and delete this stale key.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } return {status: 'COMPLIANT', conditionIndex: 200, conditionText: "otherwise", currentStateMessage: "This Oracle IAM customer secret key is not more than 90 days old.", 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.CA10O1__disappearanceTime__c AS CA10O1__disappearanceTime__c, sObject.CA10O1__timeCreated__c AS CA10O1__timeCreated__c, sObject.Id AS Id, process_CA10O1__CaOracleIamCustomerSecretKey2__c( STRUCT( sObject.CA10O1__disappearanceTime__c AS CA10O1__disappearanceTime__c, sObject.CA10O1__timeCreated__c AS CA10O1__timeCreated__c, sObject.Id AS Id ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10O1__CaOracleIamCustomerSecretKey2__c()) AS sObject ) sObject ON sObject.Id = expectedResult.Id;