Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This package converts a CMSIS SVD (System View Description) file into a more friendly JSon format than raw XML to JSon conversion. The aim of this package is to ease code generation from SVD file. We state that JSon format is the best suitable for this purpose. For instance, it can be used as-is in Jinja2 template processing.
The resulting JSon root
node is the device
node in SVD.
XML values are converted to equivalent JSon ones.
NOTE: Some SVD files might be inconsistent in peripherals and/or registers naming convention across devices or in a single SVD file. E.g. only few registers are prefixed by peripheral name but no others, you can optionally trim this prefix in order to keep code generation as simple as possible and reusable among a wide range of devices/mcu. !!ADD REF!!
An Additional interrupts
is added in the resulting JSon which collects all interrupts declared across all peripherals. This can ease, for instance, VTOR
table generation, one only has to walk through this array.
This package exports the following script:
$ svd2json --help
usage: svd2json [-h] -s SVD output
convert svd file to json
positional arguments:
output output filename
options:
-h, --help show this help message and exit
-s SVD, --svd SVD SVD file to convert
This package follows PEP517/518/621 for its build system using a single pyproject.toml
file and setuptools
with dynamic versioning as build-backend. Unit testing, linting etc. are done with tox
.
The minimal python version is Python 3.10.
One can use any python build front-end. E.g. with PyPA build
front-end :
python -m build
This package is linted by black
and flake8
. In case of conflict between those two linter, we choose to follow black
rules by default as it is closer to PEP8
than flake8
.
tox -e lint
Type checking is done with mypy with a python 3.10+ syntax.
tox -e type
Package license(s) can be checked using reuse.
tox -e licenses
Documentation is generated using Sphinx
and using
the numpy style for pythondoc with napoleon extension.
tox -e docs
Package Unit tests are based on pytest
with coverage support.
tox -e unittests
tox -e htmlcov
Licensed under Apache-2.0
see LICENSE file
FAQs
Convert SVD file to json
We found that svd2json demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.