Skip to content

Commit a87628c

Browse files
committed
feat(sca): add input scan parameters to ignore vulns
Issue: SCA-1345
1 parent 9cfc827 commit a87628c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pygitguardian/sca_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class SCAIgnoredVulnerability(Base, FromDictMixin):
3333
class SCAScanParameters(Base, FromDictMixin):
3434
minimum_severity: Optional[str] = None
3535
ignored_vulnerabilities: List[SCAIgnoredVulnerability] = field(default_factory=list)
36+
ignore_no_fix: bool = False
37+
ignore_fix_available: bool = False
3638

3739

3840
SCAScanParameters.SCHEMA = cast(

tests/test_sca_models.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,21 @@ class TestModel:
2626
(
2727
SCAScanParameters,
2828
{
29-
"miniumu_severity": "LOW",
29+
"minimum_severity": "LOW",
3030
"ignored_vulnerabilities": [
3131
{
3232
"identifier": "GHSA-toto",
3333
"path": "Pipfile",
3434
}
3535
],
36+
"ignore_fix_available": True,
37+
"ignore_no_fix": False,
38+
},
39+
),
40+
(
41+
SCAScanParameters,
42+
{
43+
"ignore_no_fix": True,
3644
},
3745
),
3846
(

0 commit comments

Comments
 (0)