Skip to main content

Why a security-focused pipeline

Generic code review catches style and bugs. But security vulnerabilities — SQL injection, hardcoded secrets, insecure auth patterns — need dedicated rules that treat findings as critical blockers. This cookbook sets up a security-first layer on top of your existing review.

Step 1 — Enable security analysis

Make sure the Security category is on in Code review → What to review, or in kodus-config.yml (read only when Prefer kodus-config.yml settings is on for the repository):
This gives you Kodus’ built-in security checks. The rules below add your team’s specific security policies on top.

Step 2 — Create OWASP-focused rules

Create each rule in Code review → Kody Rules: on the Review Rules tab, click New rule and fill the fields as shown below.

SQL injection prevention

Hardcoded secrets detection

Authentication bypass

XSS prevention

Step 3 — Teach security Memories

Create persistent conventions that apply everywhere:

Step 4 — Configure for zero tolerance

For security rules, you want critical findings to block and never be filtered out:
  1. In Code review → General → Review feedback, turn on Request changes on critical issues (not available when every connected provider is GitLab). Kody sets the review to Request Changes when it posts a Critical inline comment
  2. Set security rules to Critical severity
  3. In Code review → What to review, leave Apply the threshold to Kody Rules off, its default. Rules then post at any severity, whatever Minimum severity to post is
Request changes follows inline comments, so it is set by Per file rules. A Per PR rule, such as the auth middleware one, posts one pull request comment and does not set it.

Checklist

  • Security category on
  • SQL injection rule covers all DB-interacting code
  • Secrets detection rule covers all file types
  • Auth bypass rule references your actual auth patterns
  • XSS rule covers all frontend component files
  • Security Memories teach general secure coding principles
  • Request changes on critical issues is on, and Apply the threshold to Kody Rules is off
  • A test PR confirmed rules fire correctly
For more on configuring rules, see Kody Rules.