Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyoaev/signatures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class SignatureTarget(BaseModel):

agent: str | None = None
asset: str | None = None
asset_group: str | None = None


class TargetSignatures(BaseModel):
Expand Down
3 changes: 1 addition & 2 deletions pyoaev/signatures/signature_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def build_payload(

Args:
execution_signatures: A single post-execution ExecutionSignature or a list (multi-targets).
targets_meta: Target metadata dict(s) with keys like agent, asset, asset_group.
targets_meta: Target metadata dict(s) with keys like agent, asset.
expectation_types: The 1+ expectation type labels (e.g. ['DETECTION', 'PREVENTION']).
extra_signatures: Optional mapping of expectation types to additional signature fields that will be merged
into the base post_signatures.
Expand Down Expand Up @@ -221,7 +221,6 @@ def build_payload(
signature_target=SignatureTarget(
agent=target.agent_id,
asset=target.asset_id,
asset_group=target.asset_group_id,
),
signature_values=signature_values,
)
Expand Down
2 changes: 1 addition & 1 deletion test/signatures/test_signature_manager_build_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from pyoaev.signatures.signature_manager import SignatureManager
from pyoaev.signatures.types import SignatureTypes

TARGET = SimpleNamespace(agent_id="agent-1", asset_id="asset-1", asset_group_id=None)
TARGET = SimpleNamespace(agent_id="agent-1", asset_id="asset-1")
CANONICAL_TYPES = {signature_type.value for signature_type in SignatureTypes}


Expand Down
2 changes: 0 additions & 2 deletions test/signatures/test_signature_manager_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def context():
_CANONICAL_SIGNATURE_TARGET = {
"agent": "b044fbc7-f277-4c8c-aeae-5c5497598c51",
"asset": "asset-host-a",
"asset_group": "asset-group-internal",
}


Expand Down Expand Up @@ -239,7 +238,6 @@ def compiled_large_payload(context):
"signature_target": {
"agent": f"agent-{index:08d}-0000-0000-0000-000000000000",
"asset": f"asset-{index}",
"asset_group": "asset-group-bulk",
},
"signature_values": [
{
Expand Down
Loading