-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add support for vulnerabilities with no fix #85
Conversation
242ab6d
to
1f2f529
Compare
Sometimes there is no (known) fix for a vulnerability. Before this fix the code would fail in those situations: ``` Fatal error: Uncaught TypeError: Typed property GitHubSecurityJira\SecurityAlertIssue::$safeVersion must be string, null used in /opt/ghsec-jira/src/SecurityAlertIssue.php:41 ```
@@ -91,10 +98,13 @@ public function __construct(array $data) | |||
*/ | |||
public function uniqueId(): string | |||
{ | |||
// If there is no safe version we use the GHSA ID as identifier. | |||
$identifier = $this->safeVersion ?? $this->id; |
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.
This means that if a fix becomes available, it'll create a new ticket. Which is good, but shouldn't this side effect be mentioned in a comment?
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.
Good idea: #89.
Sometimes there is no (known) fix for a vulnerability.
Before this fix the code would fail in those situations: