
•Static code analysis is a method of debugging by examining source code before a program is run. It’s done by analyzing a set of code against a set (or multiple sets) of coding rules.
•This type of analysis addresses weaknesses in source code that might lead to vulnerabilities.
•Static analysis is commonly used to comply with coding guidelines — such as MISRA. And it’s often used for complying with industry standards — such as ISO 26262.
•Static code analysis is a method of debugging by examining source code before a program is run. It’s done by analyzing a set of code against a set (or multiple sets) of coding rules.
•This type of analysis addresses weaknesses in source code that might lead to vulnerabilities.
•Static analysis is commonly used to comply with coding guidelines — such as MISRA. And it’s often used for complying with industry standards — such as ISO 26262.
•Sonar cloud/ Sonar qube
•Perforce Klocwork
•Codesonar
•Coverity
•Fortify etc
Configure Azure DevOps to run sonar cloud analysis by selecting the service endpoint and run analysis method, storing project key, name, and version in sonar-project.properties.
Create a SonarCloud service connection in Azure DevOps by selecting your project, choosing SonarCloud, entering the token from SonarCloud security, and saving the connection for YAML pipelines.
Configure sonar project properties and prepare analysis to integrate SonarCloud with Azure DevOps for C language projects, using standalone scanner, project key and project name from SonarCloud.io, and source folders.
Learn to locate the SonarCloud organization and feed the organization attribute into Azure Pipelines, using GUI dropdowns or YAML configuration for accurate project analysis.
Integrate sonar cloud with azure devops by completing the final steps, including prepared analysis, running code analysis, and publishing quality gate results.
Create an organization in SonarCloud using your Azure DevOps organization name and a code read and write personal access token, paste it, and continue to import details.
Learn how to create a quality profile in extended mode, comparing copying and extending; extending forms a parent-child relationship where the child inherits and reflects parent rules.
Identify bugs, code smells, vulnerabilities, and security hotspots within the quality gate framework, and learn how unit test coverage and clean coding reduce technical debt.
Customize quality gates in sonar cloud by copying or editing the default sonar way, adjusting metrics like coverage, duplicated lines, reliability rating, and new versus overall code checks.
Quality gates define failure conditions on analysis results, with separate rules for new code and overall code, guiding whether a pull request can merge or code can be released today.
Explore how sonar cloud analyzes delta changes in pull requests and auto comments via a static code analyzer plugin, decorating the pull request with code smells and vulnerabilities.
Understand continued limitations of sonar cloud integration, including C language prerequisites, limited compiler support, required build wrappers, and language-specific properties for Java and JavaScript.
Overcome challenges in sonar cloud integration with azure devops by using a build wrapper for c/c++ projects, solving scanning issues, and addressing local build agent licensing and line limits.
Troubleshoot errors adding new code by running sonar cloud analysis in an Azure DevOps workflow, including cleaning, building, and retrying the sonar scanner after failures.
Learn to create a personal access token in Azure DevOps by going to your organization, selecting new token, configuring a custom scope for pull request decoration, and saving the token.
Enable build validation with a sonar cloud quality gate as a status check on develop to auto analyze pull requests. Configure optional or mandatory auto comments in Azure DevOps.
Automate static code analysis with Sonar Cloud integrated into Azure DevOps to enforce coding standards, catch bugs early, and unify embedded C DevOps practices across teams.
In this course, we are going to see how to integrate Sonar cloud analysis tool in MS Azure pipelines for Embedded C.
To integrate sonar build wrapper is used and a small power shell script written to download this build wrapper.
Creating IAR Compiler batch files for making build with sonar cloud scanner.
YAML file creation for Build pipeline with detailed sonar cloud configuration steps.
Local Build agent is created and used for build pipelines. (Not a hosted agent)
Understanding and analyzing sonar cloud reports.
How to create a quality profiles?
How to create quality gates?
Walk through on Administration and settings.
Pull request decoration for auto comment in Pull request (in your Build pipeline).
Terminology understanding including code smells, Vulnerabilities , static code analysis (SCA) , build pipeline etc.
Focused more on version controlling of complete CI integration.
Will walkthrough on different SCA tools available and what need to be considered when we choose a SCA tool.
Will discuss on Challenges faced , limitations of these tools and lessons learnt.
Difference between sonar cloud and sonarqube.
Work flow on the sonar cloud integration with Azure DevOps services.
Shift left testing and SCA advantages.
Will walkthrough on the sonar cloud creating project manually and scanning the project manually.
sonarcloud website walkthrough