Skip to content

Reference

What the agent reads and sends

Read this before you install. It lists everything a scan reads, and it is built from the same file the agent uses, so it cannot drift from what the agent does.

What a scan sends

Nothing. kiyesi scan reads the server, prints a report and saves it on the same server. It makes no network request. Only a server you connect with kiyesi connect sends anything: what it sends once connected is listed below, field by field.

What it reads

25 of the 25 checks are built today. Each one reads only what is listed here. Where a check needs root, the reason is given; without root, that part is skipped and never counted as passed.

Health

Load

The 15-minute load average in /proc/loadavg and the number of CPU cores in /proc/cpuinfo.

No root needed

Memory and swap

Memory and swap totals in /proc/meminfo.

No root needed

Disk

The mounted file systems in /proc/self/mounts, and the space and inodes on each.

No root needed

Containers

Each container's state, restart count and health status, read from the Docker socket.

Root for part of it The Docker socket can be read only by root and the docker group.

Out-of-memory kills

The kernel log for the last 24 hours, through journalctl or /var/log/kern.log. In the background, kills are noted as they happen from the system log the agent already follows, so the log is never searched; a scan by hand searches the last 24 hours.

Root for part of it On Ubuntu the kernel log can be read only by root and the adm group.

SSL certificates

The certificates in /etc/letsencrypt/live, Caddy's certificate folders, and the certificate files named in nginx and Apache settings.

Root for part of it Certificate folders such as /etc/letsencrypt/live can be read only by root.

Backups

The age of the newest file in each backup folder named in /etc/kiyesi/config.yaml, and that file itself, read through once when it is new (gzip, zip, tar, and PostgreSQL and MySQL dumps), to check it would restore. Nothing is unpacked or sent.

Root for part of it Backup folders are often readable only by root.

Pending updates

The security updates apt has waiting, from a dry run that changes nothing (apt-get -s upgrade, in the background only when the package lists or the installed packages changed, and at least once a day), and the date Kiyesi first saw each one.

No root needed

Security fixes for the system

The system and its version in /etc/os-release, whether Ubuntu Pro's extended fixes are on in /var/lib/ubuntu-advantage/status.json, and the end-of-life dates built into kiyesi, from the vendors' own pages: ubuntu.com/about/release-cycle and Ubuntu's end-of-life announcements, debian.org/releases and wiki.debian.org/LTS, and Red Hat's life-cycle page, with endoflife.date for the rest. Nothing is downloaded. The date is the last day of free security fixes: for Debian, of its long-term support; for Red Hat and its rebuilds, of Maintenance Support. It warns from 90 days before.

No root needed

Security

Open ports

The ports listening on public addresses, from /proc/net/tcp and /proc/net/tcp6, and the ports Docker publishes.

No root needed

Exposed databases

Whether MongoDB, Redis, PostgreSQL or MySQL listen on a public address or are published by Docker, and whether the firewall on this server blocks them.

Root for part of it Reading the firewall rules needs root.

Docker bypassing the firewall

The ports Docker publishes on all addresses, and the ufw rules for them.

Root for part of it Reading the ufw rules and the Docker socket needs root.

SSH settings

/etc/ssh/sshd_config and the files in /etc/ssh/sshd_config.d.

No root needed

Firewall

Whether ufw, firewalld or an nftables or iptables rule set is on.

Root for part of it When ufw and firewalld are off, reading nftables or iptables rules needs root.

Login attack protection

Whether fail2ban, sshguard or CrowdSec is running, and whether SSH allows password login.

No root needed

Secrets in files

Environment files, Compose files and shell history in the folders listed under secrets.paths in /etc/kiyesi/config.yaml. Kiyesi reports where a secret is, never its value.

Root for part of it Other users' files and /root can be read only by root.

Risky containers

Each running container's settings for privileged mode, mounted volumes and user, read from the Docker socket.

Root for part of it The Docker socket can be read only by root and the docker group.

Known vulnerabilities

System packages and container images, checked by Trivy if it is already installed. Kiyesi never downloads Trivy or its database during a scan.

Root for part of it Trivy needs root to read every system package and the Docker socket.

Leftovers

Env files and wp-config.php in the folders under secrets.paths and the web roots, for debug and development settings (the setting's name, never another value); each running container's image and environment; Git folders in /var/www and the other web roots; the sizes of files in /var/log and of containers' logs; and Docker's own count of images and build cache nothing uses.

Root for part of it The Docker socket, containers' logs and other users' files can be read only by root.

Signs of a break-in

The programs in the system folders, compared with the checksums their packages installed (dpkg's lists, or rpm -V; once a day in the background); each running process's name, program path and command line, to look for a miner's words (only the name and path are kept); /etc/crontab, /etc/cron.d, the cron folders and users' cron tables, systemd's units in /etc/systemd/system and users' own, and /etc/rc.local; /etc/passwd; the dates of users' authorized_keys files; /etc/ld.so.preload; where users' .bash_history points; and the dates and sizes of the sign-in log and the system log. Never a file's contents beyond these, and never a command line, which may hold secrets.

Needs root Other users' cron tables, login keys and programs can be read only by root, and "no signs" without them would mislead.

Data location

Server location

The cloud provider's own details: /run/cloud-init/instance-data.json, the maker in /sys/class/dmi/id/sys_vendor, and the provider's metadata address on its local network (169.254.169.254). Nothing is sent there; the scan only reads the region.

No root needed

Database connections

The database hosts in env files, Compose files and connection settings in the folders under secrets.paths, and in running containers' environments, by the setting's usual names or by a value that is a database's address. Only the host and port are kept, never the user or password.

Root for part of it Other users' files and /root can be read only by root.

Backup destinations

The storage targets in rclone settings, restic repositories, AWS CLI settings, and the backup commands in cron jobs and scripts under secrets.paths.

Root for part of it rclone settings and cron jobs in /root and other users' folders can be read only by root.

Outside services

The log, monitoring, email and SMS services named in env files, Compose files and running containers' environments, such as Sentry, SMTP hosts, Twilio and Termii.

Root for part of it Other users' files and /root can be read only by root.

Payment data tag

The databases listed under payment_data in /etc/kiyesi/config.yaml.

No root needed

What it sends once connected

A one-off kiyesi scan sends nothing. After kiyesi connect, the agent sends these to the service address you gave, over HTTPS only, and accepts no incoming connection:

  • The scan report, every 15 minutes: the same grade, findings, fixes and data-location rows you see in the terminal. Host names and ports of databases and backups are sent; user names, passwords and tokens are not.
  • A heartbeat, every minute: the time, so a server that stops reporting can be noticed.
  • With every batch: a one-way hash of the machine ID, so the same server is recognised; the ID itself never leaves the server. The ID is read once, when the agent starts, from /etc/machine-id or /var/lib/dbus/machine-id; with neither, nothing is sent in its place.
  • Measurements, every minute: CPU in use, the number of CPU cores and the 1-minute load (/proc/stat, /proc/loadavg); memory and swap in use (/proc/meminfo); each disk's used and total space (/proc/self/mounts and the file system's own sizes); bytes a second in and out on the real network interfaces (/proc/net/dev); and for each running container, its name, CPU and memory (Linux's own counters under /sys/fs/cgroup, and the Docker container list).
  • Requests, every minute, when a web server log is there: for each endpoint, such as GET /api/users/:id, the number of requests, how many failed (status 500 and above), and the average and slowest-5% times. They are read from /var/log/nginx/access.log, or the output of an nginx, Caddy, OpenResty or Traefik container. The query string is dropped, and parts of a path that look like an id, a code or an email address become :id, so no value from a request leaves the server. At most 100 endpoints a minute are sent; the rest are added up as "other". These counts carry no addresses, headers or bodies. (The log lines below are different: they are the lines as your web server wrote them.)
  • Events, as they happen: a container restarted, a container's image changed (with the new image's name), or a process was killed for using too much memory (/proc/vmstat and Docker).
  • Log lines, every minute: new lines only, as they were written, with when, where from and their level. From the output of every running container (Docker's logs API); from /var/log/nginx/access.log and /var/log/nginx/error.log, which hold visitors' addresses and the paths they asked for; and from the system log (journalctl): every line of the services you installed in /etc/systemd/system and of cron, and only warnings and errors from the rest of the system and the kernel. SSH, sudo, su and login records are never sent unless you set logs.auth: true, nor the firewall's blocked-connection lines unless you set logs.firewall: true. At most 2,000 lines and 1 MB a minute, each line at most 8 KB. You can turn log lines off, or leave out any container, service or text, in the logs section of /etc/kiyesi/config.yaml: see Choose what is sent.
  • A new sign-in, when it happens: each minute the agent reads SSH's own "Accepted" lines from the system log (journalctl --identifier=sshd --identifier=sshd-session), and only for a user and address not seen before on this server it sends the user's name, the address, how they signed in (such as publickey) and when. Nothing else from the sign-in records is sent. The pairs already seen are kept in /var/lib/kiyesi/signins.json, readable by root only. Set logins: off in /etc/kiyesi/config.yaml to turn it off: see A sign-in nobody expected.

Before anything leaves the server, every value is masked: passwords in addresses, settings whose names say they hold a secret, passwords given to tools such as mysql -p and redis-cli -a, and known token shapes all become [masked]. The service masks everything again before it stores it. Each batch has an id, so a batch sent twice is stored once.

Timed jobs

Every 15 minutes the agent reads /etc/crontab, /etc/cron.d/, the crontabs in /var/spool/cron/, and the services in /etc/systemd/system started by a timer, to find the jobs that call kiyesi job done, and sends each job's name, its schedule and when it runs next. It sends nothing else from those files. kiyesi job start and kiyesi job done record each run's start, end and exit code in /var/lib/kiyesi/runs, which the agent sends and then deletes. They never start a job: it runs on its own, from its crontab or timer. See Watch scheduled jobs.

Databases

Only the databases you list under databases in /etc/kiyesi/config.yaml are read, every 5 minutes, with the read-only user you made for Kiyesi. For each one the agent sends its name, its engine and version, whether it is on this server or hosted elsewhere, its size and the limit it is measured against, connections in use and allowed, how many slow queries it counted in the last hour (MySQL, MariaDB, Redis and Valkey count them themselves), and the time of the newest file in its backups folder. Never a row, a table or collection name, a query's text, the address or the password: those stay in the settings file. See Watch a database.

What is installed

When it changes, and at least once a day, the agent sends what is installed, for tips and advisories: the system's name and version and the kernel's; each package with its source package and version, from dpkg or apk, or on the Red Hat family from rpm -qa (which only reads, and runs only when the package database changed, at most every 6 hours); each container's name, image, memory limit and restart policy; Docker's log settings; the memory and swap sizes; whether automatic security updates are on; and, for comparing two servers, the TCP ports listening on a public address, the systemd services running (by name, from systemctl list-units, which only reads), whether SSH allows passwords and root and on which ports, which firewall is on, and the time zone. Apart from rpm -qa, it reads files only. For the data map, the scan's data-location rows also carry each database's and backup's host name and provider, never a port, user or password.

Who can sign in with a key

When run as root, when they change and at least once a day, the agent sends the SSH keys that open the server, for the access map: for each account with a shell (and root), each line of ~/.ssh/authorized_keys and authorized_keys2 as its fingerprint (the SHA256 that ssh-keygen -l prints), its type, its comment (such as ada@laptop), whether the line has options that limit it, and when the file last changed. Never the key itself, and never the options' values. Files that are links, not plain files, or over 256 KB are left out.

Beside a managed service

Run as kiyesi agent --container beside an app on Render, Heroku, Fly.io or another platform (see Run the agent beside it), the agent never scans and reads nothing of the machine, which belongs to the platform. It sends a heartbeat each minute, the databases in its settings as above, and each run kiyesi job done records. It reads its address and token from KIYESI_API and KIYESI_TOKEN, its settings from KIYESI_CONFIG, and keeps results waiting to be sent in the temporary folder.

What platforms send

A platform link receives what the platform itself sends: log lines, requests, figures and deploy notices. They go through the same pipeline as the agent's results: every value is masked by the same rules before it is queued, and each send is stored once. Of a Vercel request, only its method, path, answer and time are kept, never the visitor's address or browser. A Fly.io read-only token is kept encrypted, as are platforms' signing secrets; the link's own token is kept only as a hash, and is masked in every access log.

The browser snippet

The snippet you add to a frontend's pages (see Report errors from your frontend) sends, for each uncaught error, unhandled promise rejection or failed request: the error's type, message and stack, the page address without its query or fragment, the app version you set, and the request ID it added. For each of your site's own requests that took a second or more (see Follow a request), at most 20 a page, it sends the request's method, path without its query, answer, time taken and ID. It never reads what people type, cookies, storage or the page's content. The service names the browser and counts people with a hash salted afresh each day; it keeps neither the browser's own string nor the address it came from.

Backups

The backups check reads the newest file in each folder under backups.paths through once, when it is new, to check it would restore: gzip, zip and tar files, and PostgreSQL and MySQL text dumps. It reads only, unpacks nothing to disk, sends nothing of the file, and stops at 1 GB. It remembers each file's name, size and time in /var/lib/kiyesi/state.yaml, so the file is read once and a backup that suddenly shrinks is noticed.

What it writes

A scan changes nothing on the server. It writes only its own files: the report, kept as /var/lib/kiyesi/report-<date>.txt (or in ~/.local/state/kiyesi/ when run without root), with the last 30 kept, and /var/lib/kiyesi/state.yaml, which records the day it first saw each waiting security update.

kiyesi connect also writes the token to /etc/kiyesi/token, readable by root only, the service address to /etc/kiyesi/agent.yaml, and the system service to /etc/systemd/system/kiyesi.service. Results that cannot be sent wait in /var/lib/kiyesi/outbox, which never grows past 20 MB: the oldest are dropped first. The service's reply to each batch names the home country your team chose, if any; the agent keeps those two letters in /var/lib/kiyesi/team-home-country so its scans compare with your choice.

kiyesi job start and kiyesi job done write each run's start and end to /var/lib/kiyesi/runs, which any user may write to but only root may read; the agent sends them and deletes them. A run's user is whoever owns its file, never what the file says, and the agent reads at most 25 runs of one user at a time. The settings you write yourself, such as logs, containers and databases, are in /etc/kiyesi/config.yaml; a database's address and password stay there and are never sent.

What it changes: nothing

Kiyesi never changes the server. sudo kiyesi fix lists each problem with why it matters and the commands that fix it, for you to review and run. sudo kiyesi keys remove shows the files a login key is in and the command that takes it out. sudo kiyesi guard runs only the command you give it, saves a copy of /etc in /var/lib/kiyesi/guard first (readable by root only; password hashes and private keys are never copied), and shows the commands that put the settings back. Changes kiyesi fix made before 0.40.0 keep their records in /var/lib/kiyesi/fixes, for sudo kiyesi fix undo.

On your own computer, kiyesi login keeps its token in the macOS Keychain, Windows Credential Manager or the Linux Secret Service, or in ~/.config/kiyesi/login.yaml (readable by you only) where there is neither, with the team you chose with kiyesi team use.

The rules it keeps

  • It never changes your server. Kiyesi only reads and suggests: every fix is a command you review and run yourself.
  • Public code. The agent's code is public at github.com/Kiyesi/agent, copied there with each release, so anyone can read what it does before installing it. This page lists all of it too.
  • Local by default. A one-off scan sends nothing off the server.
  • Secrets never leave. It reports that a secret exists and where, never its value.
  • Outgoing only. It opens no port and accepts no incoming connection.
  • Easy to remove. One command uninstalls it.
  • No AI and no third parties, unless you choose. Findings go only to the service's own storage; Kiyesi never sends them to an AI. If an owner allows it, a person's own AI assistant can read what they can see, through kiyesi mcp.

The trust rules page explains each one.