RepositoryBitBakeDEGermany
priv-kweihmann

priv-kweihmann/meta-sca

Layer for static code analysis and security hardening

110stars
39forks
46issues
1views

meta-sca

https://img.shields.io/badge/Supported%20languages-C%2CC%2B%2B%2CGo%2CPython%2CShell%%2Cperl-informational

Nightly Latest commit

For the list of current findings from pipelines see meta-sca report

Important note

As announced by this discussion at the end of April 2022 this layer will undergo a major change in support.

Support will be given only for master branch

What can I do when I'm affected by the changes

A maintainers guide can be found here. Feel free to raise pull requests against not officially supported branches.

Support for these branches, including quality control, has to be done fully by the community

Table of content

Purpose

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.

Getting started

For a quick start how to use this layer see getting started guide

You can also watch the following talk

Watch the video

I gave for YS2023.11 to get started.

Installation

To install clone the needed branch(es) to any path on your local system.

Prerequisites

  • You need the current standard poky-layer installed onto your local build environment.

Use of containers

It is recommended to use privkweihmann/yocto-sca-minimal:2004 docker container for building, which has all necessary requirements already installed.

Use in CI

When you're planing to use meta-sca in your CI/CD, it is advised to use the minified layer meta-sca-minified to save you from cloning this fairly large repository.

NOTE meta-sca-minified only offer releases of this layer for releases made after 03/2020

Setup

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"

Kas

Alternatively you can use kas to setup the workspace. Use conf/kas/scatest-qemux86-64.yaml from this layer

Web monitor

If you're not quite convinced what this layer can do for you, have a look at the web monitor, where all findings from the layer CI pipelines are publically available.

Support

Actively maintained branch is currently only master. Unmaintained branches will only receive package updates on demand. Support for unmaintained branches has to be done by the community.

Status of the branches is described at SECURITY.md.

It's advised to use the tagged source versions in productive environment.

Releases

See SECURITY.md for details

Compatibility

If there is a technical issue that might break backward compatibility it will be mentioned in release note of the corresponding milestone release.

Licensing

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

Zero impact

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.

Available tools

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.

Overview of tools

ModuleDescriptionHomepageRequiresRequires inetRun on imageRun on recipeAvailable in SDKCC++PythonShellJavascriptPHPGoRustImagesLUASpellingMetricsBinariesPackagesOther formatsSecurity scopeFunctional scopeStyle scope
banditScan python code for insecuritieshttps://github.com/PyCQA/banditxxxxx
bashateShell script linterhttp://docs.openstack.org/developer/bashate/xxxxxx
bitbakeBitbake issue handlingxxxxx
cargodenyRust dependency linterhttps://github.com/EmbarkStudios/cargo-denyxxxxxx
cbmcC Bounded Model Checkerhttps://github.com/diffblue/cbmc/xxxx
checkbashismsShell script linterhttps://manpages.debian.org/jessie/devscripts/checkbashisms.1.en.htmlxxxxxx
clippylints to catch common mistakes in Rusthttps://github.com/rust-lang/rust-clippyxxxxxxx
cmakeGet cmake errors and warningsxxxx
cppcheckC/C++ linterhttps://github.com/danmar/cppcheckxxxxxxx
cpplintC/C++ linterhttps://github.com/cpplint/cpplintxxxxxxx
darglintPython docstring linterhttps://github.com/terrencepreilly/darglintxxxx
dennisI18N linterhttps://github.com/willkg/dennis/xxxxx
detectsecretsDetect hardcoded secrets in codehttps://github.com/Yelp/detect-secretsxxxxxx
flake8Python linterhttp://flake8.pycqa.org/en/latest/xxxxxx
flawfinderC/C++ security linterhttps://github.com/david-a-wheeler/flawfinderxxxxx
flintC/C++ linterhttps://github.com/JossWhittle/FlintPlusPlusxxxxx
gccGCC compiler issues and hardeningxxxxx
golintGO linterhttps://github.com/golang/lintxxxx
jsonlintJSON file linterxxxxx
kconfighardKernel config hardening checkerhttps://github.com/a13xp0p0v/kconfig-hardened-checkxxxx
licensecheckScan code for license informationhttps://github.com/boyter/lcxxx
looongFind functions with too long arglistshttps://github.com/anapaulagomes/looongxxxx
msgcheckI18n linterhttps://github.com/codingjoe/msgcheckxxxx
multimetricCoding metricshttps://github.com/priv-kweihmann/multimetricmanual enablexxxxxxxxxxxx
mypyPython linterhttps://github.com/python/mypyxxxxx
oelintBitbake recipe linterhttps://github.com/priv-kweihmann/oelint-advxxxx
perlPerl warnings checkxxxx
perlcriticPerl linterhttps://metacpan.org/pod/perlcriticxxxx
pkgqaencEnhanced package QAxxx
pscanFind insecure printfshttp://deployingradius.com/pscan/xxxx
pylintPython linterhttps://github.com/PyCQA/pylintxxxxxx
pysymcheckCheck binaries for forbidden function usagehttps://github.com/priv-kweihmann/pysymbolcheckxxx
ratsCheck on insecurities in several languageshttps://github.com/redNixon/ratsxxxxxxx
reuseScan code for license informationhttps://github.com/fsfe/reuse-toolxxx
reviveGO linterhttps://github.com/mgechev/revivexxxxx
ruffExtremely fast python linterhttps://github.com/astral-sh/ruffxxxxx
scancodeScan code for license informationhttps://github.com/nexB/scancode-toolkitxxx
setuptoolslintLint python-setup.pyhttps://github.com/johnnoone/setuptools-pylintxxxx
shellcheckShell script linterhttps://github.com/koalaman/shellcheckxxxxxx
slickShell script linterhttps://github.com/mcandre/slickxxxxx
sparseC linterhttps://sparse.wiki.kernel.org/index.php/Main_Pagexxxx
stankShell script linterhttps://github.com/mcandre/stankxxxxxx
systemdlintSystemd unit linterhttps://github.com/priv-kweihmann/systemdlintxxxxxxx
tlvFind duplicate codehttps://github.com/priv-kweihmann/tlvmanual enablexxxxxxxxxxx
tscancodeC and lua linterhttps://github.com/Tencent/TscanCodexxxx
vultureFind dead python codehttps://github.com/jendrikseipp/vulturexxxxx
xmllintXML linterhttp://xmlsoft.org/xmllint.htmlxxxxx
yamllintYAML linterhttps://github.com/adrienverge/yamllintxxxxx

each tool does have it's own benefits and flaws so don't be mad if you have 10k+ findings on the initial run.

Further documentation

Contributing

Please see the detailed contribution guideline for details

Get involved

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

Security Policy

For the project's security policy please see here

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

212.4k
Dec 2, 2026
RepositoryPython
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

192.6k
Nov 27, 2026
RepositoryBitBake
balena-os/meta-balena

A collection of Yocto layers used to build balenaOS images

989
Dec 2, 2026
RepositoryBitBake
meta-flutter/meta-flutter

Yocto/OpenEmbedded layer for Flutter on embedded Linux. Builds the Flutter SDK, engine and Dart SDK from source, four embedders (ivi-homescreen, flutter-auto, flutter-pi, flutter-elinux) and application recipes. Branches for master, wrynose, scarthgap, kirkstone and dunfell.

209
Nov 25, 2026
RepositoryBitBake
kraj/meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project

199
Oct 28, 2026
RepositoryBitBake
sony/meta-flutter

Yocto recipes for Flutter Engine and custom embedders

108
Dec 19, 2024
RepositoryBitBake
meta-erlang/meta-erlang

Erlang and Elixir support, https://meta-erlang.github.io/

62
Nov 15, 2026
RepositoryC
semgrep/semgrep

Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.

18.1k
Dec 1, 2026