Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions extensions/soarca-assignment/expression/expression.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$id": "https://raw.githubusercontent.com/COSSAS/SOARCA/refs/heads/development/extensions/soarca-assignment/expression/expression.json",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: would this be an issue that it points to development even on the master branch once eventually it gets merged, or just cosmetic?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs merging in master/main before we can point it there

"$schema": "http://json-schema.org/draft-07/schema#",
"title": "expression",
"description": "The expression is the part of the extension to manipulate the raw output of steps. Multiple engines can be selected.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"regex",
"jq",
"awk",
"sed",
"grep"
],
"description": "The engine string that needs to be used with the expression"
},
"expression": {
"type": "string",
"description": "The verbatim expression to be used by SOARCA."
}
},
"required": [
"type",
"expression"
]
}
3 changes: 3 additions & 0 deletions extensions/soarca-assignment/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SOARCA assignment extension

This is the definition of the SOARCA assignment extension. This extension is used by SOARCA to allow for variable assignment based on step results. All SOARCA action steps have defined results. These defined results can be mapped into specific variables. To allow these variables to be useful the results can be processed by a expression engine. Currently SOARCA supports jq and regex.

@Paul2803k Paul2803k Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: does SOARCA still currently support only jp and regex and if so, do we still need to mention all of the others in the expression.json? If we use that schema as info about what the user can use then we will need to filter the unsupported ones out.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$id": "https://raw.githubusercontent.com/COSSAS/SOARCA/refs/heads/development/extensions/soarca-assignment/soarca-variable-assgnment-extension.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "soarca-assignment",
"description": "This extension is used by SOARCA to allow for variable assignment based on step results. All SOARCA action steps have defined results. These defined results can be mapped into specific variables. To allow these variables to be useful the results can be processed by a expression engine. Currently SOARCA supports jq and regex.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"soarca-assignment"
],
"description": "The value of this property MUST be layout."
},
"step-result": {
"type": "string",
"description": "The step result from SOARCA that needs to passed to the regex and/or variable. This must be populated when the assignment is used."
},
"variable": {
"type": "string",
"description": "The variable name denoted like __YOUR_VAR_NAME__ to put the output into. This must be populated when the assignment is used."
},
"expression": {
"$ref": "./expression/expression.json",
"description": "The regular expression applied to the result before it's mapped into the variable. The expression is optional when the assignment is used."
}
},
"required": [
"type",
"step-result",
"variable"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: do we need to have 2 expression.json and 2 soarca-variable-assignment-extension.json files? cant we have 1 pair in a shared space or so?

"$id": "https://raw.githubusercontent.com/COSSAS/SOARCA/refs/heads/development/pkg/models/validator/schemas/soarca-variable-assignment-extension/expression/expression.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "expression",
"description": "The expression is the part of the extension to manipulate the raw output of steps. Multiple engines can be selected.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"regex",
"jq",
"awk",
"sed",
"grep"
],
"description": "The engine string that needs to be used with the expression"
},
"expression": {
"type": "string",
"description": "The verbatim expression to be used by SOARCA."
}
},
"required": [
"type",
"expression"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$id": "https://raw.githubusercontent.com/COSSAS/SOARCA/refs/heads/development/pkg/models/validator/schemas/soarca-variable-assignment-extension/soarca-variable-assgnment-extension.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "soarca-assignment",
"description": "This extension is used by SOARCA to allow for variable assignment based on step results. All SOARCA action steps have defined results. These defined results can be mapped into specific variables. To allow these variables to be useful the results can be processed by a expression engine. Currently SOARCA supports jq and regex.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"soarca-assignment"
],
"description": "The value of this property MUST be layout."
},
"step-result": {
"type": "string",
"description": "The step result from SOARCA that needs to passed to the regex and/or variable. This must be populated when the assignment is used."
},
"variable": {
"type": "string",
"description": "The variable name denoted like __YOUR_VAR_NAME__ to put the output into. This must be populated when the assignment is used."
},
"expression": {
"$ref": "./expression/expression.json",
"description": "The regular expression applied to the result before it's mapped into the variable. The expression is optional when the assignment is used."
}
},
"required": [
"type",
"step-result",
"variable"
]
}
Loading