Registry / devops / secscanner2junit

secscanner2junit

JSON →
library1.1.0pypypi✓ verified 79d ago

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.

pip install secscanner2junit
INSTALL
IMPORT
SIG · SECSCANNER2JUNIT
S
secscanner2junit
devopspythonv1.1.0
Install
3.0s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.0s · import 0.000s · 30MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ContainerScanningParser
from secscanner2junit import ContainerScanningParser
from secscanner2junit import Converter
MavenDependencyCheckParser
from secscanner2junit import MavenDependencyCheckParser
SastParser
from secscanner2junit import SastParser

Basic usage: instantiate Converter and call convert() with the scanner JSON data and scanner name.

from secscanner2junit import Converter import json # Example: convert Grype JSON to JUnit with open('grype-report.json', 'r') as f: vulns = json.load(f) converter = Converter() junit_xml = converter.convert(vulns, scanner='grype') with open('junit-result.xml', 'w') as f: f.write(junit_xml) print('Conversion complete')
secscanner2junit --version
Debug
Known issues
breakingIn version 1.0.0, the import path changed from `secscanner2junit.converter` to `secscanner2junit`. Code using the old import will break.
fix
Update imports to `from secscanner2junit import Converter`.
affects: >=1.0.0
gotchaThe `convert()` method expects raw JSON data (e.g., parsed dictionary), not a file path. Passing a file path will produce silent failures.
fix
Read the file with `json.load()` or `json.loads()` before passing to `converter.convert()`.
affects: all
deprecatedOWASP Dependency Check format conversion in v1.1.0 is experimental. The method signature may change in future releases.
fix
Pin your version to 1.1.0 if relying on this feature, and monitor for breaking changes.
affects: 1.1.0
Upgrade
Version history
1.1.0latest on PyPI · released Feb 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
secscanner2junit — pip install secscanner2junit · libregistry