Code quality scanner for CI: ESLint, PMD, SpotBugs, OpenGrep, Gitleaks, Trivy, one quality gate
7.6K
Short description: Code quality scanner: JS/TS, Java, Kotlin, Swift, Python, PHP, Ruby, Go, C/C++, HTML, CSS; one gate
Categories: Developer tools, Integration & delivery, Security
The CI scanner of Qualor, the open-source, self-hosted SonarQube alternative
with no lines-of-code licence. One job in your pipeline runs the analyzers on the checkout, works
out which lines the merge request changed, and sends one report to your Qualor server
(qualor/server). It waits for the verdict and fails
the job when the quality gate fails. When AI review is switched on for the project, it also sends
the repository snapshot that the review reads.
The report carries the project's dependency list. The server keeps checking the lists of the main branch, chosen branches and released versions for new vulnerabilities. A scan on a tag records a version of the release instead of analysing the code. By default the scanner takes its vulnerability database from the server, so every scan checks against the data the server checks against.
Website: https://qualor.dev · Documentation: https://qualor.dev/docs · Source and issues:
https://github.com/qualor-dev/qualor · Configuration reference (qualor.yml, environment, exit
codes): https://qualor.dev/docs/configuration
Every release has its full version tag, such as 0.17.0, and a minor tag, such as 0.17, that
follows its patch releases. There is no latest tag. For C#, use
qualor/scanner-dotnet with the same tag.
The component from the GitLab CI/CD catalog is the shortest way, and it also shows the findings in GitLab's merge request widget:
include:
- component: gitlab.com/qualor/qualor/[email protected]
inputs:
image-tag: '0.17'
Or run the image in a job of your own:
qualor:
image: { name: qualor/scanner:0.17, entrypoint: [''] }
variables: { GIT_DEPTH: 0 }
script: [qualor scan]
Either way, add the CI/CD variables QUALOR_URL and QUALOR_TOKEN (masked, not protected, so
that merge request pipelines get the token too). The GitLab guide: https://qualor.dev/docs/gitlab.
qualor:
runs-on: ubuntu-latest
container: { image: qualor/scanner:0.17, options: --user 1001 }
steps:
- uses: actions/checkout@v5 # pin it to a commit SHA
with: { fetch-depth: 0 }
- run: qualor scan
env: { QUALOR_URL: '${{ vars.QUALOR_URL }}', QUALOR_TOKEN: '${{ secrets.QUALOR_TOKEN }}' }
Copy
integrations/azure-devops/qualor-docker.yml
to azure-pipelines.yml. It runs this image with docker run on a Linux agent and needs no
extension. Add the pipeline variables QUALOR_URL and QUALOR_TOKEN (a secret). Pull requests run
through a Build validation policy. The Azure DevOps guide: https://qualor.dev/docs/azure-devops.
Before qualor scan:
GIT_DEPTH: 0, fetch-depth: 0, fetchDepth: 0).node_modules).composer install --no-scripts --no-plugins (PHPStan reads vendor/, never runs it).go mod download or vendor the dependencies. Qualor never downloads modules.compile_commands.json.The qualor CLI (entrypoint /usr/local/bin/qualor-entrypoint, which runs qualor; default
command scan) is a single binary built with Bun. It runs as the user node (uid 1000) in /src.
The image is about 2.7 GB, and every base image is pinned by digest.
| Tool | Version | For |
|---|---|---|
| PMD | 7.27.0 | Java |
| SpotBugs with FindSecBugs | 4.10.4, 1.14.0 | Java bytecode, security rules |
| detekt | 1.23.8 | Kotlin |
| SwiftLint | 0.65.1 (static Linux build) | Swift |
| Ruff | 0.16.9 | Python |
| PHPStan | 2.2.16, on Debian's PHP 8.2 | PHP |
| RuboCop | RuboCop 1.91.0 on Ruby 4.0.7 | Ruby |
| staticcheck, go vet, gosec | 2026.2.1, Go 1.27.1, 2.29.0 | Go, offline |
| cppcheck | 2.22.0 (built from source) | C, C++ |
| eslint-plugin-sonarjs | 2.0.4, on Qualor's own ESLint 9 | SonarQube-compatible JavaScript and TypeScript rules |
| stylelint, HTMLHint | 17.15, 1.9.2 | CSS, SCSS, HTML |
| OpenGrep | 1.30.0 | Qualor's security rules and your own rule files |
| Gitleaks | 8.30.1 | secrets |
| Trivy | 0.74.0, with a snapshot of its vulnerability database, filtered to library packages | dependencies |
| qualor-rules | 2026.10.6 | Qualor's security rules |
The project's own ESLint runs on the bundled Node.js 22.23.4 (with npm and corepack). PMD, SpotBugs
and detekt run on the Eclipse Temurin JRE 17.0.20+8. git is configured with safe.directory '*',
since CI runners check out as another user. Trivy never downloads its database itself: the scan
takes it from a Qualor server 0.15 or later, and uses the snapshot in the image otherwise. Not
included: clang-tidy (scan in the job that built your project to use your own), the C#
analyzers (use qualor/scanner-dotnet), and
Semgrep or OpenGrep rules of your own (name your rule files in qualor.yml).
Qualor's security rules (source-available) cover JavaScript and TypeScript, Python, Java, Go and C#. They follow HTTP request data into SQL, NoSQL, shell commands, code and template evaluation, file paths, LDAP and XPath queries, regular expressions, outgoing requests, redirects and HTML responses. They also report disabled TLS verification, XXE, zip slip, unsafe deserialization and broken ciphers. Weak hashes, cookies without their flags, raw HTML in React, unsafe tar extraction and XML parsers that load DTDs are reported as security hotspots to review.
| Variable | Meaning |
|---|---|
QUALOR_URL | the Qualor server's base URL |
QUALOR_TOKEN | a project analysis token or a personal access token (keep it a masked secret) |
QUALOR_CA_FILE | a PEM file with the CA of a server whose certificate a private CA issued |
QUALOR_PROJECT_KEY | overrides project.key of qualor.yml |
QUALOR_CONFIG | the path of the config file (default qualor.yml at the repository root) |
QUALOR_LOG_LEVEL | error, warn, info (default) or debug |
QUALOR_TRIVY_CACHE_DIR | where the scanner keeps the vulnerability database it takes from the server (default ~/.cache/qualor/trivy) |
HTTPS_PROXY, HTTP_PROXY, NO_PROXY | the proxy for the upload (http:// proxy URLs only) |
The token is only ever sent to a server URL that came from QUALOR_URL or --server-url, never
to one that only the repository's qualor.yml names. TLS certificates are always verified.
| Code | Meaning |
|---|---|
| 0 | report accepted and the gate passed (or the gate is not awaited, or the project has none) |
| 1 | the gate failed (or ended in error with failOnError: true) |
| 2 | usage or configuration error: invalid qualor.yml, missing URL or token, not a git work tree |
| 3 | a required analyzer failed |
| 4 | server unreachable, upload rejected, gate polling timed out, or an internal error |
| 5 | authentication or authorisation failure (401 or 403) |
An interrupted scan exits 128 plus the signal number (130 for SIGINT, 143 for SIGTERM).
The Qualor CLI is MIT-licensed. Qualor's security rules are under PolyForm Shield 1.0.0 (source-available, not MIT). The bundled software keeps its own licences:
| Component | Licence |
|---|---|
| OpenGrep, SpotBugs | LGPL-2.1 |
| FindSecBugs | LGPL-3.0 |
| PMD | BSD-style, with Apache-2.0 parts |
| Gitleaks, Trivy | MIT and Apache-2.0, with MPL-2.0 Go modules |
| Ruff | MIT, with three MPL-2.0 crates compiled in |
| detekt | Apache-2.0; Trove4J (LGPL-2.1) inside its jar |
| PHPStan | MIT; its Composer packages MIT, BSD-3-Clause and Apache-2.0 |
| PHP 8.2 (Debian) | PHP License 3.01 |
| Python 3.11 (Debian) | Python Software Foundation License |
| Go | BSD-3-Clause with Google's patent grant |
| staticcheck | MIT |
| gosec | Apache-2.0 |
| SwiftLint | MIT; its static build links the Swift runtime, libc++, musl, curl, BoringSSL, libxml2, zlib and mimalloc, none of them copyleft |
| Ruby 4.0.7, RuboCop and its gems | Ruby under its BSD-2-Clause option; the gems MIT, Ruby or BSD-2-Clause |
| cppcheck 2.22.0 | GPL-3.0-or-later, built from source |
| eslint-plugin-sonarjs 2.0.4 | LGPL-3.0, the last release before the SONAR Source-Available License; its npm dependency tree includes axe-core (MPL-2.0) |
| Temurin JRE | GPL-2.0 with the Classpath Exception |
| Node.js | MIT |
Bun, inside the qualor binary | MIT; it links JavaScriptCore/WebKit and TinyCC (LGPL) |
The notices are in /opt/qualor/NOTICE.md and the licence texts in /opt/qualor/licenses/. The
complete corresponding source of every copyleft component is published as
qualor/scanner-sources with the same tag;
/opt/qualor/SOURCES.md is its index.
SonarQube and SonarCloud are trademarks of SonarSource SA. Qualor is an independent project and is not affiliated with, sponsored or endorsed by SonarSource. Their names are used only to describe compatibility and to compare features.
docker pull qualor/scanner:0.18