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

Extend script_xref logging on unexpected data / input. #374

Merged
merged 2 commits into from
Jan 25, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Improve logging for unsatisfied vts dependencies. [#336](https://github.com/greenbone/ospd-openvas/pull/336)
- Do not use busy wait when waiting for the openvas scan process to finish. [#360](https://github.com/greenbone/ospd-openvas/pull/360)
- Improve logging for unexpected data in script_xref tags. [#374](https://github.com/greenbone/ospd-openvas/pull/374)

### Fixed
- Fix nvticache name when for stable version from sources. [#317](https://github.com/greenbone/ospd-openvas/pull/317)
Expand Down
5 changes: 3 additions & 2 deletions ospd_openvas/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,12 @@ def get_refs_vt_as_xml_str(vt_id: str, vt_refs: Dict) -> str:
for xref in value.split(', '):
try:
_type, _id = xref.split(':', 1)
except ValueError:
except ValueError as e:
logger.error(
'Not possible to parse xref %s for VT %s',
'Not possible to parse xref "%s" for VT %s: %s',
xref,
vt_id,
e,
)
continue
vt_ref.set('type', _type.lower())
Expand Down