add command patterns for convert rule and sigma-stats
This commit is contained in:
parent
181eade8c4
commit
d839089153
1 changed files with 41 additions and 43 deletions
|
@ -50,29 +50,27 @@ const commandPatterns = [
|
|||
// Sigma create patterns
|
||||
{
|
||||
name: 'sigma-create',
|
||||
regex: /^(create|new|add)\s+(rule|detection)\s+(in|to|for)?\s*sigma\s+(with|using)?\s+(.+)$/i,
|
||||
regex: /^(create|convert)\s+sigma\s+rule\s+where\s+id=(.+)$/i,
|
||||
action: 'create',
|
||||
module: 'sigma',
|
||||
params: [5] // creation parameters in capturing group 5
|
||||
params: [2] // rule ID is in capturing group 2
|
||||
},
|
||||
|
||||
// Sigma stats patterns
|
||||
{
|
||||
name: 'sigma-stats',
|
||||
regex: /^(stats|statistics|metrics|counts)\s+(for|about|on|of)?\s*sigma$/i,
|
||||
name: 'sigma-stats-first',
|
||||
regex: /^sigma\s+stats$/i,
|
||||
action: 'stats',
|
||||
module: 'sigma',
|
||||
params: []
|
||||
},
|
||||
{
|
||||
name: 'sigma-stats-show',
|
||||
regex: /^(show|get|display)\s+(stats|statistics|metrics|counts)\s+(for|about|on|of)?\s*sigma$/i,
|
||||
name: 'sigma-stats-second',
|
||||
regex: /^stats\s+sigma$/i,
|
||||
action: 'stats',
|
||||
module: 'sigma',
|
||||
params: []
|
||||
}
|
||||
];
|
||||
|
||||
// Additional command patterns for other modules can be added here
|
||||
];
|
||||
|
||||
module.exports = commandPatterns;
|
||||
module.exports = commandPatterns;
|
Loading…
Add table
Add a link
Reference in a new issue