Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion surface/sca/management/commands/resync_sbom_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def create_dependency(self, purl: str, scan_date: str) -> tuple[PackageURL | Non

return purl, dep_object

def is_valid_version(self, version: str) -> bool:
try:
semver.Version.parse(version, optional_minor_and_patch=True)
return True
except ValueError:
return False

# Check for EOL dependencies
def handle_eol(self, purl: PackageURL, dependency: SCADependency):
# Get Suppressed Findings for current dependency
Expand Down Expand Up @@ -116,7 +123,7 @@ def handle_vuln(self, vuln: dict[str, Any], pkg_obj: SCADependency):
for version in vuln.get("affected", {})
for version_range in version.get("ranges", {})
for event in version_range.get("events", {})
if "fixed" in event
if "fixed" in event and self.is_valid_version(event["fixed"])
]

SCAFinding.objects.update_or_create(
Expand Down
4 changes: 4 additions & 0 deletions surface/sca/templates/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
.ui.dropdown > .text {
color: var(--ui-control-foreground) !important;
}
tbody a[href]:not(.ui.label) {
color: var(--color-primary-500) !important;
}
</style>
</style>
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions surface/sca/templates/views/vulnerabilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@
{% endif %}
</tr>
<tr class="expandable-content" style="display: none;">
<td colspan="9">
<td colspan="10">
<p>{{ vuln.summary }}</p>
</td>
</tr>
{% empty %}
<tr>
<td class="center" colspan="9">No vulnerabilities found</td>
<td class="center" colspan="10">No vulnerabilities found</td>
</tr>
{% endfor %}
</tbody>
Expand Down
8 changes: 0 additions & 8 deletions surface/surface/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,5 @@
"900": "oklch(39.1% .09 240.876)",
"950": "oklch(29.3% .066 243.157)",
},
"font": {
"subtle-light": "var(--color-base-500)", # text-base-500
"subtle-dark": "var(--color-base-400)", # text-base-400
"default-light": "var(--color-base-600)", # text-base-600
"default-dark": "var(--color-base-300)", # text-base-300
"important-light": "var(--color-base-900)", # text-base-900
"important-dark": "var(--color-primary-500)", # text-base-100
},
},
}
5 changes: 5 additions & 0 deletions surface/surfapp/templates/admin/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<script src="{% static 'unfold/js/select2.init.js' %}"></script>

{{ media.css }}
<style>
tbody a[href]:not(.ui.label) {
color: var(--color-primary-500) !important;
}
</style>

{% if not actions_on_top and not actions_on_bottom %}
<style>
Expand Down