Overview
Security scanners find the vulnerability. They do not teach the developer how to avoid the next one. This component closes that gap inside GitLab: when a scanner flags a finding on a merge request, the developer who introduced it gets a short lesson on the exact class of bug, on the merge request, while the code is still fresh.
It is a GitLab CI/CD Catalog component, so adoption is one include line and three variables:
- Reads your SAST, Secret, Dependency, and Container reports
- Matches each finding to a secure-coding module
- Posts the lesson on the merge request
- Stateless, in your own GitLab boundary
How it works
The component is a job in your merge request pipeline that runs after your security scanners. It never talks to your source; it reads the reports the scanners already produce and acts on them.
-
Your GitLab scanners run and write their
gl-*-report.jsonartifacts. The component reads them and iterates the findings. -
For each finding it takes the CWE and OWASP identifiers and matches them to the secure-coding module that teaches the fix. A SQL injection maps to injection, a hard-coded secret to secrets handling, a vulnerable dependency to dependency hygiene.
-
It works out the responsible developer from the commit author and posts the module link as a single note on the merge request, deduplicated so a re-run never spams it.
-
When the developer finishes the module, the completion is recorded back on the merge request as a signed note, so the review shows the lesson was assigned and done.
The lesson lands at the moment of the mistake, on the merge request, not in a quarterly training queue. That is when a developer is most receptive to the fix for the code they just wrote.
Add it to your pipeline
The component is published in the
GitLab CI/CD Catalog. Add it to your .gitlab-ci.yml after the jobs that produce your security reports:
include:
- component: $CI_SERVER_FQDN/ransomleak/secure-coding-jit/secure-coding-training@1 Then set one masked CI/CD variable. There is no signup and no RansomLeak account: the job proves which project it runs in with its GitLab CI ID token, which GitLab signs.
| Variable | What it is |
|---|---|
RANSOMLEAK_GITLAB_TOKEN | A project access token (Reporter role, api scope) from your project's
Settings, Access tokens. It posts and updates the note on the merge request and is
never sent to RansomLeak. Mask it. |
There is no agent to deploy and nothing to host. The component is a pipeline job that runs
on GitLab-hosted or your own runners, and the version pin (@1) keeps you on the
latest release without breaking changes.
On self-managed GitLab, email support@ransomleak.com with your instance URL so we can trust its ID tokens. Gitlab.com works out of the box.
Use SonarQube
If SonarQube already analyses your merge requests, include the optional
sonarqube template too. Its ransomleak-sonarqube job reads the merge request's
SonarQube security findings and saves them as gl-sonarqube-report.json, which the
training job reads with the other reports.
include:
- component: $CI_SERVER_FQDN/ransomleak/secure-coding-jit/sonarqube@1
inputs:
sonar_host_url: https://sonarcloud.io
sonar_organization: my-group
sonar_project_key: my-group_my-project
- component: $CI_SERVER_FQDN/ransomleak/secure-coding-jit/secure-coding-training@1
inputs:
stage: .post - SonarQube Server (Developer Edition or higher) and Cloud
- Your Sonar token stays in your CI/CD variables
- Only the scanner name, CWE and OWASP ids go into the report
Add SONAR_TOKEN as a masked CI/CD variable. It needs Browse permission on the
project and is optional for public SonarQube Cloud projects. SonarQube Community Build does not
analyse merge requests, so the job then writes an empty report. The job runs the public image
ghcr.io/ransomleak/secure-coding-cli:1 and never fails the pipeline. Inputs and
options are in the
help center GitLab section.
Permissions and data handling
The integration is stateless and runs inside your own GitLab boundary. It reads the scanner reports the pipeline already produced, and it talks to GitLab with a token you own and can revoke.
- Runs in your GitLab, with your token
- No per-developer rows, no completion storage
- Revoke the token and it stops, cleanly
| Data | How it is handled |
|---|---|
| Findings | Read from the scanner reports in the pipeline. RansomLeak receives the scanner name and the CWE and OWASP ids, with the project id, merge request number and commit SHA, never your source code. |
| The developer | Resolved from the commit author, and sent with the request so the lesson link is tied to that developer. No per-developer record is kept on our side. |
| The completion | A signed note on your merge request. GitLab holds it as the record; RansomLeak does not store it. |
Because it runs inside your own GitLab, no source code leaves it and RansomLeak keeps no per-developer record. For how RansomLeak handles data, see the privacy policy and the security and compliance page.
Frequently asked questions
Does RansomLeak integrate with GitLab?
Yes. RansomLeak publishes a GitLab CI/CD Catalog component that turns a security finding into secure-coding training for the developer who introduced it. It runs after your security scanners in a merge request pipeline, reads their reports, and posts a short, matched lesson on the merge request. Completion is recorded back on the same merge request.
How does a GitLab finding become training?
The component runs in the merge request pipeline, after your scanners produce their gl-*-report.json artifacts. For each finding it reads the CWE and OWASP identifiers, matches them to a secure-coding micro-module, works out the responsible developer from the commit author, and posts the module link as a note on the merge request. Finishing the module records completion back on the merge request.
Which scanners does it read?
GitLab SAST, Secret Detection, Dependency Scanning, and Container Scanning, plus SonarQube through an optional template. SonarQube Server needs Developer Edition or higher, and SonarQube Cloud works too. Each finding is matched by its CWE and OWASP identifiers, so a SQL injection, a hard-coded secret, or a vulnerable dependency each map to the lesson that teaches the fix.
What developer data does RansomLeak store?
None. The component runs inside your own GitLab, calling your GitLab with a token you control. RansomLeak sees the finding class (scanner name, CWE and OWASP ids), the merge request reference and the commit author, only to build the lesson link. We keep one signing key per GitLab group and, for 30 days, which lessons were finished on which merge request. Your GitLab token never reaches us, and there are no per-developer rows. The completion shows as a tick in the note on your merge request.
How do I add it?
Add one include line to your .gitlab-ci.yml from the CI/CD Catalog and set one CI/CD variable: a GitLab project access token that posts the note. There is no signup and no RansomLeak account, because the job identifies its project with a GitLab-signed CI ID token. The component then runs on the next merge request. There is no agent to deploy and nothing to host.
Does it work with SonarQube?
Yes. Add the optional sonarqube template and its job reads the merge request's SonarQube security findings. The training job then treats them like any other report. SonarQube Server needs Developer Edition or higher, SonarQube Cloud works too, and your Sonar token stays in your own CI/CD variables.
Does it block the merge?
No. It posts the training on the merge request as a prompt, so it fits your existing review flow without stopping it. Completion is recorded back on the merge request, so a reviewer can see the lesson was assigned and finished. A hard merge-blocking gate through GitLab Ultimate external status checks is on the roadmap, not in the component today.
Need a hand?
Email support@ransomleak.com with a question, or if you use a scanner we do not cover yet.