StanzaAPI commited on
Commit ·
fe84c4d
1
Parent(s): 09f4584
Publish factur-x test data
Browse files- CITATION.cff +1 -1
- README.md +1 -1
- adversarial/factur-x-adversarial.csv +0 -0
- adversarial/factur-x-adversarial.json +25 -1
CITATION.cff
CHANGED
|
@@ -4,7 +4,7 @@ title: "Factur-X / ZUGFeRD Test Data"
|
|
| 4 |
abstract: "Well-formed UN/CEFACT Cross Industry Invoice XML with synthetic seller, buyer, and totals for e-invoicing tests."
|
| 5 |
type: dataset
|
| 6 |
license: CC0-1.0
|
| 7 |
-
version: "1.0.
|
| 8 |
date-released: "2026-10-01"
|
| 9 |
authors:
|
| 10 |
- name: "StanzaAPI"
|
|
|
|
| 4 |
abstract: "Well-formed UN/CEFACT Cross Industry Invoice XML with synthetic seller, buyer, and totals for e-invoicing tests."
|
| 5 |
type: dataset
|
| 6 |
license: CC0-1.0
|
| 7 |
+
version: "1.0.2"
|
| 8 |
date-released: "2026-10-01"
|
| 9 |
authors:
|
| 10 |
- name: "StanzaAPI"
|
README.md
CHANGED
|
@@ -41,7 +41,7 @@ https://stanzaapi.com/datasets/factur-x
|
|
| 41 |
|
| 42 |
## Security: adversarial corpus
|
| 43 |
|
| 44 |
-
This dataset ships a catalogued **adversarial corpus** of
|
| 45 |
(injection, XXE, resource exhaustion, encoding attacks, validation bypass, structural confusion,
|
| 46 |
and prompt injection for AI agents) with the safe expected behaviour. See
|
| 47 |
[`adversarial/`](adversarial/) or the [hub](https://stanzaapi.com/datasets/adversarial).
|
|
|
|
| 41 |
|
| 42 |
## Security: adversarial corpus
|
| 43 |
|
| 44 |
+
This dataset ships a catalogued **adversarial corpus** of 12 hostile inputs
|
| 45 |
(injection, XXE, resource exhaustion, encoding attacks, validation bypass, structural confusion,
|
| 46 |
and prompt injection for AI agents) with the safe expected behaviour. See
|
| 47 |
[`adversarial/`](adversarial/) or the [hub](https://stanzaapi.com/datasets/adversarial).
|
adversarial/factur-x-adversarial.csv
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
adversarial/factur-x-adversarial.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"source": "https://stanzaapi.com/datasets/factur-x/adversarial",
|
| 5 |
"license": "CC0-1.0",
|
| 6 |
"format": "factur-x",
|
| 7 |
-
"count":
|
| 8 |
"cases": [
|
| 9 |
{
|
| 10 |
"id": "facturx-xxe",
|
|
@@ -115,6 +115,30 @@
|
|
| 115 |
"expected": "Treat invoice notes as data, never as instructions.",
|
| 116 |
"rationale": "Invoice notes are read by approval agents.",
|
| 117 |
"cwe": "CWE-1426"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
}
|
| 119 |
]
|
| 120 |
}
|
|
|
|
| 4 |
"source": "https://stanzaapi.com/datasets/factur-x/adversarial",
|
| 5 |
"license": "CC0-1.0",
|
| 6 |
"format": "factur-x",
|
| 7 |
+
"count": 12,
|
| 8 |
"cases": [
|
| 9 |
{
|
| 10 |
"id": "facturx-xxe",
|
|
|
|
| 115 |
"expected": "Treat invoice notes as data, never as instructions.",
|
| 116 |
"rationale": "Invoice notes are read by approval agents.",
|
| 117 |
"cwe": "CWE-1426"
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"id": "facturx-bom-prefix",
|
| 121 |
+
"format": "factur-x",
|
| 122 |
+
"category": "encoding",
|
| 123 |
+
"severity": "medium",
|
| 124 |
+
"title": "Byte-order mark before the CII invoice",
|
| 125 |
+
"payload": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\"/>",
|
| 126 |
+
"expected": "Strip the BOM once, at the byte boundary, before the parser runs.",
|
| 127 |
+
"rationale": "A BOM ahead of the declaration splits conforming parsers, so the same Factur-X document is accepted by one access point and rejected by another.",
|
| 128 |
+
"cwe": "CWE-20",
|
| 129 |
+
"evades": "well-formedness (if the BOM is stripped)"
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"id": "facturx-duplicate-grand-total",
|
| 133 |
+
"format": "factur-x",
|
| 134 |
+
"category": "structure",
|
| 135 |
+
"severity": "high",
|
| 136 |
+
"title": "Two grand totals in one invoice",
|
| 137 |
+
"payload": "<ram:SpecifiedTradeSettlementHeaderMonetarySummation><ram:GrandTotalAmount>1.00</ram:GrandTotalAmount><ram:GrandTotalAmount>9999.00</ram:GrandTotalAmount></ram:SpecifiedTradeSettlementHeaderMonetarySummation>",
|
| 138 |
+
"expected": "Reject the duplicate element instead of selecting one value.",
|
| 139 |
+
"rationale": "Well-formed and schema-invalid. Two conforming parsers settle different totals from the same invoice, so a duplicate-payment check that passes on one fails on the other.",
|
| 140 |
+
"cwe": "CWE-20",
|
| 141 |
+
"evades": "well-formedness"
|
| 142 |
}
|
| 143 |
]
|
| 144 |
}
|