Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sca): update sca scan result model with new fields from API #95

Merged
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
7 changes: 7 additions & 0 deletions pygitguardian/sca_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class SCAVulnerability(Base, FromDictMixin):
cve_ids: List[str] = field(default_factory=list)
created_at: Optional[datetime] = None
fixed_version: Optional[str] = None
url: Optional[str] = None
status: Optional[str] = None
ignored_until: Optional[datetime] = None
ignore_reason: Optional[str] = None
ignore_comment: Optional[str] = None


SCAVulnerability.SCHEMA = cast(
Expand Down Expand Up @@ -106,6 +111,7 @@ class SCALocationVulnerability(Base, FromDictMixin):
@dataclass
class SCAScanAllOutput(Base, FromDictMixin):
scanned_files: List[str] = field(default_factory=list)
source_found: bool = False
found_package_vulns: List[SCALocationVulnerability] = field(default_factory=list)


Expand All @@ -118,6 +124,7 @@ class SCAScanAllOutput(Base, FromDictMixin):
@dataclass
class SCAScanDiffOutput(Base, FromDictMixin):
scanned_files: List[str] = field(default_factory=list)
source_found: bool = False
added_vulns: List[SCALocationVulnerability] = field(default_factory=list)
removed_vulns: List[SCALocationVulnerability] = field(default_factory=list)

Expand Down
Loading