Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make task-lists-elements CSP Trusted Types compatible#35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lgarron merged 1 commit intomainfrompse-paved-paths/trusted-types-compatibility
Jan 9, 2023

Conversation

KyFaSt
Copy link
Contributor

This change makes task-lists-elements compatible with theCSP directive Trusted Types. This CSP directive allows developers to mark a value as a Trusted Type, usually this would be done in conjunction with running some type of sanitizer like DOMPurify to ensure the value doesn't contain any unsafe elements. Fortunately, task-lists-elements doesn't have major violations, just this one. Unfortunately the change in this PR does not buy any security benefits, it just adheres to the Trusted Types API -- not passing bare strings directly to potentially dangerous injection sinks. Currently this implementation is the best way to make this library compatible with trusted types.

@KyFaStKyFaSt requested a review froma team as acode ownerDecember 21, 2022 14:27
@KyFaStKyFaStforce-pushed thepse-paved-paths/trusted-types-compatibility branch fromda82936 to8fc70a8CompareDecember 21, 2022 14:28
* this change doesn't actually add any security to task-lists-elements, it effectively  just adheres to the trusted types API by not passing bare strings directly  to
@KyFaStKyFaStforce-pushed thepse-paved-paths/trusted-types-compatibility branch from8fc70a8 to98a446cCompareDecember 21, 2022 14:30
@primer-css
Copy link

👋 Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.

  • 🎨If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
  • If this is a PR that includes changes to an interaction, please include avideo recording in the description.
  • ⚠️If this is urgent, please visit us in#primer on Slack and tag the first responders listed in the channel topic.

Copy link
Member

@fletchto99fletchto99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good from a pse-architecture perspective! Its unfortunate we need to be so verbose for something like this but unfortunately we have no way to indicate that aninnerHTML is coming from a hardcoded string 😓

@lgarronlgarron changed the title Make task-lists-elements Trusted Types compatible Make task-lists-elements CSP Trusted Types compatibleJan 9, 2023
@lgarronlgarron merged commit99c72d4 intomainJan 9, 2023
@lgarronlgarron deleted the pse-paved-paths/trusted-types-compatibility branchJanuary 9, 2023 19:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@keithamuskeithamuskeithamus approved these changes

@fletchto99fletchto99fletchto99 approved these changes

@colebemiscolebemiscolebemis approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@KyFaSt@primer-css@keithamus@fletchto99@colebemis@lgarron

[8]ページ先頭

©2009-2025 Movatter.jp