mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-07-25 16:15:47 +00:00
Add sealed CI integration: a GitHub Action and a GitLab CI template
scripts/validate.sh is the engine behind both platforms: download the released standalone jar and the validation configuration (SHA-256-verified when pinned), validate each document, print PASS/FAIL with the failing rule ids and fail on any rejection. The GitHub Action (action.yml) maps its inputs onto the script's environment; the GitLab template fetches the same script from this repository at KOSIT_SCRIPT_REF and drives it with the same variables, so both platforms run identical logic. With Docker available the action executes each validation sealed (the "sealed" input, default "auto"): inside an eclipse-temurin:21-jre container without network access, a read-only root and no capabilities, with only the jar, the configuration and a scratch directory mounted; downloads always happen outside the container, so the validator itself never touches the network, and the host JVM setup is skipped entirely for "sealed: always". The image tag pins the Java 21 JRE contract and floats the patch level: the released jars are the checksummed artifacts, the runtime is a security-patch channel; an "image" input (KOSIT_IMAGE on GitLab) accepts a digest-pinned reference for stricter policies. The GitLab job image is the same runtime, giving both platforms an identical execution environment, and a devcontainer provides the matching Maven and Java setup for development. The action self-test validates a conformant XRechnung reference instance and asserts a corrupted one is rejected, exercising the sealed path through the empty-input fallback and an explicit image override, plus the host path.
This commit is contained in:
parent
86d9ddfa2b
commit
ba93207b77
7 changed files with 445 additions and 0 deletions
6
.devcontainer/Dockerfile
Normal file
6
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Development container for the validator: Maven 3 with Temurin 21, the
|
||||
# same Java family the CI action and the GitLab template execute the
|
||||
# released jar with (eclipse-temurin:21-jre). The tag pins that contract
|
||||
# and floats the patch level, so JDK and Maven security updates arrive
|
||||
# without a change to this repository.
|
||||
FROM maven:3-eclipse-temurin-21
|
||||
7
.devcontainer/devcontainer.json
Normal file
7
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "KoSIT Validator",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"postCreateCommand": "mvn --version"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue