|
9 | 9 | from _incydr_sdk.enums.file_events import ReportType |
10 | 10 |
|
11 | 11 |
|
| 12 | +class UserJustification(Model): |
| 13 | + reason: Optional[str] = Field( |
| 14 | + None, title="User-select justification for temporarily allowing this action." |
| 15 | + ) |
| 16 | + text: Optional[str] = Field( |
| 17 | + None, |
| 18 | + title="User-select justification for temporarily allowing this action. Only applies when reason is 'Other'.", |
| 19 | + ) |
| 20 | + |
| 21 | + |
| 22 | +class ResponseControls(Model): |
| 23 | + preventative_control: Optional[str] = Field( |
| 24 | + None, |
| 25 | + alias="preventativeControl", |
| 26 | + example="BLOCKED", |
| 27 | + title="The preventative action applied to this event", |
| 28 | + ) |
| 29 | + user_justification: Optional[UserJustification] = Field( |
| 30 | + None, alias="userJustification" |
| 31 | + ) |
| 32 | + |
| 33 | + |
12 | 34 | class AcquiredFromGit(Model): |
13 | 35 | repository_email: Optional[str] = Field( |
14 | 36 | None, |
@@ -108,15 +130,33 @@ class Hash(Model): |
108 | 130 | ) |
109 | 131 |
|
110 | 132 |
|
| 133 | +class Extension(Model): |
| 134 | + browser: Optional[str] = Field( |
| 135 | + None, title="The web browser in which the event occurred." |
| 136 | + ) |
| 137 | + version: Optional[str] = Field( |
| 138 | + None, |
| 139 | + title="The version of the Code42 Incydr extension installed when the event occurred.", |
| 140 | + ) |
| 141 | + logged_in_user: Optional[str] = Field( |
| 142 | + None, |
| 143 | + alias="loggedInUser", |
| 144 | + title="The user signed in to the active tab where the event occurred. For example, the user signed in to Gmail. This may differ from the user account signed in to the browser itself.", |
| 145 | + ) |
| 146 | + |
| 147 | + |
111 | 148 | class Process(Model): |
112 | 149 | executable: Optional[str] = Field( |
| 150 | + None, |
113 | 151 | description="The name of the process that accessed the file, as reported by the device’s operating system. Depending on your Code42 product plan, this value may be null for some event types.", |
114 | 152 | example="bash", |
115 | 153 | ) |
116 | 154 | owner: Optional[str] = Field( |
| 155 | + None, |
117 | 156 | description="The username of the process owner, as reported by the device’s operating system. Depending on your Code42 product plan, this value may be null for some event types.", |
118 | 157 | example="root", |
119 | 158 | ) |
| 159 | + extension: Optional[Extension] |
120 | 160 |
|
121 | 161 |
|
122 | 162 | class RemovableMedia(Model): |
@@ -454,6 +494,11 @@ class File(Model): |
454 | 494 | description="Unique identifier reported by the cloud provider for the file associated with the event.", |
455 | 495 | example="PUL5zWLRrdudiJZ1OCWw", |
456 | 496 | ) |
| 497 | + mime_type: Optional[str] = Field( |
| 498 | + None, |
| 499 | + alias="mimeType", |
| 500 | + title="The MIME type of the file. For endpoint events, if the mimeTypeByBytes differs from mimeTypeByExtension, this indicates the most likely MIME type for the file. For activity observed by a web browser, this is the only MIME type reported.", |
| 501 | + ) |
457 | 502 | mime_type_by_bytes: Optional[str] = Field( |
458 | 503 | alias="mimeTypeByBytes", |
459 | 504 | description="The MIME type of the file based on its contents.", |
@@ -489,6 +534,21 @@ class File(Model): |
489 | 534 | description="URL reported by the cloud provider at the time the event occurred.", |
490 | 535 | example="https://example.com", |
491 | 536 | ) |
| 537 | + archive_id: Optional[str] = Field( |
| 538 | + None, |
| 539 | + alias="archiveId", |
| 540 | + title="Unique identifier for files identified as an archive, such as .zip files.", |
| 541 | + ) |
| 542 | + parent_archive_id: Optional[str] = Field( |
| 543 | + None, |
| 544 | + alias="parentArchiveId", |
| 545 | + title="For files contained within an archive (such as a .zip file), the unique identifier for that archive; searching on parentArchiveID returns events for all files contained within that archive", |
| 546 | + ) |
| 547 | + password_protected: Optional[bool] = Field( |
| 548 | + None, |
| 549 | + alias="passwordProtected", |
| 550 | + title="Indicates if this file is password protected.", |
| 551 | + ) |
492 | 552 |
|
493 | 553 |
|
494 | 554 | class Risk(Model): |
@@ -556,6 +616,11 @@ class Source(Model): |
556 | 616 | description="The IP address of the user's device on your internal network, including Network interfaces, Virtual Network Interface controllers (NICs), and Loopback/non-routable addresses.", |
557 | 617 | example=["127.0.0.1", "127.0.0.2"], |
558 | 618 | ) |
| 619 | + remote_hostname: Optional[str] = Field( |
| 620 | + None, |
| 621 | + alias="remoteHostname", |
| 622 | + title="For events where a file transfer tool was used, the source hostname.", |
| 623 | + ) |
559 | 624 | removable_media: Optional[RemovableMedia] = Field( |
560 | 625 | alias="removableMedia", |
561 | 626 | description="Metadata about the removable media source.", |
@@ -638,18 +703,44 @@ class Event(Model): |
638 | 703 | description="Sharing types added by this event.", |
639 | 704 | example=["SharedViaLink"], |
640 | 705 | ) |
641 | | - vector: Optional[str] |
| 706 | + vector: Optional[str] = Field( |
| 707 | + None, |
| 708 | + example="GIT_PUSH", |
| 709 | + title="The method of file movement. For example: UPLOADED, DOWNLOADED, EMAILED.", |
| 710 | + ) |
642 | 711 |
|
643 | 712 |
|
644 | 713 | class Git(Model): |
645 | | - event_id: Optional[str] = Field(None, alias="eventId") |
646 | | - last_commit_hash: Optional[str] = Field(None, alias="lastCommitHash") |
647 | | - repository_email: Optional[str] = Field(None, alias="repositoryEmail") |
| 714 | + event_id: Optional[str] = Field( |
| 715 | + None, |
| 716 | + alias="eventId", |
| 717 | + title="A global unique identifier (GUID) generated by Incydr for this Git event. All files associated with this event have the same Git event ID. A single Git event can be associated with multiple file events.", |
| 718 | + ) |
| 719 | + last_commit_hash: Optional[str] = Field( |
| 720 | + None, |
| 721 | + alias="lastCommitHash", |
| 722 | + title="Hash value from the most recent commit in this Git event.", |
| 723 | + ) |
| 724 | + repository_email: Optional[str] = Field( |
| 725 | + None, |
| 726 | + alias="repositoryEmail", |
| 727 | + title="The email address specified by the user who performed the Git event. This is a user-defined value and may differ from the credentials used to sign in to Git.", |
| 728 | + ) |
648 | 729 | repository_endpoint_path: Optional[str] = Field( |
649 | | - None, alias="repositoryEndpointPath" |
| 730 | + None, |
| 731 | + alias="repositoryEndpointPath", |
| 732 | + title="File path of the local Git repository on the user's endpoint.", |
| 733 | + ) |
| 734 | + repository_uri: Optional[str] = Field( |
| 735 | + None, |
| 736 | + alias="repositoryUri", |
| 737 | + title="Uniform Resource Identifier (URI) for the Git repository.", |
| 738 | + ) |
| 739 | + repository_user: Optional[str] = Field( |
| 740 | + None, |
| 741 | + alias="repositoryUser", |
| 742 | + title="The username specified by the user who performed the Git event. This is a user-defined value and may differ from the credentials used to sign in to Git.", |
650 | 743 | ) |
651 | | - repository_uri: Optional[str] = Field(None, alias="repositoryUri") |
652 | | - repository_user: Optional[str] = Field(None, alias="repositoryUser") |
653 | 744 |
|
654 | 745 |
|
655 | 746 | class FileEventV2(ResponseModel): |
@@ -688,6 +779,10 @@ class FileEventV2(ResponseModel): |
688 | 779 | report: Optional[Report] = Field( |
689 | 780 | description="Metadata for reports from 3rd party sources, such Salesforce downloads.", |
690 | 781 | ) |
| 782 | + response_controls: Optional[ResponseControls] = Field( |
| 783 | + alias="responseControls", |
| 784 | + description="Metadata about preventative actions applied to file activity. Only applies to events for users on a preventative watchlist.", |
| 785 | + ) |
691 | 786 | risk: Optional[Risk] = Field( |
692 | 787 | description="Risk factor metadata.", |
693 | 788 | ) |
|
0 commit comments