Skip to content

Commit 675d6d3

Browse files
Merge pull request #80 from GitGuardian/pbes/update-iacvulnerability-schema
feat(iac): update iac scan result model with new fields from API
2 parents 6cd30bb + 479fc6e commit 675d6d3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pygitguardian/iac_models.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from dataclasses import dataclass, field
2+
from datetime import datetime
23
from typing import List, Optional, Type, cast
34

45
import marshmallow_dataclass
@@ -14,8 +15,13 @@ class IaCVulnerability(Base, FromDictMixin):
1415
line_start: int
1516
description: str
1617
documentation_url: str
17-
component: str = ""
18-
severity: str = ""
18+
component: str
19+
severity: str
20+
url: Optional[str] = None
21+
status: Optional[str] = None
22+
ignored_until: Optional[datetime] = None
23+
ignore_reason: Optional[str] = None
24+
ignore_comment: Optional[str] = None
1925

2026

2127
IaCVulnerabilitySchema = cast(
@@ -55,6 +61,7 @@ class IaCScanParameters(Base, FromDictMixin):
5561
class IaCScanResult(Base, FromDictMixin):
5662
id: str = ""
5763
type: str = ""
64+
source_found: bool = False
5865
iac_engine_version: str = ""
5966
entities_with_incidents: List[IaCFileResult] = field(default_factory=list)
6067

@@ -76,6 +83,7 @@ class IaCDiffScanEntities(Base):
7683
class IaCDiffScanResult(Base, FromDictMixin):
7784
id: str = ""
7885
type: str = ""
86+
source_found: bool = False
7987
iac_engine_version: str = ""
8088
entities_with_incidents: IaCDiffScanEntities = field(
8189
default_factory=IaCDiffScanEntities

0 commit comments

Comments
 (0)