HUB
Sign inSign up

qualor/scanner

By qualor

•Updated about 13 hours ago

Code quality scanner for CI: ESLint, PMD, SpotBugs, OpenGrep, Gitleaks, Trivy, one quality gate

Image
Security
Integration & delivery
Developer tools
0

7.6K

qualor/scanner repository overview

⁠qualor/scanner

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

⁠Overview

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⁠

⁠Tags

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.

⁠GitLab CI

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⁠.

⁠GitHub Actions
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 }}' }
⁠Azure Pipelines

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:

  • Check out the full git history (GIT_DEPTH: 0, fetch-depth: 0, fetchDepth: 0).
  • JavaScript and TypeScript: install the project's dependencies (ESLint runs from node_modules).
  • Java: build the project (SpotBugs reads compiled classes).
  • PHP: run composer install --no-scripts --no-plugins (PHPStan reads vendor/, never runs it).
  • Go: run go mod download or vendor the dependencies. Qualor never downloads modules.
  • C and C++: nothing for cppcheck. For clang-tidy, scan in the job that built the project, with your own clang-tidy and its compile_commands.json.
⁠What is inside

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.

ToolVersionFor
PMD7.27.0Java
SpotBugs with FindSecBugs4.10.4, 1.14.0Java bytecode, security rules
detekt1.23.8Kotlin
SwiftLint0.65.1 (static Linux build)Swift
Ruff0.16.9Python
PHPStan2.2.16, on Debian's PHP 8.2PHP
RuboCopRuboCop 1.91.0 on Ruby 4.0.7Ruby
staticcheck, go vet, gosec2026.2.1, Go 1.27.1, 2.29.0Go, offline
cppcheck2.22.0 (built from source)C, C++
eslint-plugin-sonarjs2.0.4, on Qualor's own ESLint 9SonarQube-compatible JavaScript and TypeScript rules
stylelint, HTMLHint17.15, 1.9.2CSS, SCSS, HTML
OpenGrep1.30.0Qualor's security rules and your own rule files
Gitleaks8.30.1secrets
Trivy0.74.0, with a snapshot of its vulnerability database, filtered to library packagesdependencies
qualor-rules2026.10.6Qualor'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.

⁠Environment
VariableMeaning
QUALOR_URLthe Qualor server's base URL
QUALOR_TOKENa project analysis token or a personal access token (keep it a masked secret)
QUALOR_CA_FILEa PEM file with the CA of a server whose certificate a private CA issued
QUALOR_PROJECT_KEYoverrides project.key of qualor.yml
QUALOR_CONFIGthe path of the config file (default qualor.yml at the repository root)
QUALOR_LOG_LEVELerror, warn, info (default) or debug
QUALOR_TRIVY_CACHE_DIRwhere the scanner keeps the vulnerability database it takes from the server (default ~/.cache/qualor/trivy)
HTTPS_PROXY, HTTP_PROXY, NO_PROXYthe 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.

⁠Exit codes
CodeMeaning
0report accepted and the gate passed (or the gate is not awaited, or the project has none)
1the gate failed (or ended in error with failOnError: true)
2usage or configuration error: invalid qualor.yml, missing URL or token, not a git work tree
3a required analyzer failed
4server unreachable, upload rejected, gate polling timed out, or an internal error
5authentication or authorisation failure (401 or 403)

An interrupted scan exits 128 plus the signal number (130 for SIGINT, 143 for SIGTERM).

⁠Licences

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:

ComponentLicence
OpenGrep, SpotBugsLGPL-2.1
FindSecBugsLGPL-3.0
PMDBSD-style, with Apache-2.0 parts
Gitleaks, TrivyMIT and Apache-2.0, with MPL-2.0 Go modules
RuffMIT, with three MPL-2.0 crates compiled in
detektApache-2.0; Trove4J (LGPL-2.1) inside its jar
PHPStanMIT; 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
GoBSD-3-Clause with Google's patent grant
staticcheckMIT
gosecApache-2.0
SwiftLintMIT; 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 gemsRuby under its BSD-2-Clause option; the gems MIT, Ruby or BSD-2-Clause
cppcheck 2.22.0GPL-3.0-or-later, built from source
eslint-plugin-sonarjs 2.0.4LGPL-3.0, the last release before the SONAR Source-Available License; its npm dependency tree includes axe-core (MPL-2.0)
Temurin JREGPL-2.0 with the Classpath Exception
Node.jsMIT
Bun, inside the qualor binaryMIT; 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.

⁠Trademarks

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.

Tag summary
Recent tags
Content type
Image
Digest
sha256:f08c28f45…
Size
715.5 MB
Last updated
about 13 hours ago
docker pull qualor/scanner:0.18