What is our primary use case?
Semgrep serves as an open-source static application security testing tool for my organization. We work under a microservices model with multiple repositories, around eight in total. Whenever we make any code changes, Semgrep scans the whole repository, trying to find security vulnerabilities, bugs, or coding standard violations that might have been missed before peer-to-peer review. It gives us security scanning results and allows us to implement custom rules created in Semgrep, which is integrated with our CI/CD pipeline, such as Jenkins or GitLab. Whenever a pull request is made, Semgrep scans the entire repository and identifies security bugs and code vulnerabilities before any human review.
A quick specific example of how Semgrep helped me catch something important is when we were using Java across multiple repositories while utilizing GCP tokens as our cloud provider. In one of our pipeline files, someone printed a private key token in the console during a pull request review. Semgrep flagged this issue, alerting us that this private key was vulnerable and should never be printed in the console. This was caught before it reached production. Additionally, Semgrep suggested best practices such as encrypting passwords before saving them, which were enhancements we previously overlooked.
What is most valuable?
Some of the best features Semgrep offers include its capability to integrate with over 30 languages. Our eight repositories consist of Java, Python, Node, and JavaScript. It operates very fast by creating an index to find changes rather than analyzing the entire repository on each commit, thereby scanning large codebases in minutes. Additionally, we can create our own pattern-based rules, which is an essential feature for us.
Setting up custom pattern-based rules is easy, and we use them often for our team's needs. There is no specific coding language or technical skill required; we only need to create a YAML file, which anyone can write and use.
Furthermore, Semgrep can integrate with Integrated Development Environments such as VS Code or IntelliJ. Some of the latest IDEs allow integration, enabling developers to scan the entire codebase directly from their development environment, so it is not only restricted to the CI/CD pipeline.
Semgrep has positively impacted our organization by improving code quality and helping us eliminate vulnerabilities in our code. It allows for faster development since it autonomously reviews repositories and identifies vulnerabilities before a human review, leading to enhanced code quality and automated security testing.
What needs improvement?
Regarding improvements for Semgrep, I have noticed that it occasionally provides false positive results, although it does not happen consistently. That is the only major improvement I can think of, aside from the fact that the pricing is reasonable. It performs well; I only wish it could fine-tune the rules to reduce false positives.
Regarding any needed improvements, particularly about the UI, I do not have anything to add because it is very simple and easy to use. Anyone can understand it without difficulty, and the pricing seems fair as well. The only issue I see is the sporadic occurrences of false positive results, as previously mentioned.
For how long have I used the solution?
I have been using Semgrep for around two years.
What do I think about the stability of the solution?
Semgrep is stable, as far as my experience indicates.
What do I think about the scalability of the solution?
In terms of scalability, I have witnessed Semgrep handle our eight repositories effectively, and throughout our organization, we operate around 150 repositories with a microservices architecture. It effectively scans even very large repositories in just minutes, demonstrating its high scalability.
How are customer service and support?
Concerning customer support, I have not had any use cases that required assistance. However, the documentation is excellent. When I created custom rules, I had some doubts, and the documentation was very helpful, simple, and easy to understand.
Which solution did I use previously and why did I switch?
Previously, we used SonarQube, but we switched because SonarQube is oriented more towards bug fixing and lacks the focus on security analysis we needed.
How was the initial setup?
The setup is straightforward, requiring no advanced technical knowledge.
What was our ROI?
We have indeed seen a return on investment with Semgrep, primarily through time savings and improved code quality.
What's my experience with pricing, setup cost, and licensing?
My experience with pricing, setup cost, and licensing has been positive. Initially, we used a free plan for demo and testing purposes, but once we fully integrated it into our company, it has proven to be price-efficient at around $30 a month.
Which other solutions did I evaluate?
Before choosing Semgrep, I did not evaluate other options aside from SonarQube, which we migrated from to implement Semgrep instead.
What other advice do I have?
Although not directly in the development process, Semgrep has saved substantial time in the review process. For instance, when a developer raises a pull request, Semgrep automatically reviews it before another developer or manager does. This saves a lot of time in reviewing features. Semgrep has detected over 150 vulnerabilities across our eight repositories, and it takes minimal time to scan the full repository, which is one of its best aspects.
I would rate Semgrep a 9 out of 10. I chose a nine out of ten mainly because of the occasional false positive results I mentioned earlier; that is the only thing preventing me from giving it a full score.
Regarding Semgrep's AI capabilities, it serves as a security tool to check for vulnerabilities in code. From my experience, it has successfully identified over 150 security vulnerabilities in our code, and I find it completely reliable in terms of security.
My advice for others considering Semgrep is that if you have large repositories, there are very few tools on the market that can provide security scanning and identify vulnerabilities quickly. Semgrep is one of those tools that performs very efficiently. If security is a concern for you, I recommend trying the free version first; if it proves beneficial for your organization, then make an organizational decision to onboard it.