IsIntegrationAvailable

Returns 'yes' if integration brand is available. Otherwise returns 'no'.

javascript · Common Scripts

Source

function isIntegrationAvailable(brandName, allInstances) {
    const brandInstances = Object.keys(allInstances).filter(
        instanceName => 
        allInstances[instanceName].brand.toLowerCase() === brandName.toLowerCase() &&
        allInstances[instanceName].state === 'active'
    );
  
    const readableOutput = brandInstances.length > 0 ? 'yes' : 'no';

    return {
        'Type': entryTypes['note'],
        'ContentsFormat': formats['text'],
        'Contents': readableOutput,
        'HumanReadable': readableOutput,
        'EntryContext': {'brandInstances': brandInstances}
    };
}


function main() {
    const brandNames = argToList(args.brandname);
    const allInstances = getModules();

    const results = [];
    for (let brandName of brandNames) {
        const result = isIntegrationAvailable(brandName, allInstances);
        results.push(result);
    }

    return results;
}


try {
    return main();
} catch (error) {
    throw `Failed to execute automation. Error:\n${error}`;
}

README

Returns ‘yes’ if integration brand is available. Otherwise returns ‘no’.

Script Data


Name Description
Script Type python3
Tags infra, Condition
Cortex XSOAR Version 5.0.0

Used In


Sample usage of this script can be found in the following playbooks and scripts.

  • Calculate Severity Highest DBotScore For Egress Network Traffic - GreyNoise
  • Crowdstrike Falcon - Isolate Endpoint
  • Crowdstrike Falcon - Unisolate Endpoint
  • FireMon Pre Change Assessment
  • Get Original Email - Microsoft Graph Mail
  • MITRE ATT&CK CoA - T1204 - User Execution
  • Microsoft 365 Defender - Emails Indicators Hunt
  • Palo Alto Networks BPA - Submit Scan
  • Phishing - Machine Learning Analysis
  • Prisma Cloud Remediation - AWS EC2 Security Group Misconfiguration

Inputs


Argument Name Description
brandname Integration’s brand name to query.

Outputs


Path Description Type
brandInstances List of the instances for the given brands. Unknown