https://github.com/naivesystems/analyze Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} naivesystems / analyze Public * Notifications * Fork 13 * Star 73 NaiveSystems Analyze is a static analysis tool for code security and compliance. License GPL-3.0 license 73 stars 13 forks Activity Star Notifications * Code * Issues 0 * Pull requests 1 * Discussions * Actions * Wiki * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Wiki * Security * Insights naivesystems/analyze This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 3 branches 1 tag Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/n] Use Git or checkout with SVN using the web URL. [gh repo clone naives] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit Git stats * 43 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github analyzer atomic autosar cpumem cruleslib googlecpp libtooling_includes misra misra_c_2012_crules misra_cpp_2008 out/bin podman_image rulesets scripts third_party toy_rules ubuntu2004 ubuntu2204 .bazelignore .bazelrc .gitignore LICENSE Makefile README.md README.zh-CN.md WORKSPACE go.mod View code [ ] NaiveSystems Analyze Coding Standards Getting Started Using prebuilt container images Using GitHub Actions Building from source Join the Community License README.md Zhong Wen NaiveSystems Analyze NaiveSystems Analyze is a static analysis tool for code security and compliance. This repository holds the source code for the Community Edition which is free and open-source. Contact hello[AT] naivesystems.com to learn more about the Enterprise Edition. Coding Standards NaiveSystems Analyze Community Edition currently supports the following coding standards: * MISRA C:2012 third edition a.k.a. MISRA C:2019 * MISRA C++:2008 * AUTOSAR C++14 * Google C++ Style Guide The Enterprise Edition supports (a) more recent versions of the above coding standards, (b) other C/C++ coding standards including more security-oriented rules from CERT and CWE, and (c) many other programming languages. Refer to our demo repositories (e.g. analyze-demo and googlecpp-demo) to see how to specify and configure the various coding standards and their rules. Getting Started You may choose to use the prebuilt container images, GitHub Actions, or build directly from the source code. Using prebuilt container images For projects using Makefiles, run the commands below in your project root: mkdir -p output podman run --rm \ -v $PWD:/src:O \ -v $PWD/.naivesystems:/config:Z \ -v $PWD/output:/output:Z \ ghcr.io/naivesystems/analyze:master \ /opt/naivesystems/misra_analyzer -show_results A few notes: * You may use docker instead of podman here. + Read the wiki to learn more about how to run on Windows and macOS. + Running on Linux with podman is the only officially supported way in the Community Edition. * You must configure the rules in .naivesystems/check_rules. + Refer to analyze-demo for an example. + Most (if not all) supported rules are listed in rulesets/ *.check_rules.txt in this repository. * You may remove :Z if you are not using SELinux. * Replace 2023.3.0.0 with the actual version that you want to use. NaiveSystems Analyze can trace and capture your build process automatically. Currently we only publish Fedora-based images in the Community Edition, so your code must compile successfully under Fedora Linux in order to use the prebuilt container images. For other operating systems such as Debian, Ubuntu, CentOS, or RHEL, please reach out to us to get the Enterprise Edition. The analysis results are also available in the output directory. You may use our VS Code Extension to view the results in Visual Studio Code. In addition to Makefiles, we support many other project types. See also: * How to analyze CMake projects * How to analyze Keil MDK projects Using GitHub Actions NaiveSystems Analyze supports running directly in GitHub Actions. For example, googlecpp-action is our officially published action for checking the Google C++ Style Guide. Refer to googlecpp-demo for more information. Building from source To build from source, follow the steps below on Fedora 36 or 37. Other versions may also work but are not officially supported in the Community Edition. 1. Install build dependencies dnf install -y autoconf automake clang cmake libtool lld make python3-devel wget which xz zip 2. Install Go 1.18 or later by following the official instructions. 3. Install Bazel 6.0 or later by following the official instructions . 4. Build the project make 5. Build a container image make -C podman_image build-en This will build an image named naive.systems/analyzer/misra:dev_en for MISRA C:2012. You may specify other targets if needed. Read the code for more details. NaiveSystems Analyze can be built on a variety of Linux distros. For example, the Community Edition in this repository can be built in GitHub Actions with the official runner image of Ubuntu 22.04 LTS. For other operating systems such as Debian, Ubuntu 18.04/20.04 LTS, CentOS 7/8, or RHEL and its derivatives, please reach out to us to get the Enterprise Edition. Join the Community If you find a bug of NaiveSystems Analyze, feel free to report it in the issues. Use GitHub Discussions for other topics. If you use WeChat, you may scan the QR code below to join our group chat: 20231216103703 (The QR code is updated when it's expired or when the group exceeds 200 people.) License The Community Edition of NaiveSystems Analyze is licensed under the GNU General Public License version 3. Some subcomponents may have separate licenses. See their respective subdirectories in this repository for details. The Enterprise Edition is offered in separate licenses and terms. Contact us to learn more. About NaiveSystems Analyze is a static analysis tool for code security and compliance. Topics static-analysis cpp14 coding-standards cert cppcheck misra autosar code-scanning functional-safety iso26262 misra-c Resources Readme License GPL-3.0 license Activity Stars 73 stars Watchers 2 watching Forks 13 forks Report repository Releases 1 2023.3.3.0 Latest Nov 22, 2023 Packages 1 Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * You can't perform that action at this time.