Questions from https://www.w3.org/TR/security-privacy-questionnaire/
2.1. What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?
This feature exposes the image/svg+xml
MIME type to the clipboard using the async clipboard API to support copy-paste of SVG images. All the restrictions related to secure context, permission etc apply for reading this format. During write()
, the format is parsed using the DOMParser
that uses an XML parser to return a well-formed SVG document. During read()
, image/svg+xml
is strictly processed by-default using the HTML fragment parser that inlines styles and also strips out security-sensitive tags. If image/svg+xml
is in the unsanitized
list, then it's returned without any processing.
2.2. Do features in your specification expose the minimum amount of information necessary to enable their intended uses?
Yes.
2.3. How do the features in your specification deal with personal information, personally-identifiable information (PII), or information derived from them?
No PII information is exposed in this new clipboard format support.
This feature doesn't deal with any sensitive information.
2.5. Do the features in your specification introduce new state for an origin that persists across browsing sessions?
No.
2.6. Do the features in your specification expose information about the underlying platform to origins?
No.
Yes. This exposes a new image/svg+xml
MIME type to the clipboard using the existing async clipboard API. The content is processed using the DOMParser
that uses an XML parser to return a well-formed SVG document before it gets written to the clipboard.
No.
No.
No.
2.11. Do features in this specification allow an origin some measure of control over a user agent’s native UI?
No.
None.
2.13. How does this specification distinguish between behavior in first-party and third-party contexts?
It doesn't distinguish between behavior in first-party and third-party contexts as the async clipboard APIs already have restrictions via Permissions.
2.14. How do the features in this specification work in the context of a browser’s Private Browsing or Incognito mode?
It works the same way in incognito mode.
2.15. Does this specification have both "Security Considerations" and "Privacy Considerations" sections?
Yes. https://docs.google.com/document/d/1jq8QSCQRdNy99rnPusmW8is62c22PVuq-Sk-tMT2tRk/edit?usp=sharing.
No.
No interaction with documents regardless of its state. Web authors have to provide the SVG image content via the async clipboard APIs.
N/A
No threat.
The API is only available from a secure context.
It doesn't leak data across origins.
No interaction with third-party pages.
We don't think there is any risk of legitimate misuse of this API. Browser parses the SVG image string provided by the web author before the parsed content is written to the system clipboard. The target apps that reads this data will not be at risk of parsing malformed SVG images.