microsoft / microsoft/AdaptiveCards

[JS render] Trusted-types for adaptivecards-designer

Open
#7,842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Task
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Part of the changes are drafted, and then reverted in #7819

  • How to test designer change after you make trusted-types changes.

Edit the html directly from developer's tool provided by brower.

  <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';" />
  • Reference

TT docs: https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API
A Guide to TT: https://web.dev/trusted-types/
TT w3c spec: https://w3c.github.io/webappsec-trusted-types/dist/spec/

  • Problem of adaptivecards-designer
fileNote.innerHTML =
            `By using the upload feature you agree to our <a href=${privacyLink} target='_blank'><span class='link'> image usage policy</span></a>`;

And possible fix

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the adaptivecards-designer JavaScript render path by locating the fileNote.innerHTML assignment shown in the issue. Add the CSP meta tag through browser developer tools to reproduce the Trusted Types failure, then verify that the upload notice renders correctly under the policy and that the relevant designer behavior remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.