Case: a Bitrix projectGitLab CI · Docker · 2026

Eight checks before it ships.

I’m Misha, a backend team lead. I build release pipelines for any project: code, secrets and libraries are checked on every merge request, the Docker image is scanned before anyone runs it, findings come back sorted by CWE, and the reviewer gets an AI read of the change before saying yes. The case on this page is a real Bitrix project.

Send me your pipeline

One commit, five stages.

Three sites on one Bitrix core, two Docker images, a private pinned core repository. Every push walks the same road, and nothing is published until the code has been read by machines it cannot argue with.

Five thick glass slabs stand in a row in the dark. Scattered points of light drift through them and leave the last one as a single straight line of evenly spaced dots.
  1. Quality6 checks on the source
  2. Buildapp, then nginx from it
  3. Verifyopt-in, manual
  4. Scan2 images, findings by CWE
  5. Shipall eight green

Example · how it was built on a real project

The eight.

I build the pipeline around your project: your stack, your risks, your rules for a release. This is how it came out on one real Bitrix project. Six checks read the source, two read the finished images.

Another project gets another eight. GitLab CI or GitHub Actions, PHP or Node, Go or Python: the tools change, the idea stays. Nothing ships unread.

  1. 01Code

    Pipeline tests

    The CI scripts are tested too, against fake Docker, registry and scanners.

  2. 02Code

    PHP lint

    Every PHP file is parsed. Nothing is executed.

  3. 03Code

    PHPStan

    Static analysis of the sites: wrong types, calls to nothing, classes that do not exist. Vendors and third-party viewers stay out of scope.

  4. 04Code

    SonarQube

    Bugs, code smells and security hotspots, reported on the merge request where they appear.

  5. 05Secrets

    Gitleaks

    Keys and passwords in the repository, reported redacted.

  6. 06Libraries

    Composer audit

    Known advisories in each site’s locked packages.

  7. 07Image

    Trivy · app

    High and critical vulnerabilities that have a fix, in the PHP image.

  8. 08Image

    Trivy · nginx

    The same scan for the web server image built on top of it.

Built once. Named by its commit.

app:latest app:3f9c2e1

A fluted glass ingot floats in the dark. A thin beam of white light passes through it and leaves as a row of fine coloured lines with uneven spacing, like a fingerprint.

Weaknesses, not packages.

A scan returns a list of package versions. The last stage turns it into a short list of weakness classes, so the team fixes a cause once instead of chasing every package.

How a report reads. Classes shown as examples, not this project’s results.

CWE-79
Cross-site scripting
escape output where it is printed
CWE-89
SQL injection
bound parameters, no string concatenation
CWE-862
Missing authorization
check the right before the action
CWE-798
Hard-coded credentials
move to CI variables and rotate
CWE-1395
Vulnerable third-party component
update the base image or the lockfile

Fewer blind “Looks good to me.”

Checks catch what rules can describe. Code quality still needs a person. So the pipeline gives that person something to read first: an AI review of the change, posted on the merge request next to the reports.

The report is not only about CVEs. It is written for whoever approves: what changed, what looks risky, what to look at first.

  1. AI

    Reads the change

    The diff, the check results and the scan, together. It writes short notes with the line each one is about.

  2. You

    Check each note

    Open the code, decide whether the note is relevant. A note is a reason to look, not a verdict.

  3. You

    Approve or send back

    With the note attached, so the author sees why. The AI never approves anything.

Merge request · AI notesIllustration
  • orders/ajax.php:41 A request parameter goes into the ORM filter without a type check.

    Relevant. Sent back to the author.

  • Handler::save() The method grew to 140 lines and mixes rendering with saving.

    Known. Separate task, dismissed with a reason.

  • composer.lock A new package has had no release in three years.

    Question. Asked the author why this one.

The AI does not approve.
It makes “LGTM” cost a read.

Agents do the repetitive part.

An AI agent reads the findings, finds the cause and drafts the fix. It works inside rules written in the repository, and its work goes through the same eight checks as anyone’s.

“Fixed in code” is the agent’s word.
“Closed” is mine.

From your YAML to mine.

  1. 01Step

    Read

    You send the pipeline you have, or tell me you have none. I answer in writing with what I would add first and why.

  2. 02Step

    Agree the gates

    Which checks block a release and which only report. Written into the pipeline, not kept in someone’s head.

  3. 03Step

    Build

    Checks, image build, scans, the CWE report and AI review notes, on a branch, until a full run is green or every red is explained.

  4. 04Step

    Hand over

    Pipeline in your git, variables in your CI settings, the agent’s rules in the repository, a page on what to do when a check goes red.

Questions.

Will a red check stop the release?

Only the checks we agree on. Each one is written into the pipeline as blocking or reporting, so the rule is visible to everyone and changes only by a merge request.

Do you need to run our project to set this up?

No. Every check here works on the source and the built images. Starting the application is a separate, manual step that is off by default.

We use GitHub, not GitLab.

The checks are the same tools: PHPStan, Gitleaks, Composer audit, SonarQube and Trivy run in GitHub Actions too. The case on this page is GitLab CI.

Does the AI approve merge requests?

No. It writes notes for the reviewer and nothing more. Approving stays with a person, who reads the notes, checks them against the code and decides.

What does the AI agent have access to?

The repository and the reports. Not production, not your data, not your secrets. Its rules are a file in the repository, and every change it makes goes through the same eight checks and a human review.