Release note · August 6, 2026
A method has an attribute boundary
XMLDSIG's two direct SignedInfo method declarations each have one required attribute: Algorithm. DocFence 0.64 now enforces that small attribute grammar before treating a recognized OPC package signature as structurally valid.
Parameters are children, not attributes
XMLDSIG's CanonicalizationMethodType and SignatureMethodType require Algorithm and declare no other attributes. Their schemas do permit parameter elements, so DocFence keeps that distinction explicit:
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">
<method:Parameter xmlns:method="urn:example"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod
Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256">
<method:Parameter xmlns:method="urn:example"/>
</ds:SignatureMethod>
In 0.64, an extra or missing attribute closes the recognized signature shape. Parameter child markup remains outside this bounded check; DocFence does not parse a parameter, execute canonicalization, recompute a digest, or verify XMLDSIG.
A small rule at the right boundary
The check belongs where DocFence already requires the fixed direct SignedInfo order: CanonicalizationMethod, SignatureMethod, then one or more references. The canonicalization URI must still be one of OPC's two permitted forms, and the signature-method URI must still be nonblank. This addition prevents unrecognized method attributes from being treated as ordinary metadata without broadening the tool into a general XMLDSIG validator.
Evidence and use
The 73-test suite now rejects an extra attribute on either method while accepting schema-permitted parameter children. Across the 29 DOCX files in the public OOXML Signature Security artifacts, all 21 parseable signature parts use only Algorithm on both method kinds. Every captured profile outcome matches 0.63 byte-for-byte.
Two independent epoch-fixed builds were byte-identical. SHA-256: wheel b5ae20ee7164ce323a77776d42d8568e71b1b7ea7a0d31694e84bb6cb7b7ad42; source distribution a4a23e70d3e0ee419ebedfc57f3f4b447f72e55541bcd61f841480db1ba1a8ba.
python -m pip install https://github.com/SybilGambleyyu/docfence/releases/download/v0.64.0/docfence-0.64.0-py3-none-any.whl
docfence check approved.docx candidate.docx --policy docfence.yml --format sarif --output docfence.sarif
The tagged policy reference, threat model, and validation notes define the boundary. A static assurance tool should distinguish an allowed method parameter from undeclared direct method metadata.