-
Notifications
You must be signed in to change notification settings - Fork 8
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
Solving issues #5 and #6 #8
Conversation
poetry_audit_plugin/command.py
Outdated
ignored_vulns = 0 | ||
for vulner in vulnerabilities: | ||
if self.option("ignore-package"): | ||
ignored_packages = self.option("ignore-package").split(',') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls avoid re-evaluating this on each iteration.
poetry_audit_plugin/command.py
Outdated
@@ -131,6 +141,39 @@ def get_json_report(self, vulnerabilities: List[Vulnerability]) -> str: | |||
} | |||
return json.dumps(json_report_dict, indent=2) | |||
|
|||
def get_suppressions(self): | |||
ignored_packages, codes = None, None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do they charge per keystroke? :)
poetry_audit_plugin/command.py
Outdated
ignored_vulns = 0 | ||
ignored_packages, codes = self.get_suppressions() | ||
for vulner in vulnerabilities: | ||
if self.option("ignore-package"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to a boolean flag
poetry_audit_plugin/command.py
Outdated
if vulner.name in ignored_packages: | ||
ignored_vulns += 1 | ||
continue | ||
if self.option("ignore-code"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, parse options at the beginning
tests/test_main.py
Outdated
|
||
assert dev_vulnerability in vulnerabilitie_names | ||
assert "ansible-tower-cli" not in vulnerabilitie_names | ||
assert result.returncode == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add the EOL
@Franco0700 |
@dgutson |
Also I added a message where it says the amount of ignored vulnerabilities.