UNPKG

@hclsoftware/secagent

Version:

IAST agent

35 lines (30 loc) 1.01 kB
//IASTIGNORE /* * **************************************************** * Licensed Materials - Property of HCL. * (c) Copyright HCL Technologies Ltd. 2017, 2025. * Note to U.S. Government Users *Restricted Rights. * **************************************************** */ /** * Creates a BeforeRule. Used in the hooks of Hooks.js and similar files. * * **Description**: A BeforeRule has data and doRule method to help with different types of rules. Different types of BeforeRule are instantiated in BeforeRuleFactory.js. * @class BeforeRule * * @param {Object} ruleObj - The rule object that contains the data for the rule type. * @see BeforeRuleFactory.js */ class BeforeRule { constructor (ruleObj) { this.data = ruleObj } // abstract-like method. doRule (args, that, origMethod) { console.origLog('Warning [IAST Secagent] should not be called. Implement doRule method in each specific before rule') } runWhenInactive(){ return false; } } module.exports = BeforeRule