Open source
GLPI · Plugin + CLI

glpi-guard

Find out how exposed your GLPI is, in one command.

It reads the installation the way an auditor would: versions, the accounts the installer left behind, password and two-factor policies, the API, files forgotten in the web directory. Every finding comes with evidence, a severity and a step-by-step fix.

TypeGLPI · Plugin + CLI
CompatibilityGLPI 10 · 11 · 12
LanguagePHP
LicenceGPL-3.0
Latest releasev0.1.1
Scope25 checks
ResultScore 0–100, grade A–F
Report languageEnglish and Turkish
Screenshots 1 / 3

Plugin dashboardScore, grade and findings ordered by severity

Why

GLPI Guard tells you, in one click or one command, how exposed your GLPI is and exactly how to fix it. The result is a score from 0 to 100 and a grade from A to F that you can track over time.

It is a defensive, read-only tool, meant only for installations you are responsible for. It runs inside GLPI as a plugin or from the command line as a single file; both use the same engine and the same 25 checks.

Features

Knows the advisories

Compares the versions of GLPI and 22 widely used plugins with their GitHub Security Advisories and names the minimum safe version to upgrade to. Works offline; the advisory database is refreshed daily.

Finds the classic mistakes

The glpi, tech, normal and post-only accounts still on their default password, a missing password policy, administrators without two-factor authentication, plain-text LDAP, open API clients, a world-readable config_db.php, forgotten SQL dumps.

Tells you how to fix it

Not just "vulnerable": every finding names the menu path or command that fixes it, with links to the official advisory or documentation.

Read-only by design

SQL is limited to SELECT and SHOW, and the session is switched to READ ONLY. Default passwords are checked locally against the stored hash, never by logging in.

Plugin or command line

A GLPI page for super-admins with history, score trend and a weekly automatic scan; or a single glpi-guard.phar file for servers, cron and CI (--fail-on high).

Reports people read

A self-contained HTML report in light and dark, JSON for dashboards and pipelines, and coloured terminal output. Findings are ordered by severity.

How it works

Three sources are read: the GLPI code and files, the GLPI database (SELECT only) and the advisory database.

  1. Context

    The GLPI root, version and config directory are detected, including inc/downstream.php setups such as the Debian package. The plugin reuses GLPI's own database connection; the command line reads the connection from config_db.php or takes it from --db-* options.

  2. Checks

    Each check is a small class that only reads and returns zero or more findings. A check that cannot apply (two-factor on GLPI 10, Unix permissions on Windows) is reported as skipped, never as an error.

  3. Advisories

    data/advisories.json ships with the tool. A GitHub Action rebuilds it daily from the published advisories and opens a pull request that a human reviews.

  4. Report

    Findings are ordered by severity, scored and rendered. In the plugin every scan is stored (the last 100), so you can follow the score after each fix.

What it checks

Checks are grouped, and each has a stable ID such as GG-A01. The rows below are examples from the first three groups; files, permissions, upload rules, mail encryption and profile rights are checked as well.

GroupExample checksTypical severity
Versions and advisoriesGLPI version against published advisories; whether the branch still receives security fixes; plugins; PHP version; an unfinished upgradeUp to critical
Accounts and authenticationDefault accounts; too many or dormant super-admins; password policy; two-factor authentication (GLPI 11+); LDAP without TLS; failed logins over 30 daysCritical / High
APIAPI clients open to every IP without an app token, login with credentialsHigh / Medium

Scoring

The score starts at 100 and loses 25, 12, 5 or 2 points per critical, high, medium or low finding. Informational findings cost nothing.

Grades: at least 90 for A, 80 for B, 65 for C, 50 for D; below that is F. A single critical finding means F, whatever the rest.

Installation

As a GLPI plugin
cd /var/www/glpi/plugins
curl -L https://github.com/CodeByPinar/glpi-guard/releases/latest/download/glpiguard.tar.gz | tar xz
php ../bin/console plugin:install -u glpi glpiguard && php ../bin/console plugin:activate glpiguard

On GLPI 10 the commands are named glpi:plugin:install and glpi:plugin:activate.

From the command line
curl -LO https://github.com/CodeByPinar/glpi-guard/releases/latest/download/glpi-guard.phar
php glpi-guard.phar scan /var/www/glpi

Run it as a user that can read the GLPI directory. The database connection is read from config_db.php as text; the file is never executed.

With a read-only database account
php glpi-guard.phar scan /var/www/glpi --db-user glpiguard_ro --db-pass "$GG_DB_PASS"

What it never does

  • It does not write to GLPI's database or files; the plugin only writes its own history table.
  • It does not exploit, fuzz or try to "verify" a vulnerability; versions and configuration are enough.
  • It does not try a password over the network.
  • It does not scan other people's GLPI; there is no discovery or remote-target feature, and there will not be.
  • It does not put secrets in reports; evidence shows names and settings, never passwords, hashes or tokens.
  • It does not phone home; there is no telemetry and it works fully offline.
Source code, releases and full documentationgithub.com/CodeByPinar/glpi-guard
Open on GitHub
open to new projectsLet's work together