web: omit unneeded function param in createCapaRulesUrl (#2342)

This commit is contained in:
Fariss
2024-08-29 18:42:23 +02:00
committed by GitHub
parent 729a1a85b7
commit 68e07fbb9a

View File

@@ -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}/`;
}