Skip to content

Commit

Permalink
Merge pull request #17 from bentleymi/v2.1.1
Browse files Browse the repository at this point in the history
V2.1.1 - Adding Redaction Macros
  • Loading branch information
bentleymi authored May 10, 2023
2 parents 927e626 + 541ac9c commit f1d33ff
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
Binary file added TA-openai-api-2-1-1.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions TA-openai-api/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "TA-openai-api",
"version": "2.1.0"
"version": "2.1.1"
},
"author": [
{
Expand All @@ -15,7 +15,7 @@
}
],
"releaseDate": null,
"description": "Send prompts to OpenAI ChatGPT API and enrich your Splunk searches with the results.",
"description": "Send prompts to OpenAI ChatGPT API and enrich your Splunk searches with the results while safeguarding Security and Privacy.",
"classification": {
"intendedAudience": null,
"categories": [],
Expand Down
4 changes: 2 additions & 2 deletions TA-openai-api/default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ install_source_checksum = 49d36b4c5fee1647cc92f2f2203ed33fcb38cd11

[launcher]
author = Splunkable LLC
version = 2.1.0
description = Send queries to OpenAI ChatGPT API and enrich your Splunk searches with the results.
version = 2.1.1
description = Send queries to OpenAI ChatGPT API and enrich your Splunk searches with the results while safeguarding Security and Privacy.

[ui]
is_visible = 1
Expand Down
27 changes: 27 additions & 0 deletions TA-openai-api/default/macros.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[ccRedaction]
definition = rex mode=sed "s/[3-6](\s*\d){14,15}/redacted cc/"

[ccRedaction(1)]
args = redactionMsg
definition = rex mode=sed "s/[3-6](\s*\d){14,15}/$redactionMsg$/"

[ccRedaction(2)]
args = field,redactionMsg
definition = rex field=$field$ mode=sed "s/[3-6](\s*\d){14,15}/$redactionMsg$/"

[ssnRedaction]
definition = rex mode=sed "s/((?!666|000|9\d{2})\d{3}\D?(?!00)\d{2}\D?(?!0{4})\d{4})/redacted ssn/"

[ssnRedaction(1)]
args = redactionMsg
definition = rex mode=sed "s/((?!666|000|9\d{2})\d{3}\D?(?!00)\d{2}\D?(?!0{4})\d{4})/$redactionMsg$/"

[ssnRedaction(2)]
args = field,redactionMsg
definition = rex field=$field$ mode=sed "s/((?!666|000|9\d{2})\d{3}\D?(?!00)\d{2}\D?(?!0{4})\d{4})/$redactionMsg$/"

[customRedaction]
definition = fields - host* source user* *ip*

[allRedaction]
definition = `ssnRedaction` | `ccRedaction`| `customRedaction`

0 comments on commit f1d33ff

Please sign in to comment.