Kai Ole Hartwig
12 min read

Grundschutz++ as code, part 8: The chain to take away

In this series I run the BSI's Grundschutz++ as code: requirements and evidence live in OSCAL files, an open format for security evidence. Parts 1 to 6 describe how that runs in my ISMS. That chain, though, depends on my pipelines, my cluster and my checks. Anyone who wants to rebuild it starts from zero.

After the feedback at the InfoSec-Stammtisch I therefore took out what works without my environment. The result is four building blocks: five checks that only read, a report over a period, a template for your own CI and a page to read the result on.

I use none of them in my ISMS. I built them for others, and that is how I describe them here.

Part 8 of the series “Grundschutz++ as code”. The overview of all parts is further down.

01 — Five checks that only read

My own checks from part 4 know my environment by name. grundschutz-checks, by contrast, holds five checks that need nothing but a configuration: which GitLab instance, which groups and projects, which TLS endpoints.

Each check evidences particular requirements of the catalog. Codes like KONF.14.1 are the numbers Grundschutz++ gives these requirements.

Every check only reads and never writes. The token needs read_api and nothing else. If a check could not look, because a request failed for instance, it writes no result and exits with an error. A check that could not look has not found anything in order either.

Each check writes a run file. results.mjs from grundschutz-worksheets turns it into an OSCAL assessment result, a file that records what was measured and when. That is the same step as in part 4.

 

GITLAB_TOKEN=... node run.mjs branch-protection --config checks.config.json > run.json
node ../grundschutz-worksheets/results.mjs run.json > results.json

02 — Partial is data, not modesty

None of the five checks sees a requirement in full. branch-protection sees the default branch, not every branch. mfa-enforced sees that a second factor is required, but not whether it resists phishing. sbom-present sees that an SBOM exists, but not whether it is complete.

That is why it is in the data. The run file lists such requirements as partial, and their findings carry coverage=partial. The security plan from part 5 takes this over. It is the document that records, per requirement, where things stand. There a passed “partial” stays partial unless another check shows the requirement in full.

Which requirement a check evidences is my judgement. Like the mappings from part 7, no person has reviewed it yet. Anyone who wants to rely on it should hold it against the catalog first.

03 — One night proves one night

A result says what things looked like on one night. An auditor wants to know something else: did the control keep working over the whole period? That is exactly what a SOC 2 Type II report asks, and an ISO or NIS2 audit asks it too.

period.mjs from grundschutz-worksheets reads the results of many runs. Per check and per requirement it says how many runs the period had and how many of them found something not in order. It also names the longest stretch without a single run. That includes the time from the start of the period to the first run and from the last run to the end.

 

node period.mjs results/*.json --from 2026-10-13 --to 2027-01-13 --every 24h

 

With --every you state the cadence the assessment plan promises. The assessment plan is the document that sets what is checked and how often. The report names every longer gap, because for that stretch nothing shows the control working. A missed night is not the end of the world. But it belongs in the report and not under the carpet.

04 — A template that wires it all together

Checks, results, security plan, coverage per standard and the period report are separate tools. Until now only my own environment wired them together. Now there is a template for that: a repository you take into your own GitLab instance.

You fill in three files:

Add one variable with a token that can only read, and a schedule for every night.

The next morning the pipeline holds an OSCAL package, validated against the NIST schema. It contains the profile, the assessment plan, the assessment results, the security plan and the plan of action, the list of what gets fixed by when. Next to it are a coverage report per standard and a report over every night since the first.

Each night's results go into your project's package registry. Pipeline artefacts expire after a while; evidence for an audit period must not. None of it leaves the project.

The template is called grundschutz-starter and has been public since 27 October. Whether the checks in it passed their trial is what the next section is about.

05 — Fourteen nights on trial

In part 6 new sources run on trial before they may speak for a requirement. For checks that others are meant to adopt, that holds all the more. A false finding costs trust there, and I cannot win it back from here.

From 13 to 27 October the five checks therefore ran every night at 3 a.m. Berlin time against my own GitLab, as a test and not as part of my ISMS. The condition was simple: fourteen nights without a false alarm, meaning without a finding that turns out to be none once you look.

The very first run against my GitLab already showed something: the OpenSSL in the image can no longer even offer TLS 1.0 and 1.1. So tls-endpoints tests whether an endpoint refuses those versions with a handshake built by hand. If the check cannot send a handshake, that counts as untested, never as refused.

The trial was not a clean pass. Two things belong in the report:

Every other finding of the fourteen nights was real: releases without an SBOM, projects without a scan job, a default branch without a finished pipeline. branch-protection, mfa-enforced and tls-endpoints found nothing to object to the whole time.

I published the template on 27 October all the same. I only found the false alarm when recounting for this post. Since then dependency-updates no longer counts a canceled helper job next to a passed scan. For this check the trial starts over. The other four have passed it.

06 — A page instead of JSON

At the end of the chain there are JSON files. That is right for tools and wrong for people. Anyone who wants to know where a requirement stands needs the security plan, the assessment result and the plan of action at once, and the BSI catalog on top.

grundschutz-viewer turns that into one HTML page that works without a server and without a network. Every OSCAL file points to the files it builds on, all the way down to the profile and the catalog. The viewer follows these references and checks the SHA-256 checksum given with each. The page names whatever does not match or is missing.

The page has two views. The explorer shows the state, the measurement, the action and the due date for each requirement, along with the history over all runs: one box per run and below it when the measurement changed. The register orders the same requirements by practice. A folder with one subfolder per run makes the history.

 

grundschutz-viewer -o grundschutz.html runs/

 

Since version 0.2.0 the viewer comes as a ready-made program for Linux, macOS and Windows. The macOS builds are signed and notarised by Apple, and a signed checksum file covers all packages. The pictures on the viewer's page show a made-up company with seven nights of the chain.

07 — What of this runs for me

This series keeps apart what runs in my ISMS and what I have only built. For part 8 the answer is short.

Running in my ISMS:

My own checks know my environment and run every six hours.

Not in my ISMS are the five general checks, the period report, the template and the viewer. The checks do run every night against my GitLab, but as a test for others and not as evidence for me. When I write “built” here, that is exactly what I mean.

08 — What the chain to take away is not

09 — The series at a glance

  1. Grundschutz++ against your own documentation: the method, the catalog as a data model, the comparison with IaC and GitOps.
  2. Applicability as data: the statement of applicability as an OSCAL profile.
  3. Containers that say which requirements they meet: a signed component definition on every image the pipeline builds.
  4. Measurement as evidence: checks write their results as OSCAL, dated, signed, impossible to delete.
  5. The ISMS as a build product: security plan, assessment plan, results and plan of action as an OSCAL chain, rebuilt with every measurement.
  6. What no repository knows: the second level, the running system against its code.
  7. One measurement, many standards: NIS2, DORA, C5 and SOC 2 as mappings onto Grundschutz++.
  8. The chain to take away: general checks, the report over a period, a template that wires it all together and a page to read the result on. This post.

Parts 1 to 6 describe what runs in my ISMS. Each appears only once its step runs in operation and has been measured. Parts 7 and 8 show tools I built after feedback at the InfoSec-Stammtisch and do not use myself. The code is in grundschutz-worksheets, grundschutz-checks and grundschutz-viewer. A map of the whole series is OSCAL in practice: eight models, one chain.

Frequently asked questions

Do I need GitLab for this?+

For four of the five checks, yes: they read the GitLab API. tls-endpoints talks to the endpoints directly. The template is built for GitLab CI. The period report and the viewer only need the result files.

Can a check change anything?+

No. Every check only reads, and the token needs no more than read_api. If a check could not look, it writes no result and reports an error.

Where do I find the template?+

On GitHub as grundschutz-starter, public since 27 October. Four of the five checks have passed their trial. For dependency-updates it starts over after a false alarm.

Do I need Go for the viewer?+

No. Since version 0.2.0 there are ready-made programs for Linux, macOS and Windows. With Go 1.27 or newer you can also build it with go install.

Conclusion

A chain that only runs in one environment is an experience report. It becomes something to take away only when someone else gets it going with three files and a schedule and has something to read the next morning.

The most important part of it is not the template but the report over a period. A green night proves one night. Only many nights, with their gaps, say whether a control kept working, and that is exactly what an auditor asks.

I do not use these tools myself. But anyone starting from zero no longer has to start from zero with them.

I bring the chain into your own CI, with checks that only read.

Checks against your GitLab instance and your endpoints, results as OSCAL every night, a report over the whole audit period and a page on which your team reads the state without opening JSON.

Platform operations instead of consulting on paper: if you like, I set up the chain in your environment with you.

Book a call →

About the author

Photo of Kai Ole Hartwig.

Kai Ole Hartwig

Freelance DevSecOps consultant · OnlyOle Consulting

Programming since 2002 – self-taught, set up my own business with KO-Web in 2012. Over 100 projects, with a focus on security, performance, automation and quality. Today freelance: DevSecOps consulting, training and software development.

Newsletter

The week, in one email.

The new advisories and posts, once a week and briefly put in context. You will get a confirmation email first, and opens and clicks are only counted anonymously.

Language