Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/selftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ jobs:
if-no-files-found: error

action-official:
name: action official ${{ matrix.os }}
name: action official ${{ matrix.os }} ${{ matrix.version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: ['1.3.16', '1.3.17']
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Official examples must pass
Expand All @@ -49,15 +50,17 @@ jobs:
files: testdata/official/*.xml
syntax: auto
fail-on: failed-assert
version: ${{ matrix.version }}

action-mutants:
name: action mutants ${{ matrix.os }}
name: action mutants ${{ matrix.os }} ${{ matrix.version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: ['1.3.16', '1.3.17']
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Mutants must fail the job
Expand All @@ -68,6 +71,7 @@ jobs:
files: testdata/mutants/*.xml
syntax: auto
fail-on: failed-assert
version: ${{ matrix.version }}
- name: Require failure and exact ids
env:
MUTANT_OUTCOME: ${{ steps.mutants.outcome }}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This Action is licensed under the European Union Public Licence (EUPL) version 1.2.

Vendored EN16931 XSLT and official example invoices are ConnectingEurope eInvoicing-EN16931 release validation-1.3.16, also under EUPL 1.2. See NOTICE.
Vendored EN16931 XSLT (releases validation-1.3.17 and validation-1.3.16) and official example invoices (validation-1.3.17) are ConnectingEurope eInvoicing-EN16931 artefacts, also under EUPL 1.2. See NOTICE.

The full licence text follows.

Expand Down
16 changes: 12 additions & 4 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,31 @@ NOTICE
See LICENSE and LICENSE-EUPL-1.2.txt.

2. Vendored XSLT (unmodified copies)
© ConnectingEurope / European Commission, Licence: EUPL 1.2

vendor/en16931-1.3.17/xslt/EN16931-CII-validation.xslt
vendor/en16931-1.3.17/xslt/EN16931-UBL-validation.xslt
Release: eInvoicing-EN16931 validation-1.3.17 (12 October 2026 UTC)
Source: https://github.com/ConnectingEurope/eInvoicing-EN16931/releases/tag/validation-1.3.17
Licence text: vendor/en16931-1.3.17/LICENSE.txt
SHA256: vendor/en16931-1.3.17/XSLT.SHA256SUMS

vendor/en16931-1.3.16/xslt/EN16931-CII-validation.xslt
vendor/en16931-1.3.16/xslt/EN16931-UBL-validation.xslt
© ConnectingEurope / European Commission
Release: eInvoicing-EN16931 validation-1.3.16 (13 April 2026 UTC)
Licence: EUPL 1.2
Source: https://github.com/ConnectingEurope/eInvoicing-EN16931/releases/tag/validation-1.3.16
Licence text: vendor/en16931-1.3.16/LICENSE.txt
SHA256: vendor/en16931-1.3.16/XSLT.SHA256SUMS

3. Official examples (unmodified copies)
testdata/official/*.xml
Same release, same licence. SHA256: testdata/official/SHA256SUMS
Release validation-1.3.17, same licence. SHA256: testdata/official/SHA256SUMS

4. Mutants (modified copies — EUPL article 5)
testdata/mutants/*.xml
Each file is a one-line semantic modification of an official example,
dated 16 August 2026, used only to prove the runner reports
dated 16 August 2026 (CII_example3.xml re-derived from the 1.3.17
example on 18 October 2026), used only to prove the runner reports
svrl:failed-assert. See testdata/MUTANTS.md.

This Action reports what the official XSLT emits. It does not certify
Expand Down
91 changes: 64 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

[![Self-test EN16931 action](https://github.com/facturxapi/validate-einvoice/actions/workflows/selftest.yml/badge.svg)](https://github.com/facturxapi/validate-einvoice/actions/workflows/selftest.yml) [![EN16931 upstream drift](https://github.com/facturxapi/validate-einvoice/actions/workflows/upstream-drift.yml/badge.svg)](https://github.com/facturxapi/validate-einvoice/actions/workflows/upstream-drift.yml) [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Validate%20EN16931-blue?logo=github)](https://github.com/marketplace/actions/validate-en16931-e-invoice)

GitHub Action that runs the official ConnectingEurope EN16931 1.3.16
XSLT artefacts (CII and UBL) on XML invoices and reports every
`svrl:failed-assert`.
GitHub Action that runs the official ConnectingEurope EN16931 XSLT
artefacts (CII and UBL) on XML invoices and reports every
`svrl:failed-assert`: 1.3.16 by default, 1.3.17 opt-in until it takes
effect on 15/11/26.

A green job means: the vendored 1.3.16 stylesheets produced zero
A green job means: the vendored stylesheets of the selected version
(1.3.16 by default, 1.3.17 with `version: '1.3.17'`) produced zero
`svrl:failed-assert` on the files you passed. The Action does not call
a remote API, does not read PDF attachments, and does not certify a
document.
Expand All @@ -17,9 +19,35 @@ document.

| Ref | What it is |
|---|---|
| `@v1` | **Mutable** major tag (Marketplace channel). It moves to each new `v1.x.y`; it points at `v1.1.2` (`a805a904`, checked 2026-10-12). |
| `@v1.1.2` | Release tag, never moved once published. |
| `@a805a904f9fa1a7d51db5a4160e863748cc3733d` | Full commit SHA of `v1.1.2`: the frozen tree. |
| `@v1` | **Mutable** major tag (Marketplace channel). It moves to each new `v1.x.y`; it points at `v1.2.0` (EN16931 1.3.16 by default, 1.3.17 opt-in). |
| `@v1.2.0` | Release tag, never moved once published. Default rules 1.3.16; `version: '1.3.17'` selects 1.3.17. |
| `@v1.1.2` | Previous release, 1.3.16 only (`a805a904f9fa1a7d51db5a4160e863748cc3733d`). |
| Full commit SHA of a release | The frozen tree. Each release's notes give it. |

### EN16931 1.3.17: opt-in until 15/11/26

The Commission's [registry of EN16931 artefacts](https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108974/Registry+of+supporting+artefacts+to+implement+EN16931)
lists 1.3.17 as published on 12/10/26 and in force from 15/11/26. Until
then 1.3.16 stays the default and 1.3.17 is opt-in: set
`version: '1.3.17'`. A later release, `v1.3.0` (planned for 16/11/26),
makes 1.3.17 the default and `@v1` will move to it; `version: '1.3.16'`
will still select 1.3.16.

1.3.17 renames the IGIC and IPSI rules (upstream
[#519](https://github.com/ConnectingEurope/eInvoicing-EN16931/issues/519)),
and not the same way in both syntaxes:

| Rules | 1.3.16 | 1.3.17 CII | 1.3.17 UBL |
|---|---|---|---|
| IGIC (`L`) | `BR-AF-01`…`10` | `BR-IP-01`…`10` | `BR-IG-01`…`10` |
| IPSI (`M`) | `BR-AG-01`…`10` | `BR-IG-01`…`10` | `BR-IP-01`…`10` |

It also removes `CII-SR-471`. A `fail-on` id written for the other
version does not fail the job: the Action prints a `::warning` naming
the id it uses instead, per syntax, and keeps filtering on it
(`CII-SR-471` is ignored with a warning under 1.3.17). An id that the
selected XSLT does not contain under either name is a configuration
error (exit 2), since it could never fire.

Every release from `v1.1.1` on pins third-party Actions by commit SHA,
installs Python dependencies with `--require-hashes`, and refuses
Expand All @@ -34,10 +62,10 @@ invoices with a DOCTYPE or external entities before Saxon runs.
files: invoices/**/*.xml
```

**Downstream consumer**, frozen on the `v1.1.2` commit:
**Downstream consumer**, frozen on a release commit (SHA from the release notes):

```yaml
- uses: facturxapi/validate-einvoice@a805a904f9fa1a7d51db5a4160e863748cc3733d # v1.1.2
- uses: facturxapi/validate-einvoice@<full-commit-sha> # v1.2.0
with:
files: invoices/**/*.xml
```
Expand All @@ -54,8 +82,8 @@ Copy-paste workflow: [`examples/validate-invoices.yml`](examples/validate-invoic

## Which FacturX repo should I use?

- [validate-einvoice](https://github.com/facturxapi/validate-einvoice) — GitHub Action that runs the official ConnectingEurope EN16931 1.3.16 XSLT artefacts (CII/UBL).
- [en16931-oracles](https://github.com/facturxapi/en16931-oracles) — Replayable fixtures, receipts and mutants for that same 1.3.16 pin, plus a BR-FR pack for the French Flux2 rules (France_RFE `v1.4.0.02` / `v1.4.0.03`).
- [validate-einvoice](https://github.com/facturxapi/validate-einvoice) — GitHub Action that runs the official ConnectingEurope EN16931 XSLT artefacts (CII/UBL): 1.3.16 by default, 1.3.17 opt-in.
- [en16931-oracles](https://github.com/facturxapi/en16931-oracles) — Replayable fixtures, receipts and mutants for EN16931 1.3.17, plus a BR-FR pack for the French Flux2 rules (France_RFE `v1.4.0.02` / `v1.4.0.03`).
- [awesome-einvoicing](https://github.com/facturxapi/awesome-einvoicing) — Sourced map of specs, validators, libraries and corpora. Inclusion is not a ranking.

## Public self-test (24 Aug 2026)
Expand Down Expand Up @@ -83,11 +111,17 @@ When this repository is checked out as the workflow repo (or vendored):

```yaml
# Frozen — full commit SHA of a release
- uses: facturxapi/validate-einvoice@a805a904f9fa1a7d51db5a4160e863748cc3733d # v1.1.2
- uses: facturxapi/validate-einvoice@<full-commit-sha> # v1.2.0
with:
files: invoices/**/*.xml
fail-on: failed-assert

# Opt in to EN16931 1.3.17 (in force from 15/11/26)
- uses: facturxapi/validate-einvoice@v1
with:
files: invoices/**/*.xml
version: '1.3.17'

# Mutable — @v1 major tag (follows the latest v1.x.y)
- uses: facturxapi/validate-einvoice@v1
with:
Expand All @@ -113,8 +147,8 @@ When this repository is checked out as the workflow repo (or vendored):
|---|---|---|---|
| `files` | yes | — | Glob(s) of XML invoices, relative to the workspace. Separate several globs with a newline or a comma. Zero matches fail the job (exit 2). |
| `syntax` | no | `auto` | `auto` reads the document-element namespace. `cii` / `ubl` force one syntax and fail if the document does not match. |
| `fail-on` | no | `failed-assert` | `failed-assert`: any `svrl:failed-assert` fails the job. `never`: report only. Comma-separated ids: fail only if one of those ids fires. |
| `version` | no | `1.3.16` | Only the vendored 1.3.16 artefacts are shipped. Any other value is a configuration error. |
| `fail-on` | no | `failed-assert` | `failed-assert`: any `svrl:failed-assert` fails the job. `never`: report only. Comma-separated ids: fail only if one of those ids fires. An id renamed between 1.3.16 and 1.3.17 is translated with a warning; an id the selected XSLT does not contain under either name is a configuration error (exit 2). |
| `version` | no | `1.3.16` | `1.3.16` or `1.3.17` (opt-in until it takes effect on 15/11/26), the two vendored releases. Any other value is a configuration error. |

## Outputs

Expand All @@ -138,15 +172,18 @@ and a markdown table on the job summary. Invoice bytes are never logged.
The oracle is the pair of official XSLT files, hashed on every run.
A different stylesheet is a different oracle; pins are not auto-updated.

| Syntax | Vendored file | SHA256 |
|---|---|---|
| CII | `vendor/en16931-1.3.16/xslt/EN16931-CII-validation.xslt` | `0b234dea2bbfee739b7761e607a992c17fab88773014ef56355b6158cfb1cc53` |
| UBL | `vendor/en16931-1.3.16/xslt/EN16931-UBL-validation.xslt` | `39f9d282867f1a49e7708d9e29a53da89643e1ee56f10cec1ebcf1277595fcbd` |

Source of those octets: ConnectingEurope
`eInvoicing-EN16931` tag `validation-1.3.16`
(`en16931-cii-1.3.16.zip` / `en16931-ubl-1.3.16.zip`, inner path
`xslt/EN16931-*-validation.xslt`). Machine-readable pins:
| Version | Syntax | Vendored file | SHA256 |
|---|---|---|---|
| 1.3.17 (opt-in) | CII | `vendor/en16931-1.3.17/xslt/EN16931-CII-validation.xslt` | `0757f07909938b1b297b8356ab7b66406c89f1b342325385d6a2def998c817f0` |
| 1.3.17 (opt-in) | UBL | `vendor/en16931-1.3.17/xslt/EN16931-UBL-validation.xslt` | `fc4e6cfa8596bba0c2abd19038a98960c6ee9fc1f44566787c115efd4f4aca7c` |
| 1.3.16 (default) | CII | `vendor/en16931-1.3.16/xslt/EN16931-CII-validation.xslt` | `0b234dea2bbfee739b7761e607a992c17fab88773014ef56355b6158cfb1cc53` |
| 1.3.16 (default) | UBL | `vendor/en16931-1.3.16/xslt/EN16931-UBL-validation.xslt` | `39f9d282867f1a49e7708d9e29a53da89643e1ee56f10cec1ebcf1277595fcbd` |

Source of those octets: ConnectingEurope `eInvoicing-EN16931` tags
[`validation-1.3.17`](https://github.com/ConnectingEurope/eInvoicing-EN16931/releases/tag/validation-1.3.17)
and `validation-1.3.16` (`en16931-cii-<version>.zip` /
`en16931-ubl-<version>.zip`, inner path `xslt/EN16931-*-validation.xslt`).
Machine-readable pins of the latest release:
[`vendor/upstream.json`](vendor/upstream.json).

The weekly workflow [`.github/workflows/upstream-drift.yml`](.github/workflows/upstream-drift.yml)
Expand Down Expand Up @@ -187,13 +224,13 @@ unit tests, and run the identity gate. Any difference is a failure.
- Not Factur-X / ZUGFeRD packaging, not PDF/A-3, not veraPDF.
- Not a certification and not a product benchmark.
- Not an official ConnectingEurope Action. It only runs the official
ConnectingEurope EN16931 1.3.16 XSLT artefacts.
ConnectingEurope EN16931 XSLT artefacts (1.3.16, 1.3.17).

## Licence

EUPL 1.2 for this Action. The vendored XSLT and the official examples
are ConnectingEurope EN16931 `validation-1.3.16`, also EUPL 1.2,
unmodified. Mutants are modified copies (see `NOTICE`).
EUPL 1.2 for this Action. The vendored XSLT (`validation-1.3.17` and
`validation-1.3.16`) and the official examples (`validation-1.3.17`) are
ConnectingEurope EN16931 artefacts, also EUPL 1.2, unmodified. Mutants are modified copies (see `NOTICE`).

## See also

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

| Release line | Supported | Hardening controls below |
|---|---|---|
| `v1` major tag (**mutable**, points at `v1.1.2`) | yes | **yes** |
| `v1.1.1`, `v1.1.2` | yes | **yes** |
| `v1` major tag (**mutable**, points at `v1.2.0`) | yes | **yes** |
| `v1.1.1`, `v1.1.2`, `v1.2.0` | yes | **yes** |
| `v1.0.0`, `v1.1.0` | no — move to `v1` or the latest `v1.x.y` | **no** |
| `main` | development only | checked on every push |

Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Validate EN16931 e-invoice'
description: >-
Run the official ConnectingEurope EN16931 1.3.16 XSLT on Factur-X /
Run the official EN16931 1.3.16 XSLT (1.3.17 opt-in) on Factur-X /
ZUGFeRD CII XML and UBL XML; fail on svrl:failed-assert.
author: 'euphyra-dev'

Expand All @@ -24,11 +24,15 @@ inputs:
description: >-
failed-assert (default): any svrl:failed-assert fails the job.
never: write the report only.
Comma-separated rule ids: fail only if one of those ids fires.
Comma-separated rule ids: fail only if one of those ids fires; an id
renamed between 1.3.16 and 1.3.17 is translated with a warning.
required: false
default: 'failed-assert'
version:
description: 'EN16931 XSLT version. Only the vendored 1.3.16 artefacts are shipped.'
description: >-
EN16931 XSLT version: 1.3.16 (default) or 1.3.17 (opt-in until it
takes effect on 15/11/26). Only these vendored, unmodified
ConnectingEurope artefacts are shipped.
required: false
default: '1.3.16'

Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASE_AND_RULESET.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document describes the **expected** GitHub settings for `facturxapi/validat

| Artifact | Policy |
|---|---|
| Marketplace major tag `v1` | **Mutable** convenience channel, moved to each new `v1.x.y`. It points at `a805a904` (`v1.1.2`, checked 2026-10-12). |
| Marketplace major tag `v1` | **Mutable** convenience channel, moved to each new `v1.x.y`. It points at `v1.2.0` (EN16931 1.3.16 by default, 1.3.17 opt-in). |
| Patch tags `v1.x.y` | Immutable once published; never force-move. Release notes name the tagged commit SHA. |
| `main` | Integration branch; must pass all CI gates before tag cut. |

Expand Down
8 changes: 4 additions & 4 deletions examples/validate-invoices.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Example workflow for this repository (same-repo checkout).
#
# Downstream consumers: pin `facturxapi/validate-einvoice@<40-char-sha>` from the
# release notes (v1.1.2: a805a904f9fa1a7d51db5a4160e863748cc3733d). The moving
# `@v1` tag is a mutable convenience channel that follows the latest v1.x.y.
# release notes. The moving `@v1` tag is a mutable convenience channel that
# follows the latest v1.x.y. The default rules are EN16931 1.3.16; set
# `version: '1.3.17'` to opt in before 1.3.17 takes effect on 15/11/26.

name: Validate EN16931 invoices

Expand All @@ -25,14 +26,13 @@ jobs:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Run official EN16931 1.3.16 XSLT
- name: Run official EN16931 XSLT
id: en16931
uses: ./
with:
files: testdata/official/*.xml
syntax: auto
fail-on: failed-assert
version: '1.3.16'

- name: Show verdict
if: always()
Expand Down
Loading
Loading