{"id":24569,"library":"secscanner2junit","title":"SecScanner2JUnit","description":"Command-line tool to convert security scanner output (e.g., Trivy, Grype, OWASP Dependency Check, GitLab SAST) into JUnit XML format, enabling integration with CI/CD pipelines. Current version 1.1.0, supports Python >=3.10, released irregularly.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/logchange/SecScanner2JUnit","tags":["security","junit","devops","ci-cd","converter"],"install":[{"cmd":"pip install secscanner2junit","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Converter is exposed at package level in version >=1.0.0","wrong":"from secscanner2junit.converter import Converter","symbol":"Converter","correct":"from secscanner2junit import Converter"}],"quickstart":{"code":"from secscanner2junit import Converter\nimport json\n\n# Example: convert Grype JSON to JUnit\nwith open('grype-report.json', 'r') as f:\n    vulns = json.load(f)\nconverter = Converter()\njunit_xml = converter.convert(vulns, scanner='grype')\nwith open('junit-result.xml', 'w') as f:\n    f.write(junit_xml)\nprint('Conversion complete')","lang":"python","description":"Basic usage: instantiate Converter and call convert() with the scanner JSON data and scanner name."},"warnings":[{"fix":"Update imports to `from secscanner2junit import Converter`.","message":"In version 1.0.0, the import path changed from `secscanner2junit.converter` to `secscanner2junit`. Code using the old import will break.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Read the file with `json.load()` or `json.loads()` before passing to `converter.convert()`.","message":"The `convert()` method expects raw JSON data (e.g., parsed dictionary), not a file path. Passing a file path will produce silent failures.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin your version to 1.1.0 if relying on this feature, and monitor for breaking changes.","message":"OWASP Dependency Check format conversion in v1.1.0 is experimental. The method signature may change in future releases.","severity":"deprecated","affected_versions":"1.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to: from secscanner2junit import Converter","cause":"Old import path 'from secscanner2junit.converter import Converter' no longer works after version 1.0.0.","error":"ModuleNotFoundError: No module named 'secscanner2junit.converter'"},{"fix":"Read the file: with open('report.json') as f: data = json.load(f); then call convert(data, scanner='...')","cause":"Passing a file path string to convert() instead of parsed JSON data.","error":"AttributeError: 'str' object has no attribute 'get'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}