Skip to content

Commit

Permalink
precommit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorwalton committed May 31, 2024
1 parent 712676f commit 464fb26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
3 changes: 2 additions & 1 deletion backend/app/connectors/velociraptor/routes/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
from sqlalchemy.future import select

from app.auth.utils import AuthHandler
from app.connectors.velociraptor.schema.artifacts import ArtifactReccomendationAIRequest
from app.connectors.velociraptor.schema.artifacts import ArtifactReccomendationRequest
from app.connectors.velociraptor.schema.artifacts import ArtifactsResponse, ArtifactReccomendationAIRequest
from app.connectors.velociraptor.schema.artifacts import ArtifactsResponse
from app.connectors.velociraptor.schema.artifacts import CollectArtifactBody
from app.connectors.velociraptor.schema.artifacts import CollectArtifactResponse
from app.connectors.velociraptor.schema.artifacts import OSPrefixEnum
Expand Down
21 changes: 9 additions & 12 deletions backend/app/connectors/velociraptor/schema/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class RunCommandResponse(BaseResponse):
class QuarantineResponse(BaseResponse):
pass # If you have additional fields, you can define them here


payload = {
"data_win_system_eventRecordID": "521098",
"data_win_eventdata_user": "WIN-HFOU106TD7K\\Administrator",
Expand Down Expand Up @@ -174,33 +175,29 @@ class QuarantineResponse(BaseResponse):
"data_win_system_opcode": "0",
}


class OS(str, Enum):
Windows = "Windows"
Linux = "Linux"
MacOS = "MacOS"


class ArtifactReccomendationAIRequest(BaseModel):
os: OS = Field(..., description="Operating system of the client")
prompt: dict = Field(..., example=payload)


class ArtifactReccomendationRequest(BaseModel):
artifacts: List[Artifacts] = Field(..., description="List of artifacts to be recommended")
os: str = Field(..., description="Operating system of the client")
prompt: dict = Field(..., example=payload)


class VelociraptorArtifactRecommendation(BaseModel):
name: str = Field(
...,
description="The name of the artifact."
)
description: str = Field(
...,
description="A description of the artifact."
)
explanation: str = Field(
...,
description="A detailed explanation of the purpose and why the artifact was selected."
)
name: str = Field(..., description="The name of the artifact.")
description: str = Field(..., description="A description of the artifact.")
explanation: str = Field(..., description="A detailed explanation of the purpose and why the artifact was selected.")


class ArtifactReccomendationResponse(BaseModel):
message: str = Field(...)
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}

0 comments on commit 464fb26

Please sign in to comment.