
Getting Started Guide
How to Use Semgrep
A practical guide to get you up and running with Semgrep. Written by Delv Editorial, Delv Team.
Getting started with Semgrep
In this guide, you will learn how to set up Semgrep and perform your first static analysis on your code to identify vulnerabilities. By the end, you will be equipped to enhance your application security effectively.Step 1: Sign up and set up
- Go to semgrep.dev.
- Click on the “Get Started for Free” button on the homepage.
- Sign up using your email or GitHub account. Follow the prompts to verify your email if necessary.
- Once logged in, you will be taken to the Semgrep dashboard. You can choose to create a new project by clicking the “New Project” button.
Step 2: Your first scan
- In your dashboard, click on the “New Project” button.
- Enter a project name and select a repository to scan. You can connect your GitHub or GitLab account for easy access.
- Choose the language of your codebase from the dropdown menu.
- Select the default ruleset for the scan. You can start with the “Security” ruleset.
- Click the “Scan” button to initiate the scan.
- After a few moments, you will see the results showing any vulnerabilities detected in your code.
Step 3: Get better results
- To refine your results, you can create custom rules. Click on the “Rules” tab in the left sidebar.
- Click the “New Rule” button and follow the prompts to define your rule using YAML format.
- Test your rule by running a scan on your codebase again.
- Explore the “Documentation” section for additional tips on writing effective rules.