Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container scanning #23

Merged
merged 5 commits into from
Oct 7, 2022
Merged

Container scanning #23

merged 5 commits into from
Oct 7, 2022

Conversation

marwin1991
Copy link
Collaborator

@marwin1991 marwin1991 commented Oct 1, 2022

Fixes #22

Introduce severity in name #16

Some small steps forward #11

I've proposed new object oriented model to represent vulnerability adjust to reports version 15.0.2

@marwin1991
Copy link
Collaborator Author

@angrymeir If you will find some time take a look at this change :)

Copy link
Owner

@angrymeir angrymeir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always, it's a true pleasure to browse through the code you write! :)

README.md Outdated Show resolved Hide resolved
secscanner2junit/vulnerability.py Show resolved Hide resolved
return self.__identifiers[0].get_name()

def get_output(self):
return json.dumps(self._raw_object, indent=4)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With json.dumps, the report (see below) is a bit difficult to read for humans (due to formatting), especially compared to the SAST report.
Screenshot 2022-10-06 at 10 11 31

I'd suggest, we change the output to yaml, this way the report is easier to read for the human eye :)

import yaml
...
return yaml.dump(self._raw_object, width=1000, ident=4,sort_keys=False)

# Explanation:
# *width* needs to be set, as yaml otherwise inserts linebreaks after 80 characters which messes up the description and the urls
# *sort_keys* is True by default, which moves the description to the top and the links to the middle of the report

Screenshot 2022-10-06 at 11 02 10

What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are the BOSS!!! Super idea!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, then once this is changed, we can merge :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

secscanner2junit/container_scanning.py Show resolved Hide resolved
@angrymeir
Copy link
Owner

Btw: You basically solved #11 with this PR

Only thing thats missing is versioning...So to decide whether we want to support multiple report versions or only the latest. And if so, a mechanism to check for breaking changes in the report formats ^^ (But thats a story for another day)

@marwin1991
Copy link
Collaborator Author

Btw: You basically solved #11 with this PR

Only thing thats missing is versioning...So to decide whether we want to support multiple report versions or only the latest. And if so, a mechanism to check for breaking changes in the report formats ^^ (But thats a story for another day)

Lastly I was reading about overenginnering and maybe we are to early in development process to define such hard to implement system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sast failes for gl-container-scanning-report.json
2 participants