
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A Python library for converting OpenVAS XML scan reports to structured JSON format. This parser filters results to only include entries with CVE identifiers, making it easier to process and analyze vulnerability data.
lxml
librarypip install openvas-xml-parser
from openvas_parser import convert_openvas_xml_to_json
# Convert OpenVAS XML to JSON
convert_openvas_xml_to_json("scan_report.xml", "output.json")
# Convert a single file
openvas-parser scan_report.xml output.json
# Convert multiple files
for file in *.xml; do
openvas-parser "$file" "${file%.xml}.json"
done
The parser extracts the following information for each vulnerability:
{
"report": {
"results": {
"result": [
{
"result_id": "result-id",
"result_name": "Vulnerability Name",
"host": {"ip": "192.168.1.1"},
"port": "80",
"threat": "High",
"severity": "8.5",
"cve": "CVE-2021-44228",
"additional_cves": ["CVE-2021-45046"],
"description": "Vulnerability description",
"nvt": {
"name": "NVT Name",
"description": "Detailed description",
"solution": {"text": "Remediation steps"},
"refs": {"ref": [{"type": "cve", "id": "CVE-2021-44228"}]}
}
}
]
}
}
}
convert_openvas_xml_to_json(xml_path, json_path)
Convert an OpenVAS XML report to JSON format.
Parameters:
xml_path
(str): Path to the OpenVAS XML filejson_path
(str): Path where the JSON output will be savedReturns:
str
: Path to the generated JSON fileRaises:
FileNotFoundError
: If the XML file doesn't existET.ParseError
: If the XML file is malformedfrom openvas_parser import convert_openvas_xml_to_json
try:
result = convert_openvas_xml_to_json("scan.xml", "output.json")
print(f"Conversion successful: {result}")
except Exception as e:
print(f"Conversion failed: {e}")
import os
from openvas_parser import convert_openvas_xml_to_json
xml_files = [f for f in os.listdir(".") if f.endswith(".xml")]
for xml_file in xml_files:
json_file = xml_file.replace(".xml", ".json")
try:
convert_openvas_xml_to_json(xml_file, json_file)
print(f"Converted {xml_file} to {json_file}")
except Exception as e:
print(f"Failed to convert {xml_file}: {e}")
git clone https://github.com/yourusername/openvas-xml-parser.git
cd openvas-xml-parser
pip install -e .
python -m pytest tests/
python setup.py sdist bdist_wheel
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Convert OpenVAS XML reports to structured JSON format
We found that openvas-xml-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.