Skip to content

Commit

Permalink
Merge pull request #1486 from Bidaya0/feat/new-sca-impl-scan-scan-add…
Browse files Browse the repository at this point in the history
…-field-fix-version

feat: new sca impl api add field.
  • Loading branch information
Bidaya0 authored Jun 2, 2023
2 parents 74b4c13 + bcee7ec commit fcefd4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dongtai_common/models/asset_vul_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class IastAssetVulV2(models.Model):
unique=True)
vul_type = models.JSONField(blank=True, null=True)
vul_codes = models.JSONField(blank=True, null=True)
affected_versions = models.JSONField(blank=True, null=True)
unaffected_versions = models.JSONField(blank=True, null=True)

class Meta:
managed = True
Expand Down
2 changes: 2 additions & 0 deletions dongtai_web/dongtai_sca/scan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ def sca_scan_asset_v2(aql: str, ecosystem: str, package_name: str,
vul.vul_info.published_time.timestamp()
if vul.vul_info.published_time else
vul.vul_info.create_time.timestamp(),
"affected_versions": vul.affected_versions,
"unaffected_versions": vul.unaffected_versions,
})
# need add update logic
vul_asset_rel = IastVulAssetRelationV2(
Expand Down

0 comments on commit fcefd4d

Please sign in to comment.