OIS Code Scanning

What: Code scanning, also known as static code analysis or static application security testing (SAST), is a software development and security practice that involves automatically analyzing source code or compiled code to identify potential vulnerabilities, bugs, and quality issues. This process is typically performed without executing the code and can be integrated into the software development lifecycle at various stages, such as during coding, code reviews, or continuous integration.

Code scanning tools analyze the codebase for patterns or characteristics that are indicative of security vulnerabilities, coding errors, and adherence to coding standards. Some common issues that code scanning tools can detect include:

  • Security vulnerabilities: Code scanning can identify common security issues such as SQL injection, cross-site scripting (XSS), buffer overflows, and other vulnerabilities that could be exploited by attackers.

  • Coding errors: It can uncover coding mistakes that might lead to runtime errors, crashes, or unpredictable behavior in the software.

  • Code quality issues: Code scanning tools can also identify issues related to code style, maintainability, and best practices, helping developers write cleaner and more maintainable code.

Why: Why is code scanning important?

Early bug detection: Code scanning allows developers to catch and address coding errors and security vulnerabilities at an early stage in the development process, reducing the cost and effort required to fix them later.

  • Security improvement: By identifying security vulnerabilities and weaknesses in the code, code scanning helps organizations proactively address potential security risks, protecting their systems and data from cyber threats.

  • Compliance: Many industries and organizations have regulatory requirements that mandate secure coding practices. Code scanning helps in meeting these compliance requirements by identifying and mitigating security issues.

  • Code quality and maintainability: Code scanning can help improve the overall quality of the codebase, making it more readable, maintainable, and easier to work with. This, in turn, enhances the long-term sustainability of the software.

  • Developer productivity: By automating code analysis, developers can focus on writing code, while code scanning tools help identify and flag potential issues. This can streamline the development process and free up developers to work on more creative and value-adding tasks. This automation also enables developers to do the security analysis in real-time without needing to involve security or other teams to assist.

  • Continuous integration: Code scanning can be integrated into the continuous integration/continuous deployment (CI/CD) pipeline, enabling automated checks for code quality and security with each code commit. This helps ensure that new code doesn't introduce new vulnerabilities or quality issues.

Overall, code scanning is an important practice for ensuring the security, reliability, and maintainability of software applications, and it plays a vital role in modern software development processes.

Tools: Code scanning tools are software applications or services that automatically analyze source code, byte code, or binary code to identify potential vulnerabilities, bugs, coding errors, and code quality issues. These tools are widely used in software development to improve code quality, security, and maintainability. Here are some common code scanning tools approved for use at Tufts: