
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Pytest implementation of Common Test Report Format (CTRF) for test results.
Test report will be generated in JSON format.
Test report can be used to prettify the report in GitHub Actions with github-actions-ctrf.
Do not worry if report in GitHub does not appear immediately. It takes some time to process the report.
pip install pytest-json-ctrf
generate report.json file in the root directory of the project. File path is mandatory
pytest --ctrf report.json
More info here: https://ctrf.io/docs/schema/examples
{
"results": {
"tool": {
"name": "jest"
},
"summary": {
"tests": 3,
"passed": 1,
"failed": 1,
"pending": 0,
"skipped": 1,
"other": 0,
"start": 1706644023,
"stop": 1706644043
},
"tests": [
{
"name": "User should be able to login",
"status": "passed",
"duration": 1200
},
{
"name": "User profile information should be correct",
"status": "failed",
"duration": 800
},
{
"name": "User should be able to logout",
"status": "skipped",
"duration": 0
}
]
}
}
For future me and others who are interested in the technical details of the implementation.
The main idea is to handle xdist plugin because without it collecting report is quite straightforward.
By the example of putest-json-report plugin, I have learned that different plugins can be registered for the controller and workers node.
The pytest_runtest_logreport
hook in the controller node is used to collect the test results from all the nodes so other nodes can just add some details to the TestReport
object.
FAQs
Pytest plugin to generate json report in CTRF (Common Test Report Format)
We found that pytest-json-ctrf 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.