-
Notifications
You must be signed in to change notification settings - Fork 644
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
Fix: openvasd doesn't support empty passphrase for usk crendential #1839
base: main
Are you sure you want to change the base?
Conversation
51ba24e
to
0337577
Compare
SC-1233 With an empty password the scan is stored but when the start command is sent, I got the following: `2025-02-11T15:15:21.349117Z WARN openvasd::controller::results: results sync failed e=storage error occurred: serialization error` If the password field is not sent at all, the scan is even not stored, with the following response: `{"line":1,"column":799,"message":"missing field password at line 1 column 799"}`
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files |
0337577
to
3ee7635
Compare
🔍 Vulnerabilities of
|
digest | sha256:b0a1e2ebbcd70a5253ee2535168871272409b6dfb3db517532ed4e7db9d129e5 |
vulnerabilities | |
size | 121 MB |
packages | 261 |
📦 Base Image debian:stable-20250203-slim
also known as |
|
digest | sha256:c8cc60b4f108a3ea5916800b4574c192aad906a1f37e0f590847e3d6f81076aa |
vulnerabilities |
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
|
// A key without passphrase can be expected | ||
#[cfg_attr( | ||
feature = "serde_support", | ||
serde(default, flatten, skip_serializing_if = "Option::is_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.
why do you need flatten?
@@ -419,7 +419,10 @@ where | |||
)); | |||
credential_preferences.push(format!( | |||
"{OID_SSH_AUTH}:2:password:SSH key passphrase:|||{}", | |||
password | |||
match password { |
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.
why not use .unwrap_or_default()
?
write_str_element( | ||
writer, | ||
"password", | ||
match password { |
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.
why not use .unwrap_or_default()?/
credentials.push(("password".to_string(), password)); | ||
credentials.push(( | ||
"password".to_string(), | ||
match password { |
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.
why not use .unwrap_or_default()?
What:
Fix openvasd doesn't support empty passphrase for usk crendential
SC-1233
Close #1831
Why:
With an empty password the scan is stored but when the start command is sent, I got the following:
2025-02-11T15:15:21.349117Z WARN openvasd::controller::results: results sync failed e=storage error occurred: serialization error
If the password field is not sent at all, the scan is even not stored, with the following response:
{"line":1,"column":799,"message":"missing field password at line 1 column 799"}
How:
Checklist: