Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ass Xmlsecurity Laravel Package

burti/ass-xmlsecurity

burti/ass-xmlsecurity adds XML security helpers to Laravel, protecting against XXE and XML injection attacks by safely parsing and sanitizing untrusted XML input. A small utility package for apps that handle XML from external sources.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit This is not a Laravel package — it is a raw PHP library for XML Encryption (XMLEnc) and XML Signature (XMLDSig), with no service provider, facade, config file, or container bindings. That is not disqualifying: XML canonicalization and signature validation are exactly the kind of low-level primitive that should not be Laravel-aware. The real fit question is whether the application has any legitimate need for XML crypto at all. In a Laravel estate that means SAML 2.0 SSO, SOAP/WS-Security, SAML assertions in OAuth flows, e-invoicing (UBL, FacturaE, FatturaPA), or a handful of legacy payment/B2B gateways. If none of those are on the roadmap, this is a dead dependency before it is written.

Integration feasibility Mechanically trivial: composer require (assuming it resolves on Packagist under the burti/ass-xmlsecurity name), autoload the namespace, wrap the signing and verification calls in one or two application services. The library will require ext-dom, ext-libxml, and ext-openssl, which are present on virtually every PHP runtime. There is no framework coupling to fight.

The problem is not mechanical feasibility, it is provenance. Zero stars, zero dependents, a personal/organizational repo (CasaVaticano), and a name that reads like a fork implies this is an internal extraction — likely derived from robrichards/xmlseclibs or simplesamlphp/xml-security. There is no visible CI badge, release history, or security policy in the metadata provided.

Technical risk — this is the dominant concern

  • Crypto code with no community scrutiny. XMLDSig is a minefield: signature wrapping, XPath/XSLT transform abuse, entity expansion, canonicalization mismatches, algorithm confusion, and key-info spoofing. A zero-adoption library in this domain means zero adversarial review. You are the first security researcher to look at it.
  • Single-maintainer abandonment. 0 dependents means no downstream pressure to fix CVEs, no ecosystem detection when it breaks, and no upgrade path if the maintainer stops.
  • Dependency and version opacity. Unclear PHP version floor, unclear libxml2/OpenSSL compatibility, unknown default algorithm set (SHA-1 legacy support is a red flag; RSA-SHA256/ECDSA support is table stakes).
  • Duplication of a solved problem. simplesamlphp/xml-security and robrichards/xmlseclibs are mature, widely deployed, and actively audited. Choosing the fork without a documented reason is unjustifiable in a design review.

Key questions

  1. Is this a fork? Of what commit/version, and what is the diff? A one-commit delta for a vendor-specific quirk is defensible; an unbounded fork is not.
  2. Is it on Packagist, and does it have tagged releases with semver?
  3. Who is the security contact, and is there a private disclosure channel?
  4. What algorithms are enabled by default, and can SHA-1 be disabled?
  5. Does it harden against XXE (LIBXML_NOENT handling, libxml_disable_entity_loader / PHP 8 defaults)?
  6. Is there a test suite, and does it include negative test vectors (tampered signatures, wrapped assertions)?
  7. What is the actual business driver — SAML, SOAP, e-invoicing — and is there a maintained library that already serves it?

Integration Approach

Stack fit Treat this as an infrastructure primitive, not an application dependency. Wrap it behind two narrow interfaces — XmlSigner and XmlVerifier — bound in a dedicated service provider. Nothing in the domain layer should ever import the vendor namespace. This gives you a clean seam to swap in simplesamlphp/xml-security later without touching call sites.

Migration path Recommended sequence: do not adopt this package first. Start with the maintained alternative (simplesamlphp/xml-security if SAML, robrichards/xmlseclibs if generic). Only migrate to this fork if a concrete, documented defect in the upstream forces it — and then vendor it as a patch, not as a replacement. If the team has already committed to burti/ass-xmlsecurity, plan the abstraction layer from day one so exit cost is one class.

For SAML specifically, the right answer is almost never a raw XML crypto library. Use a maintained SP package (onelogin/php-saml / laravel-saml2) that owns the protocol-level defenses — assertion replay, audience restriction, InResponseTo, clock skew — which a signing library does not provide.

Compatibility Pin the PHP floor explicitly in composer.json and verify against the target matrix (e.g., PHP 8.1–8.3). Confirm libxml2 ≥ 2.9 and OpenSSL 3.x behavior — the OpenSSL 3 provider transition changed RSA key handling and has broken poorly-maintained crypto code. Confirm the library does not rely on libxml_disable_entity_loader(), which was deprecated in PHP 8.0.

Sequencing

  1. Spike: validate one real signature end-to-end against a known-good IdP or vendor sample.
  2. Security review: read the signing/verification code paths and the canonicalization handling. This is non-negotiable and should be timeboxed to one engineer-day.
  3. Abstraction layer + contract tests with golden XML fixtures (valid, tampered, expired cert, wrong key, wrapped assertion).
  4. Integrate one consumer only; keep the blast radius to a single flow.
  5. Document the fork rationale in an ADR so the next engineer does not repeat this analysis.

Operational Impact

Maintenance You will own this. With zero dependents, there is no upstream community to absorb bug fixes, so every libxml2/OpenSSL/PHP upgrade becomes your regression test. Budget ~2–4 days per year of proactive maintenance plus reactive time on any TLS/crypto stack change. The abstraction layer is what keeps that cost bounded.

Support No issue triage, no CVE feed, no release cadence. If a signature-validation bypass is disclosed in the upstream library this was forked from, you will not be notified — you will have to monitor the upstream project manually. That is a real operational obligation, not a theoretical one.

Scaling Non-issue in the usual sense. XML signing and verification are CPU-bound (canonicalization plus one RSA operation), roughly single-digit milliseconds per document at 2048-bit RSA. Auth flows and e-invoicing run at low QPS, so this will never be the bottleneck. The scaling concern is memory and parser safety: never parse untrusted XML into a DOM without size limits and entity expansion disabled. For high-volume document signing, keep the signing key in a KMS/HSM rather than in application memory, which this library will not do for you.

Failure modes to instrument

  • Silent verification failure — canonicalization or namespace-prefix differences cause valid signatures to fail. Log the canonicalized form, not just "invalid."
  • Algorithm drift — peer rotates to SHA-256 or a new key size and the library's allowlist rejects it.
  • Certificate expiry and key rotation — the classic 2 a.m. outage. Alert on cert expiry at 30/14/7 days.
  • Clock skew — NotBefore/NotOnOrAfter windows failing on container drift. Run NTP.
  • XXE / entity expansion — parser-level, must be mitigated at configuration.
  • Library abandonment — no upgrade available when the next PHP minor lands.

Ramp-up Moderate to high. A competent Laravel engineer can integrate this in a day; understanding why a signature failed takes XMLDSig expertise — exclusive canonicalization, enveloped vs. detached signatures, ID attribute resolution, transform chains. Assume 3–5 days of ramp-up for one engineer to reach genuine confidence, and treat that engineer as the designated owner. Do not let this become a library that "several people sort of touched."

Recommendation Low opportunity score (17) and zero adoption are consistent with the assessment: this is a provenance-unclear fork of a solved problem. Adopt only with a documented fork rationale and a mandatory security read-through; otherwise standardize on simplesamlphp/xml-security or a maintained SAML SP package and keep the abstraction seam regardless.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route