|
1 | 1 | # |
2 | | -# Copyright (c) 2017 nexB Inc. and others. All rights reserved. |
| 2 | +# Copyright (c) nexB Inc. and others. All rights reserved. |
3 | 3 | # http://nexb.com and https://github.com/nexB/vulnerablecode/ |
4 | 4 | # The VulnerableCode software is licensed under the Apache License version 2.0. |
5 | 5 | # Data generated with VulnerableCode require an acknowledgment. |
|
18 | 18 | # OR CONDITIONS OF ANY KIND, either express or implied. No content created from |
19 | 19 | # VulnerableCode should be considered or used as legal advice. Consult an Attorney |
20 | 20 | # for any legal advice. |
21 | | -# VulnerableCode is a free software code scanning tool from nexB Inc. and others. |
| 21 | +# VulnerableCode is a free software tool from nexB Inc. and others. |
22 | 22 | # Visit https://github.com/nexB/vulnerablecode/ for support and download. |
23 | 23 |
|
24 | 24 | from django.contrib import admin |
|
34 | 34 |
|
35 | 35 | @admin.register(Vulnerability) |
36 | 36 | class VulnerabilityAdmin(admin.ModelAdmin): |
37 | | - pass |
| 37 | + search_fields = ["cve_id"] |
38 | 38 |
|
39 | 39 |
|
40 | 40 | @admin.register(VulnerabilityReference) |
41 | 41 | class VulnerabilityReferenceAdmin(admin.ModelAdmin): |
42 | | - pass |
| 42 | + search_fields = ["vulnerability__cve_id", "reference_id", "url"] |
43 | 43 |
|
44 | 44 |
|
45 | 45 | @admin.register(Package) |
46 | 46 | class PackageAdmin(admin.ModelAdmin): |
47 | | - pass |
| 47 | + list_filter = ("type", "namespace") |
| 48 | + search_fields = ["name"] |
48 | 49 |
|
49 | 50 |
|
50 | 51 | @admin.register(PackageRelatedVulnerability) |
51 | 52 | class PackageRelatedVulnerabilityAdmin(admin.ModelAdmin): |
52 | | - pass |
| 53 | + list_filter = ("is_vulnerable", "package__type", "package__namespace") |
| 54 | + search_fields = ["vulnerability__cve_id", "package__name"] |
53 | 55 |
|
54 | 56 |
|
55 | 57 | @admin.register(Importer) |
|
0 commit comments