-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Endpoint] Add support to Action Responder script …
…for `get-file` response action (#142663) * Add `const`'s for file storage indexes * Add file storage TS type * Add support to Action Responder script for `get-file` response action * Add support to action generator to output `get-file` responses * correct `last` property of the upload chunk * Fix type * fix UI jest test failures * Fix server jest tests and Generator bug
- Loading branch information
1 parent
3469d64
commit 3fa8a87
Showing
10 changed files
with
159 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
x-pack/plugins/security_solution/common/endpoint/types/file_storage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/** | ||
* The Metadata information about a file that was uploaded by Endpoint | ||
* as a result of a `get-file` response action | ||
*/ | ||
export interface UploadedFile { | ||
file: { | ||
/** The chunk size used for each chunk in this file */ | ||
ChunkSize?: number; | ||
/** | ||
* - `AWAITING_UPLOAD`: file metadata has been created. File is ready to be uploaded. | ||
* - `UPLOADING`: file contents are being uploaded. | ||
* - `READY`: file has been uploaded, successfully, without errors. | ||
* - `UPLOAD_ERROR`: an error happened while the file was being uploaded, file contents | ||
* are most likely corrupted. | ||
* - `DELETED`: file is deleted. Files can be marked as deleted before the actual deletion | ||
* of the contents and metadata happens. Deleted files should be treated as if they don’t | ||
* exist. Only files in READY state can transition into DELETED state. | ||
*/ | ||
Status: 'AWAITING_UPLOAD' | 'UPLOADING' | 'READY' | 'UPLOAD_ERROR' | 'DELETED'; | ||
/** File extension (if any) */ | ||
extension?: string; | ||
hash?: { | ||
md5?: string; | ||
sha1?: string; | ||
sha256?: string; | ||
sha384?: string; | ||
sha512?: string; | ||
ssdeep?: string; | ||
tlsh?: string; | ||
}; | ||
mime_type?: string; | ||
mode?: string; | ||
/** File name */ | ||
name: string; | ||
/** The full path to the file on the host machine */ | ||
path: string; | ||
/** The total size in bytes */ | ||
size: number; | ||
created?: string; | ||
type: string; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters