Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
yaml-lint-to-junit-xml
Advanced tools
Convert yaml-lint outputs to a jUnit valid xml tests result file.
Thanks to the author of the original project ansible-lint-to-junit-xml
Install ansible-lint-to-junit-xml
with pip:
pip install yaml-lint-to-junit-xml
Or you can simply get this repo and install with setup.py
Run yamllint
on the desired files and pipe to yaml-lint-to-junit-xml
yamllint -f parsable <file or directly> | yaml-lint-to-junit-xml > results/yaml-lint-results.xml
Alternatively you can run yamllint
separately from yaml-lint-to-junit-xml
and use a file to pass the output
yamllint -f parsable <file or directly> > yaml-lint-results.txt
yaml-lint-to-junit-xml yaml-lint-results.txt > results/yaml-lint-results.xml
Note:
yamllint
must run with-f parsable
for the output to be machine parsable
yamllint
callRunning yamllint
on a file results in:
roles/test_role/defaults/main.yml:25:121: [warning] line too long (157 > 120 characters) (line-length)
roles/test_role/tasks/main.yml:33:35: [error] no new line character at the end of file (new-line-at-end-of-file)
test_playbook.yml:4:8: [warning] truthy value should be one of [False, True, false, true] (truthy)
Running yamllint
and piping the output to yaml-lint-to-junit-xml
looks line this:
yamllint -f parsable test_playbook.yml | yaml-lint-to-junit-xml
Would result in:
<?xml version="1.0" ?>
<testsuite errors="1" name="yaml-lint" tests="1">
<testcase name="truthy value should be one of [False, True, false, true] (truthy)">
<failure message="test_playbook.yml:4:8: [warning] truthy value should be one of [False, True, false, true] (truthy)" type="yaml-lint">
yaml-lint exception type: warning
yaml-lint exception description: truthy value should be one of [False, True, false, true] (truthy)
filename: test_playbook.yml
line nr: 4:8
</failure>
</testcase>
</testsuite>
FAQs
Convert yaml-lint outputs to a jUnit valid xml tests result file
We found that yaml-lint-to-junit-xml 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.