This is the release branch for YOCTO sumo.
As this layer ran out of support by YOCTO, don't expect regular updates here as well.
Basically there will be package updates from time to time, but without a fixed release cycle.
You can also contribute package updates by pull request.
For very old releases of YOCTO there will be only a limited subset of tools available.
See the badge at the top of the README for details.
- Notice
- Differences to releases starting with
thud - Purpose
- Getting started
- Installation
- Support
- Licensing
- Zero impact
- Available tools
- Further documentation
- Contributing
Purpose of this layer is to provide a proper set of static analysis tools for your YOCTO build. All provided tools can be easily configured and integrated into any CI service (like e.g. Jenkins).
All results are stored to SCA_EXPORT_DIR (which defaults to ${DEPLOY_DIR_IMAGE}/sca). The results will be stored in the raw-format of the corresponding tool and in checkstyle-format.
For a quick start how to use this layer see getting started guide
To install clone the needed brach(es) to any path on your local system.
- You need the
sumostandard poky-layer installed onto your local build environment. - You need at least python 3.4 needs to be installed on your build host.
- You need glib-2.0-dev installed on your build host (used for e.g. configcheck, lynis, tiger, upc)
It is recommended to use privkweihmann/yocto-sca-minimal:krogoth docker container for building, which has all necessary requirements already installed.
In your bblayers.conf-file add the following line
BBLAYERS += "<full path to sca-layer>/meta-sca"or with poky layer already setup run in shell
bitbake-layers add-layer "<full path to sca-layer>/meta-sca"Actively maintained branches will receive feature and package updates according to the release cycle. Unmaintained branches will only receive package updates on demand.
Status of the branches is described at SECURITY.md.
It's advised to use the tagged source versions in productive environment.
You can expect a new tagged build every 4-6 weeks for every actively maintained branch. Planning is done by milestone features on GitHub.
See SECURITY.md for details
If there is a technical issue that might break backward compatibility it will be mentioned in release note of the corresponding milestone release.
This layer does only provide open source tools. The layer itself is licensed under BSD.
If individual files are licensed under different terms, terms and conditions can be found in the individual file header
This layer provides only -native tools, so actually none of the build binaries will be deployed to your target. Everything happens on the build machine.
There are some excludes to this rule (e.g. lynis) as they need to be cross-compiled to make use of them, nevertheless none of these tools will be installed automatically to your build.
The layer can check on a recipe-level or on an image-level.
- On image-level the whole root-filesystem could be taken into account, which in most cases can't be granted on a recipe-level.
- On the other hand some static code analysis does not make any sense on an image-level - so this layer does have different tools for both level available.
| Module | Description | Homepage | Requires | Requires inet | Run on image | Run on recipe | C | C++ | Python | Shell | Javascript | PHP | Go | Images | LUA | Spelling | Metrics | Binaries | Packages | Other formats | Security scope | Functional scope | Style scope |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bandit | Scan python code for insecurities | https://github.com/PyCQA/bandit | x | x | x | x | |||||||||||||||||
| bashate | Shell script linter | http://docs.openstack.org/developer/bashate/ | x | x | x | x | x | ||||||||||||||||
| bitbake | Bitbake issue handling | x | x | x | x | x | |||||||||||||||||
| checkbashisms | Shell script linter | https://manpages.debian.org/jessie/devscripts/checkbashisms.1.en.html | x | x | x | x | x | ||||||||||||||||
| configcheck | Check application configurations | x | x | x | |||||||||||||||||||
| cppcheck | C/C++ linter | https://github.com/danmar/cppcheck | x | x | x | x | x | x | |||||||||||||||
| cpplint | C/C++ linter | https://github.com/cpplint/cpplint | x | x | x | x | x | x | |||||||||||||||
| darglint | Python docstring linter | https://github.com/terrencepreilly/darglint | x | x | x | ||||||||||||||||||
| dennis | I18N linter | https://github.com/willkg/dennis/ | x | x | x | x | |||||||||||||||||
| detectsecrets | Detect hardcoded secrets in code | https://github.com/Yelp/detect-secrets | x | x | x | x | x | ||||||||||||||||
| flake8 | Python linter | http://flake8.pycqa.org/en/latest/ | x | x | x | x | x | ||||||||||||||||
| flawfinder | C/C++ security linter | https://github.com/david-a-wheeler/flawfinder | x | x | x | x | |||||||||||||||||
| flint | C/C++ linter | https://github.com/JossWhittle/FlintPlusPlus | x | x | x | x | |||||||||||||||||
| gcc | GCC compiler issues and hardening | x | x | x | x | x | |||||||||||||||||
| gixy | NGINX config security linter | https://github.com/yandex/gixy | x | x | x | ||||||||||||||||||
| image-summary | Aggregate all findings for package in an image | x | x | x | x | x | |||||||||||||||||
| jsonlint | JSON file linter | x | x | x | x | ||||||||||||||||||
| kconfighard | Kernel config hardening checker | https://github.com/a13xp0p0v/kconfig-hardened-check | x | x | x | ||||||||||||||||||
| looong | Find functions with too long arglists | https://github.com/anapaulagomes/looong | x | x | x | ||||||||||||||||||
| lynis | Auditing tool for images | https://github.com/CISOfy/lynis | x | x | x | ||||||||||||||||||
| msgcheck | I18n linter | https://github.com/codingjoe/msgcheck | x | x | x | ||||||||||||||||||
| multimetric | Coding metrics | https://github.com/priv-kweihmann/multimetric | x | x | x | x | x | x | x | x | x | x | x | ||||||||||
| mypy | Python linter | https://github.com/python/mypy | x | x | x | x | |||||||||||||||||
| nixauditor | Auditing tool for images | https://github.com/XalfiE/Nix-Auditor | x | x | x | ||||||||||||||||||
| oelint | Bitbake recipe linter | https://github.com/priv-kweihmann/oelint-adv | x | x | x | x | |||||||||||||||||
| perl | Perl warnings check | x | x | x | |||||||||||||||||||
| perlcritic | Perl linter | https://metacpan.org/pod/perlcritic | x | x | x | ||||||||||||||||||
| pscan | Find insecure printfs | http://deployingradius.com/pscan/ | x | x | x | ||||||||||||||||||
| pyfindinjection | Find SQL injections in python code | https://github.com/uber/py-find-injection | x | x | x | x | |||||||||||||||||
| pylint | Python linter | https://github.com/PyCQA/pylint | x | x | x | x | x | ||||||||||||||||
| pysymcheck | Check binaries for forbidden function usage | https://github.com/priv-kweihmann/pysymbolcheck | x | x | x | ||||||||||||||||||
| pytype | Python linter using type-annotations | https://github.com/google/pytype | x | x | x | x | |||||||||||||||||
| rats | Check on insecurities in several languages | https://github.com/redNixon/rats | x | x | x | x | x | x | |||||||||||||||
| ropgadget | Determine ROP exploitability in binaries | https://github.com/JonathanSalwan/ROPgadget | x | x | x | ||||||||||||||||||
| safety | Check for known vulnerabilities in python-packages | https://github.com/pyupio/safety | x | x | x | x | |||||||||||||||||
| setuptoolslint | Lint python-setup.py | https://github.com/johnnoone/setuptools-pylint | x | x | x | ||||||||||||||||||
| sparse | C linter | https://sparse.wiki.kernel.org/index.php/Main_Page | x | x | x | ||||||||||||||||||
| splint | C linter | https://github.com/splintchecker/splint | x | x | x | x | x | ||||||||||||||||
| systemdlint | Systemd unit linter | https://github.com/priv-kweihmann/systemdlint | x | x | x | x | x | ||||||||||||||||
| tiger | security audit and intrusion detection tool | http://www.nongnu.org/tiger/ | x | x | x | ||||||||||||||||||
| tlv | Find duplicate code | https://github.com/priv-kweihmann/tlv | manual enable | x | x | x | x | x | x | x | x | x | x | ||||||||||
| tscancode | C and lua linter | https://github.com/Tencent/TscanCode | x | x | x | ||||||||||||||||||
| upc | check for simple privilege escalation vectors | https://github.com/pentestmonkey/unix-privesc-check | x | x | x | ||||||||||||||||||
| vulture | Find dead python code | https://github.com/jendrikseipp/vulture | x | x | x | x | |||||||||||||||||
| xmllint | XML linter | http://xmlsoft.org/xmllint.html | x | x | x | x | |||||||||||||||||
| yamllint | YAML linter | https://github.com/adrienverge/yamllint | x | x | x | x | |||||||||||||||||
| yara | Find suspicious pattern in binaries | https://github.com/VirusTotal/yara | x | x | x | ||||||||||||||||||
| zrd | I18N/G18N linter | https://github.com/0Cubed/ZeroResourceDetector | x | x | x |
each tool does have it's own benefits and flaws so don't be mad if you have 10k+ findings on the initial run.
- Global Configuration
- Blacklisting sources
- Configuration wizard
- Custom severity
- Enable SCA locally/globally
- Fatal findings
- Filter findings
- Filter out files to check
- Output formats
- Suppress findings
- Tools
- bandit
- bashate
- bitbake
- checkbashism
- configcheck
- cppcheck
- cpplint
- darglint
- dennis
- detectsecrets
- flake8
- flawfinder
- flint++
- gcc
- gixy
- jsonlint
- kconfighard
- looong
- lynis
- msgcheck
- multimetric
- mypy
- nixauditor
- oelint
- perl
- perlcritic
- pscan
- pyfindinjection
- pylint
- pysymcheck
- pytype
- rats
- ropgadget
- safety
- setuptoolslint
- sparse
- splint
- systemdlint
- tiger
- tlv
- tscancode
- upc
- vulture
- xmllint
- yamllint
- yara
- zrd
- Extra modes
- Configuration Examples
- Results
- Build system integration
- Control via command-line
- Jenkins integration
- Application notes
- Case studies
Feel free to create pull-requests or create an issue if you think there is something wrong or missing.
To get involved following things can be done
- create an issue
- fix an issue and create a pull request
- see the pinned issues in the bugtracker
For the project's security policy please see here