Skip to content

Commit

Permalink
fix(glimps): minor fixes to make glimps analysis action work
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromefellus-sekoia authored and glimps-glv committed Jan 21, 2025
1 parent 758875e commit 69e76ee
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Glimps/action_analyse_a_file.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Analyse a file",
"name": "[TEST] Analyse a file",
"description": "Submit file to Glimps Detect to be analysed",
"uuid": "14c3192f-532c-506d-ae0d-452b64d8718d",
"uuid": "04c3192f-532c-506d-ae0d-452b64d8718d",
"docker_parameters": "SubmitFile",
"arguments": {
"title": "SubmitArgument",
Expand Down
4 changes: 2 additions & 2 deletions Glimps/action_analyse_a_file_and_wait_for_result.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Analyse a file and wait for result",
"name": "[TEST] Analyse a file and wait for result",
"description": "Submit file to Glimps Detect to be analysed and wait for its results",
"uuid": "7836a5fb-5ded-55ee-aca1-c6a3d080c49b",
"uuid": "6836a5fb-5ded-55ee-aca1-c6a3d080c49b",
"docker_parameters": "WaitForFile",
"arguments": {
"title": "WaitForResultArgument",
Expand Down
4 changes: 2 additions & 2 deletions Glimps/action_export_analysis_result.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Export analysis result",
"name": "[TEST] Export analysis result",
"description": "Export analysis result with the requested layout and format",
"uuid": "9691dbce-10fb-5e7c-b0e4-a783f86612f6",
"uuid": "8691dbce-10fb-5e7c-b0e4-a783f86612f6",
"docker_parameters": "ExportSubmission",
"arguments": {
"title": "ExportSubmissionArguments",
Expand Down
4 changes: 2 additions & 2 deletions Glimps/action_get_profile_status.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Get profile status",
"name": "[TEST] Get profile status",
"description": "Get Glimps detect profile status, it includes quotas, eastimated analysis duration and cache",
"uuid": "69f36722-583b-5e49-8e1b-d6756f0c2fe5",
"uuid": "59f36722-583b-5e49-8e1b-d6756f0c2fe5",
"docker_parameters": "GetStatus",
"arguments": {},
"results": {
Expand Down
4 changes: 2 additions & 2 deletions Glimps/action_retrieve_analysis.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Retrieve analysis",
"name": "[TEST] Retrieve analysis",
"description": "Retrieve the analysis matching the given uuid",
"uuid": "c8c8a939-fa7e-5e4f-a73e-a5ed97ab8613",
"uuid": "b8c8a939-fa7e-5e4f-a73e-a5ed97ab8613",
"docker_parameters": "RetrieveAnalysis",
"arguments": {
"title": "GetAnalysisByUUIDArgument",
Expand Down
4 changes: 2 additions & 2 deletions Glimps/action_retrieve_the_analysis.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"uuid": "31d90d77-a480-408b-9ce3-d565ff161231",
"uuid": "21d90d77-a480-408b-9ce3-d565ff161231",
"name": "[Deprecated] Get the results of an analysis",
"description": "",
"docker_parameters": "get-results/{uuid}",
Expand Down Expand Up @@ -145,4 +145,4 @@
],
"type": "object"
}
}
}
4 changes: 2 additions & 2 deletions Glimps/action_search_a_previous_analysis.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"uuid": "28608954-4683-49fe-a494-333d3254720b",
"uuid": "ef64e033-6d2c-4883-9ef3-0c42b75c7864",
"name": "[Deprecated] Search previous analysis",
"description": "",
"docker_parameters": "get-search/{sha256}",
Expand Down Expand Up @@ -145,4 +145,4 @@
],
"type": "object"
}
}
}
2 changes: 1 addition & 1 deletion Glimps/action_search_analysis.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Search analysis",
"description": "Search an analysis for a given sha256 input file",
"uuid": "f69ebe5f-3dd0-5e97-a3cc-51b46c891efc",
"uuid": "25b710b9-a849-46dd-ae47-447c1a350c7b",
"docker_parameters": "SearchPreviousAnalysis",
"arguments": {
"title": "SearchAnalysisBySha256Argument",
Expand Down
2 changes: 1 addition & 1 deletion Glimps/action_submit_a_file_to_be_analysed.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"uuid": "8c7a4d68-e8b1-4c28-964e-c7a93e7a6e19",
"uuid": "850c6cb6-a37e-41e4-b34d-e1d17b25b7b9",
"name": "[Deprecated] Analyse a file",
"description": "",
"docker_parameters": "post-submit",
Expand Down
5 changes: 3 additions & 2 deletions Glimps/glimps/submit_file_to_be_analysed_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class WaitForFile(GLIMPSAction):
results_model = AnalysisResponse

def run(self, arguments: WaitForResultArgument) -> AnalysisResponse:
raw_analysis = self.gdetect_client.waitfor(
self._data_path.joinpath(arguments.file_name),
raw_analysis = self.gdetect_client.waitfor_reader(
arguments.file_name,
self._data_path.joinpath(arguments.file_name).open("rb"),
bypass_cache=arguments.bypass_cache,
pull_time=arguments.pull_time,
push_timeout=arguments.push_timeout,
Expand Down
2 changes: 1 addition & 1 deletion Glimps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
module.register(SubmitFile, "SubmitFile")
module.register(GetStatus, "GetStatus")
module.register(RetrieveAnalysis, "RetrieveAnalysis")

# register deprecated actions
module.register(DeprecatedRetrieveAnalysis, "get-results/{uuid}")
module.register(DeprecatedSearchPreviousAnalysis, "get-search/{sha256}")
Expand Down
8 changes: 4 additions & 4 deletions Glimps/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"uuid": "3ba4b84b-c323-48ef-93d2-6f3544c783d6",
"name": "GLIMPS",
"slug": "glimps",
"uuid": "48728124-6803-41b0-be1f-3771a4046f24",
"name": "GLIMPS [TEST]",
"slug": "glimps-test",
"description": "[Glimps](https://www.glimps.fr/) offers a DeepLearning solution to detect, analyze and classify malwares. It enables faster responses during incidents with a detailed understanding of the threat",
"version": "1.14.0",
"version": "1.14.2",
"configuration": {
"title": "GLIMPSConfiguration",
"type": "object",
Expand Down

0 comments on commit 69e76ee

Please sign in to comment.