OpenAI ChatGPT Audit Logs Parser¶
About¶
ChatGPT is a chatbot and virtual assistant developed by OpenAI. Based on large language models, it enables users to refine and steer a conversation towards a desired length, format, style, level of detail, and language.
Product Details¶
Vendor URL: OpenAI ChatGPT
Product Type: Product Audit
Product Tier: Tier III
Integration Method: Syslog
Integration URL: None Available
Log Guide: OpenAI ChatGPT API Reference
Parser Details¶
Log Format: JSON
Expected Normalization Rate: 95%
Data Label: CHATGPT_AUDIT_LOG
UDM Fields (list of all UDM fields leveraged in the Parser):
Log File Field | UDM Field |
---|---|
created_at | metadata.eventtimestamp |
user_id | pricipal.user.userid |
user_email | pricipal.user.email_addresses |
id | pricipal.resource.resource_product_object_id |
title | pricipal.resource.resource_subtype |
object | pricipal.resource.name |
workspace_id | additional.fields |
messages.data[].content.value | principal.user.attribute.labels |
Product Event Types¶
Event | UDM Event Classification |
---|---|
all | GENERIC_EVENT |
Log Sample¶
{
"created_at": 1719340147.975786,
"id": "abcdef12-3456-7890-abcd-ef1234d63ded",
"last_active_at": 1719340201.70574,
"messages": {
"data": [
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "system",
"tool_name": null
},
"content": null,
"created_at": null,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef1234e45a29",
"object": "compliance.workspace.conversation.message",
"parent_id": "abcdef12-3456-7890-abcd-ef1234b9e388"
},
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "system",
"tool_name": null
},
"content": null,
"created_at": null,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef1234b9e388",
"object": "compliance.workspace.conversation.message",
"parent_id": null
},
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "user",
"tool_name": null
},
"content": {
"annotations": [],
"type": "text",
"value": "write a git alias called \"pushnew\" which creates a new upstream with the same name as the current local branch"
},
"created_at": 1719340147.97978,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef12348dc091",
"object": "compliance.workspace.conversation.message",
"parent_id": "abcdef12-3456-7890-abcd-ef1234e45a29"
},
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "assistant",
"tool_name": null
},
"content": {
"model_context": "Nothing yet.",
"type": "model_context"
},
"created_at": 1719340152.76517,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef1234e05916",
"object": "compliance.workspace.conversation.message",
"parent_id": "abcdef12-3456-7890-abcd-ef12348dc091"
},
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "assistant",
"tool_name": null
},
"content": {
"annotations": [],
"type": "text",
"value": "To create a git alias called \"pushnew\" that sets the upstream to a new branch with the same name as the current local branch and then pushes to it, you can add the following alias to your git configuration:\n\n1. Open your terminal.\n2. Run the following command to open the global git configuration file in your default text editor:\n\n ```sh\n git config --global --edit\n ```\n\n3. Add the following lines to the file:\n\n ```sh\n [alias]\n pushnew = \"!git push --set-upstream origin $(git symbolic-ref --short HEAD)\"\n ```\n\nHere's a breakdown of what this alias does:\n\n- `git push --set-upstream origin`: This part of the command sets the upstream tracking information for the current branch.\n- `$(git symbolic-ref --short HEAD)`: This part retrieves the name of the current branch and passes it as an argument to the `git push` command.\n\nAfter adding this alias, you can use the `git pushnew` command to set the upstream and push to a new branch with the same name as the current local branch.\n\nYou can test the alias with the following steps:\n1. Navigate to your git repository.\n2. Ensure you are on the branch you want to push.\n3. Run the command:\n\n ```sh\n git pushnew\n ```\n\nThis will push your current branch to a new branch on the remote repository with the same name."
},
"created_at": 1719340152.765231,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef1234db6b65",
"object": "compliance.workspace.conversation.message",
"parent_id": "abcdef12-3456-7890-abcd-ef1234e05916"
},
{
"author": {
"object": "compliance.workspace.conversation.message.author",
"role": "user",
"tool_name": null
},
"content": {
"annotations": [],
"type": "text",
"value": "create a git alias called \"acm\" which adds all and then commits with a commit message supplied as an argument to the alias"
},
"created_at": 1719340201.705469,
"files": {
"data": [],
"has_more": false,
"last_id": null,
"object": "list"
},
"gpt_id": null,
"id": "abcdef12-3456-7890-abcd-ef12343f2252",
"object": "compliance.workspace.conversation.message",
"parent_id": "abcdef12-3456-7890-abcd-ef1234db6b65"
}
],
"has_more": false,
"last_id": null,
"object": "list"
},
"object": "compliance.workspace.conversation",
"title": "Create Git Alias: pushnew",
"user_email": "user@example.com",
"user_id": "user-example",
"workspace_id": "abcdef12-3456-7890-abcd-ef1234c9b406"
}
Sample Parsing¶
metadata.event_type: GENERIC_EVENT
metadata.vendor_name: "OpenAI"
metadata.product_name: "ChatGPT Audit Logs"
additional.fields["workspace_id"]: "abcdef12-3456-7890-abcd-ef1234c9b406"
principal.user.userid: "user-example"
principal.user.attribute.labels["user"]: "write a git alias called \"pushnew\" which creates a new upstream with the same name as the current local branch"
principal.user.attribute.labels["assistant"]: "To create a git alias called \"pushnew\" that sets the upstream to a new branch with the same name as the current local branch and then pushes to it, you can add the following alias to your git configuration:\n\n1. Open your terminal.\n2. Run the following command to open the global git configuration file in your default text editor:\n\n ```sh\n git config --global --edit\n ```\n\n3. Add the following lines to the file:\n\n ```sh\n [alias]\n pushnew = \"!git push --set-upstream origin $(git symbolic-ref --short HEAD)\"\n ```\n\nHere's a breakdown of what this alias does:\n\n- `git push --set-upstream origin`: This part of the command sets the upstream tracking information for the current branch.\n- `$(git symbolic-ref --short HEAD)`: This part retrieves the name of the current branch and passes it as an argument to the `git push` command.\n\nAfter adding this alias, you can use the `git pushnew` command to set the upstream and push to a new branch with the same name as the current local branch.\n\nYou can test the alias with the following steps:\n1. Navigate to your git repository.\n2. Ensure you are on the branch you want to push.\n3. Run the command:\n\n ```sh\n git pushnew\n ```\n\nThis will push your current branch to a new branch on the remote repository with the same name."
principal.user.attribute.labels["user"]: "create a git alias called \"acm\" which adds all and then commits with a commit message supplied as an argument to the alias"
principal.user.email_addresses: "user@example.com"
principal.resource.resource_subtype: "Create Git Alias: pushnew"
principal.resource.name: "compliance.workspace.conversation"
principal.resource.product_object_id: "abcdef12-3456-7890-abcd-ef1234d63ded"
Rules¶
Coming Soon