Skip to content

Commit ba74aca

Browse files
committed
fix: removed duplicate filters / merge follow-up fixes
1 parent c67c771 commit ba74aca

File tree

9 files changed

+62
-25
lines changed

9 files changed

+62
-25
lines changed

backend/application/core/api/filters.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ class ObservationFilter(FilterSet):
270270
("upgrade_impact_score", "upgrade_impact_score"),
271271
("origin_component_location", "origin_component_location"),
272272
("has_potential_duplicates", "has_potential_duplicates"),
273-
("patch_available", "patch_available"),
274273
("origin_component_purl_type", "origin_component_purl_type"),
275274
("update_impact_score", "update_impact_score"),
276275
("fix_available", "fix_available"),
@@ -291,7 +290,6 @@ class Meta: # pylint: disable=duplicate-code
291290
"api_configuration_name",
292291
"origin_service",
293292
"has_potential_duplicates",
294-
"patch_available",
295293
"origin_component_purl_type",
296294
"origin_component_purl",
297295
"origin_component_cpe",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated by Django 5.2.10 on 2026-01-15 11:42
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("core", "0075_observation_initialize_fix_and_upgrade"),
10+
("core", "0077_merge_20260102_1149"),
11+
]
12+
13+
operations = []
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 5.2.10 on 2026-01-15 11:42
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("core", "0078_merge_20260115_1242"),
10+
]
11+
12+
operations = [
13+
migrations.RemoveIndex(
14+
model_name="observation",
15+
name="core_observ_patch_a_6e4989_idx",
16+
),
17+
migrations.RemoveIndex(
18+
model_name="observation",
19+
name="core_observ_upgrade_f3aeed_idx",
20+
),
21+
migrations.RemoveField(
22+
model_name="observation",
23+
name="patch_available",
24+
),
25+
]

backend/application/core/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ class Observation(Model):
371371
rule_vex_remediations = JSONField(blank=True, null=True)
372372
vex_vex_remediations = JSONField(blank=True, null=True)
373373
assessment_vex_remediations = JSONField(blank=True, null=True)
374-
patch_available = BooleanField(default=False)
375374
patched_in_versions = CharField(max_length=255, blank=True)
376375
vex_statement = ForeignKey(
377376
"vex.VEX_Statement",
@@ -406,7 +405,6 @@ class Meta:
406405
Index(fields=["last_observation_log"]),
407406
Index(fields=["epss_score"]),
408407
Index(fields=["scanner"]),
409-
Index(fields=["patch_available"]),
410408
Index(fields=["update_impact_score"]),
411409
]
412410

backend/application/import_observations/parsers/cyclone_dx/parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ def parse_version(version: str) -> tuple[int, ...]:
318318
origin_component_location=component_location,
319319
patched_in_versions=patched_versions,
320320
upgrade_impact_score=upgrade_impact_score,
321-
patch_available=bool(patched_versions),
322321
)
323322

324323
self._add_references(vulnerability, observation)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated by Django 5.2.10 on 2026-01-15 11:42
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("rules", "0017_rule_origin_component_purl"),
10+
("rules", "0018_merge_20251010_1715"),
11+
]
12+
13+
operations = []

docker-compose-dev.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ services:
88
build:
99
context: .
1010
dockerfile: ./docker/frontend/dev/Dockerfile
11-
image: secobserve_frontend
12-
profiles:
13-
- frontend
11+
image: secobserve_frontend_dev
1412
ports:
1513
- "3000:3000"
1614
volumes:
@@ -48,9 +46,6 @@ services:
4846
- dev_huey_data:/var/lib/huey
4947
ports:
5048
- "8000:8000"
51-
command: /start
52-
#entrypoint: "/bin/bash"
53-
#command: ["-c", "sleep 999"]
5449

5550
postgres:
5651
image: postgres:15.15-alpine
@@ -63,3 +58,11 @@ services:
6358
ports:
6459
- "5432:5432"
6560

61+
mailhog:
62+
image: mailhog/mailhog:v1.0.1
63+
profiles:
64+
- mailhog
65+
entrypoint: ["/bin/sh", "-c", "MailHog &>/dev/null"]
66+
ports:
67+
- "1025:1025"
68+
- "8025:8025"

frontend/src/core/observations/ObservationList.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ function listFilters() {
6767
<AutocompleteInputMedium optionText="name" />
6868
</ReferenceInput>,
6969
<TextInput source="branch_name" label="Branch / Version name" alwaysOn />,
70-
<TextInput source="title" alwaysOn />,
71-
<AutocompleteInput
72-
source="current_severity"
73-
label="Severity"
74-
choices={OBSERVATION_SEVERITY_CHOICES}
75-
alwaysOn
76-
/>,
77-
<AutocompleteInput source="current_status" label="Status" choices={OBSERVATION_STATUS_CHOICES} alwaysOn />,
7870
// <ReferenceInput
7971
// label="Service"
8072
// source="origin_service"
@@ -103,12 +95,9 @@ function listFilters() {
10395
label="Component type"
10496
choices={PURL_TYPE_CHOICES}
10597
alwaysOn
106-
/>
98+
/>,
99+
<NullableBooleanInput source="fix_available" label="Fix available" alwaysOn />
107100
);
108-
if (feature_exploit_information()) {
109-
filters.push(<NullableBooleanInput source="cve_known_exploited" label="CVE exploited" alwaysOn />);
110-
}
111-
filters.push(<NullableBooleanInput source="fix_available" label="Fix available" alwaysOn />);
112101
return filters;
113102
}
114103

frontend/src/core/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export interface Observation extends RaRecord {
126126
current_vex_remediations: string;
127127
assessment_vex_remediations: string;
128128
rule_vex_remediations: string;
129-
patch_available: boolean;
130129
patched_in_versions: string;
131130
origin_component_purl_type: string;
132131
}

0 commit comments

Comments
 (0)