Skip to content

Check unique elementIds and device functions in the HTML view - #31

Merged
fabianekc merged 1 commit into
mainfrom
element-ids-device-features
Oct 25, 2026
Merged

fabianekc merged 1 commit into
mainfrom
element-ids-device-features

Conversation

@fabianekc

Copy link
Copy Markdown
Member

Runs three new passport criteria of dpp-criteria, all proposed.

element_ids (DPP-DAT-017, DPP-DAT-021)

  • Expanded full serialization: the elementIds are compared within each array of data elements (unique: level). These arrays are the elements of the passport, of a DataElementCollection and of a MultiValuedDataElement, and the value of a MultiValuedDataElement whose items carry an elementId. A repeated elementId fails, and the message names the level.
  • Across the whole passport (unique: passport): an elementId used at two places gives a warning. Places that differ only in the item of a MultiValuedDataElement count as one, and an elementId already repeated within one level is not reported again.
  • Compressed serialization: level reads the passport as delivered (the response bytes, or the posted body) with a small scanner (JsonDuplicates). It reports any member name that occurs twice in one JSON object, with its normalized path. passport is skipped. A compressed passport without its bytes is skipped as well.

html with device_features: forbidden (DPP-SEC-021)

The check is static and runs no script.

  • Scripts: dpplint searches the inline scripts, event handler attributes and javascript: URLs of the HTML view for browser interfaces that use functions of the reader's device. It also fetches up to 10 scripts that the page loads from its own host and searches the first 2 MB of each.
  • Markup: dpplint also flags frames granted device permissions, file inputs with capture, and permission and geolocation elements.
  • Limits: scripts from other hosts are not fetched; DPP-SEC-014 already fails for them.

Test vectors

Criterion Vectors
DPP-DAT-017 4 valid, 4 invalid (test/fixtures/files/element_ids/)
DPP-DAT-021 2 valid, 2 that warn (test/fixtures/files/element_ids/)
DPP-SEC-021 5 valid, 8 invalid, plus 3 scripts on the page's own host (test/fixtures/files/html/)

The unit tests run every vector. Integration tests cover the posted reference passport and changed copies of it, and a compressed passport with a repeated member name.

Both reference passports pass all three criteria.

The image is built with the dpp-criteria commit that adds the criteria. kubernetes/deployment.yaml names its digest.

element_ids (DPP-DAT-017, DPP-DAT-021): in the expanded full
serialization, elementIds are compared within each array of data
elements, or across the whole passport with the items of a
MultiValuedDataElement counted as one place. In the compressed
serialization the level check reads the passport as delivered (the
response, or the posted body) and reports member names repeated within
one JSON object; the passport-wide check is skipped there.

html with device_features: forbidden (DPP-SEC-021): without running any
script, the inline scripts, event handler attributes and javascript:
URLs of the HTML view and the scripts it loads from its own host are
searched for browser interfaces that use functions of the reader's
device, and the markup for frames granted device permissions, file
inputs with capture and permission elements.

Test vectors for the three criteria under test/fixtures/files; the image
is built with the dpp-criteria commit that adds them.
@fabianekc
fabianekc merged commit b9058ab into main Oct 25, 2026
2 checks passed
@fabianekc
fabianekc deleted the element-ids-device-features branch October 25, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant