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: 1 addition & 0 deletions pyoaev/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
from .tag import * # noqa: F401,F403
from .team import * # noqa: F401,F403
from .user import * # noqa: F401,F403
from .vulnerability import * # noqa: F401,F403

__all__ = [name for name in dir() if not name.startswith("_")]
18 changes: 18 additions & 0 deletions pyoaev/apis/vulnerability.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from typing import Any, Dict

from pyoaev import exceptions as exc
from pyoaev.base import RESTManager, RESTObject


class Vulnerability(RESTObject):
_id_attr = "vulnerability_id"


class VulnerabilityManager(RESTManager):
_path = "/vulnerabilities"
Comment thread
Megafredo marked this conversation as resolved.
Comment thread
Copilot marked this conversation as resolved.

@exc.on_http_error(exc.OpenAEVUpdateError)
def upsert(self, data: Dict[str, Any], **kwargs: Any) -> Dict[str, Any]:
path = f"{self.path}/bulk"
result = self.openaev.http_post(path, post_data=data, **kwargs)
return result
Loading