
- The opening of a pull request (PR) or a merge request (MR)
- A scheduled scan
- An API call
Types of workflows
Semgrep provides built-in workflows you can run immediately, or you can define custom ones for your organization’s needs. All workflows deploy on Semgrep’s managed infrastructure, minimizing your operational overhead. Semgrep’s pre-built workflows, covering common use cases, include:- Insecure direct object references (IDORs) and broken authorization: combine static analysis and AI detection to find broken authorization, authentication bypasses, insecure access patterns, and other business logic issues
- Triage: filter out false positives from your results to help your security teams prioritize real issues
- Autofix: turn dependency findings into actionable remediation guidance, including information on whether the upgrade is safe or requires code modification
Custom workflows
Semgrep workflows are defined using Python and have a clear structure that includes steps, tool decorators, and standard control flow. This structure makes it straightforward for AI assistants to generate, modify, and extend your workflows — you can describe what you want your workflow to do in natural language, and the AI assistant presents you with a draft workflow. You can run workflows locally for testing and iteration, on Kubernetes with a single deploy command, or through CI/CD systems like GitHub Actions or GitLab CI. Semgrep’s managed infrastructure handles orchestration, optimization, and monitoring regardless of deployment method. Custom workflow patterns include, but aren’t limited to, the following:| Workflow | Description |
|---|---|
| Detection | combine Semgrep with other security tools, project code context, and LLM-assisted reasoning to identify patterns that your organization deems important but can’t be categorized neatly into generic, out-of-the-box rules |
| Policies | encode internal security and compliance logic, then run it across multiple environments and repositories |
| Remediation | generate upgrade guidance, code change suggestions, and PRs with the context developers need to fix issues safely |
| Triage | review findings from a scanning tool while using repository context and custom review logic to produce decisions about the validity and priority of the findings |
| Validation | review suspected issues with additional checks to determine if the issues are exploitable or worth escalating |