Deployment Phase I - Deployment decisionsDeployment Phase I - Deployment decisionsPhase I focuses on making decisions about the Klocwork deployment. During this phase, several stages of planning are involved. You can use the Deployment Phase I worksheet to record your information. Stage 1: Identify key staffThe success of a Klocwork deployment project will be determined in large part by the staff leading the effort. While the use of Klocwork will lead to a long-term reduction in costs, the initial deployment effort requires a part-time commitment from the following people:
Klocwork Professional Services will help guide the specific requirements and will mentor these key staff members throughout the deployment phase. Stage 2: Identify pilot projectsTo limit the impact of any initial setup problems, it is recommended that Klocwork is piloted on one or a few smaller but representative projects to begin with. It may also be beneficial to keep these users within just one geographical location initially. Stage 3: Deployment typeAlthough there are no decisions for this stage of deployment, it is important to note where Klocwork fits and the terminology needed to move forward. The following diagram illustrates where Klocwork is used in the software development life cycle (SDLC):
![]() Klocwork is typically deployed into the SDLC using both the Developer desktop and Build analysis for proper usage. Below are the definitions:
Klocwork recommends deploying Klocwork at both the developer desktop and the integration build as this is the optimal deployment method and the most effective way to achieve maximum return on investment.
Deploying Developer Desktop and Build AnalysisThese should be separated. Start with integration build analysis.
The first step is to run an integration build analysis. You will integrate Klocwork into the build process at the desired interval. Now, Klocwork Static Code Analysis will be used for management or reporting. The second step is to set up the developer's desktop. This involves setting up the Klocwork plug-ins in the supported IDEs or using it on the command line. The key step here is that developer's will synchronize their environment with an integration build in step #1. As long as the build analysis is maintained and developers are fixing the issues at the desktop, no outstanding issues will be found after code check-in.
![]() Stage 4: Basic deployment structureIt is recommended that the ultimate structure of the Klocwork deployment is considered as early as possible in the process. You need to decide which Klocwork components will be installed and how the installation will be configured, including whether dedicated hardware is required. Many of the initial deployment questions, such as: Will this be a multi-site deployment, where are the users going to be based, where will the servers ideally be based, do you have a corporate FlexNet Publisher server and will you want to use this existing server to manage the Klocwork licenses, are relevant. Fundamentally, a deployment consists of:
Notes for installationFor installation, the minimum requirements can be found in the System requirements. In addition, special consideration should be taken for:
Additional hardware considerations for Large deployments If you are using parallel processing or multicore processing, then you should allocate a minimum of 2 GB of memory per processor/core. More than 2 GB may be required for very large analyses. Note that the size of a build and its RAM requirements depend not only on the lines of code, but also on the number and complexity of relationships in the code. Additionally, Klocwork has shown better performance with multiple core processors. This can significantly improve database performance. Stage 5: Additional large-scale decisionsConsider the following:
Stage 6: Choose build integration typeKlocwork analysis requires integration into an organization's existing build system. Integration builds are usually done through a build system (ant, make, etc.) or with an IDE (Visual Studio, CodeWarrior, etc). To ensure accurate Klocwork integration build analysis results, Klocwork requires a complete understanding of how the software is compiled and linked, in the form of a build specification. For details on build integration, see Creating a C/C++ build specification, Creating a Java build specification or Creating a C# build specification. With a build specification, the Klocwork build analysis can be executed. Klocwork build analysis can be distributed via support for parallel and distributed execution. See C/C++ integration build analysis - Cheat sheet for details. The method used will depend on the environment, build system and language. Stage 7: Choose issues/vulnerabilities to be detectedAt this stage, technical leads and managers must decide which issues and security vulnerabilities to enable. Large development environments with mature code bases may consider selecting only a handful of issues or vulnerabilities to begin their analysis, expanding the number of issues enabled on an iterative basis. You can even organize your own set of Klocwork checkers between analysis runs and make the new organizational structure immediately available for reporting. We call this organizational structure a taxonomy. You can also download additional taxonomies and checkers for many well known industry standards, such as MISRA, CERT, CWE, and DISA STIG. To use these checkers, you need to download them from https://developer.klocwork.com/support/downloads. See the readme file included with the download for details on enabling the MISRA checkers. A good place to begin is with Klocwork's default configuration, which can be expanded or reduced. This will allow your organization to focus its early detection efforts on the issues and vulnerabilities that are important to your organization. Many organizations will begin their analysis on issues such as memory leaks, buffer overflows and null pointer dereferences. Other organizations may be more concerned with security vulnerabilities and will focus on detecting issues specific to security. For example, if you are developing embedded software, you may consider enabling low memory condition rules. But if you are developing desktop client software, you may want to consider turning this off initially. Finally, some organizations may only concern themselves with compliance. For Java code, select one of Klocwork's pre-defined Java profiles that are tuned to particular types of applications, including web applications and others. Klocwork Professional Services will help you understand what is important and will direct you with the specific issues and vulnerabilities for your product. Stage 8: Choose issue management approachA key element to successfully using automated source analysis is to implement a process for managing reported issues and vulnerabilities over time. Klocwork tracks when the issue or vulnerability was found (state), and what action was assigned to the reported problem (status). It stores this information in a database to provide the information across builds. States are automatically assigned to every issue and vulnerability found by Klocwork. Status can be assigned by users to every issue and vulnerability found by Klocwork. For example, the status can be used to identify what will be classified as an issue that needs to be fixed immediately versus issues that may be safely ignored, either temporarily or permanently. An agreement on how the various statuses will be used by your organization is necessary for issue management. You will also have the option to baseline a project so that any existing issues found within legacy code by whatever checkers you select will be possible to put to one side, allowing you to focus on preventing any new issues from reaching the code stream. Stage 9: Choose role-based security (optional)Once your organization has decided which statuses you will use, and what each status means as part of the process, you will also need to decide who can change issue status. For example, you may allow only certain lead developers or reviewers to change status to "Not a problem", requiring developers to set the status to "Defer" and reviewers to validate that everything set to "Defer" status is really not an issue before changing status to "Not a problem". Klocwork provides several ways to control the use of Klocwork based on roles. Examples include: Would you want all developers to build Klocwork projects? Would you want all junior developers to be able to change any status from "Analyze" to "Not a problem"? Klocwork provides flexibility to customize this on a per-user or per-group basis. The following image shows a typical developer workflow:
![]() In order to implement role-based security, you must first identify users and groups in the system. If you do decide to implement this feature, it is recommended that you either integrate with your existing LDAP or NIS infrastructure. You can also use Klocwork's built-in access control. |