mirror of
https://github.com/mandiant/capa.git
synced 2025-12-05 20:40:05 -08:00
web: omit unneeded function param in createCapaRulesUrl (#2342)
This commit is contained in:
@@ -53,15 +53,14 @@ export function createATTACKHref(attack) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a CAPA rules URL for a given node with tag.
|
||||
* Creates an href for a given rule in the rules website
|
||||
*
|
||||
* @param {Object} node - The node object containing data about the rule.
|
||||
* @param {string} node.data.namespace - The namespace of the rule (optional).
|
||||
* @param {Object} node - The node object
|
||||
* @param {string} node.data.name - The name of the rule.
|
||||
* @returns {string} The formatted CAPA rules URL.
|
||||
* @returns {string} The formatted capa rules URL.
|
||||
*/
|
||||
export function createCapaRulesUrl(node, tag) {
|
||||
if (!node || !node.data || !tag) return null;
|
||||
export function createCapaRulesUrl(node) {
|
||||
if (!node || !node.data) return null;
|
||||
const ruleName = node.data.name.toLowerCase().replace(/\s+/g, "-");
|
||||
return `https://mandiant.github.io/capa/rules/${ruleName}/`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user