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
2 changes: 1 addition & 1 deletion docs/content/en/integrations/parsers/file/clair.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Clair Scan"
toc_hide: true
---
Import JSON reports of Docker image vulnerabilities.
You can import JSON reports of Docker image vulnerabilities found by a Clair scan or the Clair Klar client.

### Sample Scan Data
Sample Clair Scan scans can be found [here](https://github.com/DefectDojo/django-DefectDojo/tree/master/unittests/scans/clair).
9 changes: 0 additions & 9 deletions docs/content/en/integrations/parsers/file/clair_klar.md

This file was deleted.

12 changes: 12 additions & 0 deletions unittests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,15 @@ def test_file_existence(self):
if ".read()" in str(line):
read_true = True
i = 0

def test_parser_existence(self):
for docs in os.scandir(os.path.join(basedir, 'docs', 'content', 'en', 'integrations', 'parsers', 'file')):
if docs.name not in [
'_index.md', 'codeql.md', 'edgescan.md'
]:
with self.subTest(parser=docs.name.split('.md')[0], category='parser'):
parser = os.path.join(basedir, 'dojo', 'tools', f"{docs.name.split('.md')[0]}", "parser.py")
self.assertTrue(
os.path.isfile(parser),
f"Parser '{parser}' is missing or using different name"
)