Make security status for manifests without legacy images more clear in the UI
This commit is contained in:
parent
1e4e424d64
commit
001768c043
3 changed files with 16 additions and 5 deletions
|
@ -293,6 +293,7 @@ class SecurityScanStatus(Enum):
|
||||||
SCANNED = 'scanned'
|
SCANNED = 'scanned'
|
||||||
FAILED = 'failed'
|
FAILED = 'failed'
|
||||||
QUEUED = 'queued'
|
QUEUED = 'queued'
|
||||||
|
UNSUPPORTED = 'unsupported'
|
||||||
|
|
||||||
|
|
||||||
class ManifestLayer(namedtuple('ManifestLayer', ['layer_info', 'blob'])):
|
class ManifestLayer(namedtuple('ManifestLayer', ['layer_info', 'blob'])):
|
||||||
|
|
|
@ -362,7 +362,7 @@ class OCIModel(SharedModel, RegistryDataInterface):
|
||||||
if isinstance(manifest_or_legacy_image, Manifest):
|
if isinstance(manifest_or_legacy_image, Manifest):
|
||||||
image = oci.shared.get_legacy_image_for_manifest(manifest_or_legacy_image._db_id)
|
image = oci.shared.get_legacy_image_for_manifest(manifest_or_legacy_image._db_id)
|
||||||
if image is None:
|
if image is None:
|
||||||
return None
|
return SecurityScanStatus.UNSUPPORTED
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
image = database.Image.get(id=manifest_or_legacy_image._db_id)
|
image = database.Image.get(id=manifest_or_legacy_image._db_id)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<span ng-if="!$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).loading">
|
<span ng-if="!$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).loading">
|
||||||
<!-- Queued -->
|
<!-- Queued -->
|
||||||
<span class="scanning" ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'queued'"
|
<span class="scanning" ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'queued'"
|
||||||
data-title="The image for this tag is queued to be scanned for vulnerabilities"
|
data-title="The manifest for this tag is queued to be scanned for vulnerabilities"
|
||||||
bs-tooltip>
|
bs-tooltip>
|
||||||
<i class="fa fa-ellipsis-h"></i>
|
<i class="fa fa-ellipsis-h"></i>
|
||||||
Queued
|
Queued
|
||||||
|
@ -18,16 +18,26 @@
|
||||||
|
|
||||||
<!-- Scan Failed -->
|
<!-- Scan Failed -->
|
||||||
<span class="failed-scan" ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'failed'"
|
<span class="failed-scan" ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'failed'"
|
||||||
data-title="The image for this tag could not be scanned for vulnerabilities"
|
data-title="The manifest for this tag could not be scanned for vulnerabilities"
|
||||||
bs-tooltip>
|
bs-tooltip>
|
||||||
<span class="donut-chart" width="22" data="[{'index': 0, 'value': 1, 'color': '#eee'}]"></span>
|
<span class="donut-chart" width="22" data="[{'index': 0, 'value': 1, 'color': '#eee'}]"></span>
|
||||||
Unable to scan
|
Unable to scan
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<!-- Unsupported -->
|
||||||
|
<span class="failed-scan"
|
||||||
|
ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'unsupported'"
|
||||||
|
data-title="The manifest for this tag has an operating system or package manager unsupported by Quay Security Scanner"
|
||||||
|
bs-tooltip
|
||||||
|
bindonce>
|
||||||
|
<span class="donut-chart" width="22" data="[{'index': 0, 'value': 1, 'color': '#eee'}]"></span>
|
||||||
|
Unsupported
|
||||||
|
</span>
|
||||||
|
|
||||||
<!-- No Features -->
|
<!-- No Features -->
|
||||||
<span class="failed-scan"
|
<span class="failed-scan"
|
||||||
ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'scanned' && !$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasFeatures"
|
ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'scanned' && !$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasFeatures"
|
||||||
data-title="The image for this tag has an operating system or package manager unsupported by Quay Security Scanner"
|
data-title="The manifest for this tag has an operating system or package manager unsupported by Quay Security Scanner"
|
||||||
bs-tooltip
|
bs-tooltip
|
||||||
bindonce>
|
bindonce>
|
||||||
<span class="donut-chart" width="22" data="[{'index': 0, 'value': 1, 'color': '#eee'}]"></span>
|
<span class="donut-chart" width="22" data="[{'index': 0, 'value': 1, 'color': '#eee'}]"></span>
|
||||||
|
@ -37,7 +47,7 @@
|
||||||
<!-- Features and No Vulns -->
|
<!-- Features and No Vulns -->
|
||||||
<span class="no-vulns"
|
<span class="no-vulns"
|
||||||
ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'scanned' && $ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasFeatures && !$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasVulnerabilities"
|
ng-if="$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).status == 'scanned' && $ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasFeatures && !$ctrl.getSecurityStatus($ctrl.repository, $ctrl.manifestDigest).hasVulnerabilities"
|
||||||
data-title="The image for this tag has no vulnerabilities as found in our database"
|
data-title="The manifest for this tag has no vulnerabilities as found in our database"
|
||||||
bs-tooltip
|
bs-tooltip
|
||||||
bindonce>
|
bindonce>
|
||||||
<a bo-href-i="/repository/{{ $ctrl.repository.namespace }}/{{ $ctrl.repository.name }}/manifest/{{ tag.manifest_digest }}?tab=vulnerabilities">
|
<a bo-href-i="/repository/{{ $ctrl.repository.namespace }}/{{ $ctrl.repository.name }}/manifest/{{ tag.manifest_digest }}?tab=vulnerabilities">
|
||||||
|
|
Reference in a new issue