CINC Auditor is the free build (Apache 2.0 licence) of Chef InSpec: it replays compliance controls written as code against a server or a container, and tells you, rule by rule, what passes and what fails against a baseline such as the CIS Benchmarks or the US Department of Defense STIGs. This lesson is for the DevSecOps engineer who wants to prove the posture of an image, not just list its CVEs.
Everything is measured on 1 October 2026 with the cincproject/auditor image
in 7.2.1: the community profile linux-baseline 2.11.0 runs 59
controls on an nginx container, of which 39 are skipped because they
target the kernel. The scan exits with code 100 as soon as a control fails,
and fails outright on a distroless image, which has no shell.
What you will learn
- Scan a running container with the
docker://transport - Design a control profile and replay a recognised profile (
dev-sec/linux-baseline) - Interpret the exit codes and the JSON report to break a CI
- Audit the effective configuration of a service, not just its file
- Work around the limit of distroless images with file system mode
- Produce the evidence for SOCLE-PKG-IMG-1 (in French), an image reduced to what it needs, and for SOCLE-PKG-GEN-3, a hardened base image
What is CINC Auditor?
InSpec is a compliance as code framework (compliance expressed as
code): you describe the expected state of a system in a readable DSL, for
example "/etc/shadow must be 0640", and the tool audits the target by
producing a pass or fail report. Since Progress distributes the InSpec binaries
under a commercial licence, the community project CINC rebuilds the same
source code under Apache 2.0, with no licence to accept.
Compared with OpenSCAP (in French), which consumes XCCDF/SCAP profiles, InSpec audits from the outside, with no agent installed in the target, which suits containers. It is a posture audit, complementary to a vulnerability scanner such as Trivy: one checks how the image is configured, the other which known flaws it contains.
What CINC Auditor does not prove
A green report proves that the target meets the profile's controls, and
nothing more. CINC Auditor does not look for CVEs, does not read the
application code, and only sees what its controls query. On a container, it
cannot judge the kernel either, which is shared with the host: measured,
39 of the 59 linux-baseline controls are skipped for this reason.
Scanning a container through the docker transport
The docker:// transport runs the controls inside a running container,
through the host's Docker socket. The scanner image, an Ubuntu 22.04, does
not contain the docker client: it does not need it, because its docker-api
library talks directly to the socket. Measured in 7.2.1: the scan gives the
same result with or without the client mounted.
Prepare a test target, a Debian nginx that has a shell, then run the scan with a local profile, created in the next section. The scanner itself is pinned by digest, like any tool in the chain.
docker run -d --name cible \ nginx:1.30.5-trixie@sha256:b972f831f200b19ef0767938224f9711e74cd783718738cd7405d5cabf75c442
docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v "$PWD/profiles:/profiles:ro" \ cincproject/auditor:7.2.1@sha256:dba914b29c017d74280278d2f872afff4ff863fd7c807669278155bf760ae368 \ exec /profiles/container-baseline \ -t docker://cible --no-create-lockfile --reporter cliWriting your own controls
An InSpec profile is a folder that contains an inspec.yml file and
controls in controls/. The inspec.yml file describes the profile and
the platforms it supports; platform: os makes it applicable to any Linux
system.
name: container-baselinetitle: Baseline de conformité conteneurmaintainer: vouslicense: Apache-2.0version: 0.1.0supports: - platform: osEach control carries an identifier, an impact from 0 to 1 that
expresses its severity, a title and describe assertions. These two controls
check that there is no package manager in the final image and the
permissions of /etc/shadow.
control 'cnt-1.1-no-package-manager' do impact 0.7 title "Pas de gestionnaire de paquets dans l'image finale" desc "Une image minimale réduit la surface d'attaque (esprit CIS Docker)." describe package('apt') do it { should_not be_installed } end describe package('apk') do it { should_not be_installed } endend
control 'cnt-1.3-shadow-permissions' do impact 0.8 title "/etc/shadow doit être protégé" describe file('/etc/shadow') do it { should exist } its('mode') { should cmp '0640' } endendOn the Debian nginx image, the result is a realistic mix: cnt-1.1 fails
because the apt package manager is installed, cnt-1.3 passes. A control
fails as soon as a single one of its assertions fails.
Profile: Baseline de conformité conteneur (container-baseline)Version: 0.1.0Target: docker://8890c25ab7b0c6af6c5e31a8047e41194a29b8930d3f8c19871dc61662047fb5
× cnt-1.1-no-package-manager: Pas de gestionnaire de paquets dans l'image finale (1 failed) × System Package apt is expected not to be installed expected System Package apt not to be installed ✔ System Package apk is expected not to be installed ✔ cnt-1.3-shadow-permissions: /etc/shadow doit être protégé ✔ File /etc/shadow is expected to exist ✔ File /etc/shadow mode is expected to cmp == "0640"
Profile Summary: 1 successful control, 1 control failure, 0 controls skippedTest Summary: 3 successful, 1 failure, 0 skippedReading the exit codes and the JSON report
The exit code is what a CI reads to decide. CINC Auditor distinguishes
four, measured on the profiles of this lesson: it does not settle for 0 or 1,
and a pipeline that tests $? -ne 0 would treat as a failure a scan where
some controls were merely skipped.
| Measured situation | Exit code |
|---|---|
All executed controls pass (--controls cnt-1.3-shadow-permissions) | 0 |
| At least one control fails (full profile on nginx) | 100 |
No failure, but at least one control skipped by only_if | 101 |
| Platform not detected (distroless image) | 1 |
To archive evidence, add a second reporter: the option
--reporter cli json:/out/rapport.json displays the report and writes the
JSON in the same run. The file carries the tool version, the detected
platform and the status of each assertion:
jq '{version, platform, controls: [.profiles[0].controls[] | {id, impact, status: [.results[].status]}]}' rapport.json{ "version": "7.2.1", "platform": { "name": "debian", "release": "13.7" }, "controls": [ { "id": "cnt-1.1-no-package-manager", "impact": 0.7, "status": ["failed", "passed"] }, { "id": "cnt-1.3-shadow-permissions", "impact": 0.8, "status": ["passed", "passed"] } ]}This JSON, attached to the CI job, serves as the hardening report for the
audit. The reporter also accepts junit, html and yaml.
Replaying a recognised profile
There is no need to write every control: the dev-sec community maintains
ready-to-use profiles, and CINC Auditor can fetch them from a GitHub
archive. Pin the version in the URL, here the 2.11.0 tag published on
17 September 2026, so that two successive scans compare the same thing.
docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ cincproject/auditor:7.2.1@sha256:dba914b29c017d74280278d2f872afff4ff863fd7c807669278155bf760ae368 \ exec https://github.com/dev-sec/linux-baseline/archive/refs/tags/2.11.0.tar.gz \ -t docker://cible --no-create-lockfile --reporter cliProfile Summary: 17 successful controls, 3 control failures, 39 controls skippedTest Summary: 60 successful, 5 failures, 39 skippedThe 39 skipped controls are sysctl settings: their only_if clause
disables them in a container, which shares the host's kernel. The 3
failures concern login.defs (os-05), the permissions of the cron
directories (os-13) and the noexec option of mount points (os-14). These
are full-system findings: on an application image, several are handled by
a documented exception rather than by a fix.
The case of distroless images
A distroless image, such as Chainguard's or gcr.io/distroless, has no
shell and no system utilities. The docker:// transport needs them to detect
the platform: measured on cgr.dev/chainguard/nginx, the scan stops with
code 1.
Train::PlatformDetectionFailed: Sorry, we are unable to detect your platformThe simplest workaround is file system mode: you export the container
content with docker export, then scan this folder with the tooling of the
scanner, not that of the target. The diagram compares the two paths.
The controls must then prefix each path with the extracted root, passed as a profile input. This reduced profile checks that there is no shell and no package manager:
name: rootfs-baselinetitle: Baseline sur un système de fichiers extraitmaintainer: vouslicense: Apache-2.0version: 0.1.0inputs: - name: rootfs value: /ciblesupports: - platform: osrootfs = input('rootfs')
control 'img-1.1-no-shell' do impact 0.7 title "Pas de shell dans l'image" describe file(File.join(rootfs, 'bin/sh')) do it { should_not exist } endend
control 'img-1.2-no-package-manager' do impact 0.7 title "Pas de gestionnaire de paquets dans l'image" %w[usr/bin/apt sbin/apk usr/bin/apk].each do |bin| describe file(File.join(rootfs, bin)) do it { should_not exist } end endendmkdir rootfsdocker export cible-distroless | tar -x -C rootfs # as root to keep the ownersdocker run --rm -v "$PWD/rootfs:/cible:ro" -v "$PWD/profiles:/profiles:ro" \ cincproject/auditor:7.2.1@sha256:dba914b29c017d74280278d2f872afff4ff863fd7c807669278155bf760ae368 \ exec /profiles/rootfs-baseline --no-create-lockfile --reporter cliMeasured: the distroless image passes the 2 controls (code 0), while the
same profile applied to the export of the Debian nginx reports 2 failures
(code 100), since /bin/sh and apt are present. Run without root, tar
refuses to recreate the device files and assigns every file to the current
user: a control that checks owners then becomes wrong.
Auditing the effective config, not just the file
This is the decisive advantage of a tool that runs commands in the target.
On Linux, the configuration applied by a service cannot be read from its
main file alone: it results from the Include directives, the
drop-ins such as /etc/ssh/sshd_config.d/*.conf, and the daemon's default
values.
The case was reproduced on a Debian 13 image: sshd_config says
PermitRootLogin no, but a drop-in 00-debug.conf, read first, overrides
it with yes. Two controls, two opposite verdicts:
# Reading the file: ignores the drop-in, PASSES wronglydescribe file('/etc/ssh/sshd_config') do its('content') { should match(/^PermitRootLogin\s+no/i) }end
# Effective configuration: sshd -T resolves Include and drop-ins, FAILS rightlydescribe command('sshd -T') do its('stdout') { should match(/^permitrootlogin\s+no$/i) }endProfile Summary: 1 successful control, 1 control failure, 0 controls skippedThe reflex is to audit the resolved source, never the file alone. The table gives the command that displays the effective configuration of the most common building blocks; ask any compliance scanner the same question: does it read the file or what the service applies?
| Building block | Effective configuration command |
|---|---|
| SSH | sshd -T |
| Kernel | sysctl -a (not /etc/sysctl.conf) |
| systemd | systemctl show <unit> |
| Nginx | nginx -T |
When to choose CINC Auditor
CINC Auditor is not a vulnerability scanner: it is a compliance auditor. You choose it when you must prove that a CIS or STIG baseline is met on containers or servers, when the team already writes InSpec, or when you want versioned, testable controls in CI. For CVEs, pair it with Trivy or Grype (in French); for deeper system hardening, with the CIS Benchmarks (in French) and OpenSCAP.
In the SOCLE baseline, its report serves as evidence for the packaging requirements: SOCLE-PKG-IMG-1, an image reduced to what it needs, and SOCLE-PKG-GEN-3, a minimal and hardened base image. The controls of this lesson, no shell and no package manager, translate them directly. Applied to the image of a CI runner, the same report also serves SOCLE-ORC-ITG-1. CINC Auditor is not in the cited tooling of any of these requirements: it proves the state of the image, never the pipeline configuration.
Key points
- CINC Auditor is the Apache 2.0 build of Chef InSpec, with no licence to accept; measured here in 7.2.1.
- The
docker://transport goes through the Docker socket: thedockerclient does not need mounting, but the socket gives root access to the host. - A profile mounted read-only requires
--no-create-lockfile, otherwiseErrno::EROFS. - Exit codes: 0 everything passes, 100 at least one failure, 101 skipped controls without failure, 1 platform not detected.
linux-baseline2.11.0 on nginx: 17 passed, 3 failures, 39 skipped (shared kernel).- A distroless image is audited in file system mode, after
docker export, with paths prefixed by the root. - You audit the effective configuration (
sshd -T), never the file alone. - The evidence expected by SOCLE-PKG-IMG-1 and PKG-GEN-3 is a minimal and hardened image: the scan JSON, attached to the CI job, is its report.
Knowledge check
Check that you have grasped the essentials of this lesson. The questions only cover what has just been explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: DevSecOps technology watch: sources, tools and routines
A new full quiz with random questions
Work again only on the questions you missed
FAQ: frequently asked questions
The questions below cover the most common doubts about CINC Auditor: the difference with InSpec, the need for the docker client, distroless images and CI integration.
cinc-auditor instead of inspec. The lesson uses the cincproject/auditor image in 7.2.1, pinned by digest.cincproject/auditor 7.2.1: the docker:// transport goes through the docker-api library and talks directly to the Docker socket. Measured, the scan gives the same result with or without the client mounted. The socket, however, remains essential, and it gives the scanner container root-equivalent access to the host.only_if clause. An undetected platform, such as a distroless image, gives 1. A pipeline that only tests $? -ne 0 would therefore treat a scan with no failure as a failure.docker:// transport fails on a distroless image with Train::PlatformDetectionFailed, for lack of a shell. You then switch to file system mode: docker export, extraction into a folder mounted in the scanner, and controls that prefix each path with this root, passed as a profile input. Measured on cgr.dev/chainguard/nginx: 2 controls out of 2 pass.linux-baseline 2.11.0 skips 39 controls out of 59: they are kernel sysctl settings, which the container shares with the host, and their only_if clause disables them. This is expected: these points are checked on the host. That leaves 17 passed controls and 3 failures, on login.defs, the cron directories and the noexec option.