Skip to content

Move CSS mask-image from inline data: to files#11258

Merged
timja merged 5 commits intojenkinsci:masterfrom
daniel-beck:mask-images-in-files
Nov 4, 2025
Merged

Move CSS mask-image from inline data: to files#11258
timja merged 5 commits intojenkinsci:masterfrom
daniel-beck:mask-images-in-files

Conversation

@daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Nov 2, 2025

Once done with them all, we'll be able to disallow data: images sources in Content-Security-Policy. See #23863 for more context.

This migrates images from inline data: to files. I kept them unchanged, just fixing up percent-encoded HTML entities.

Without the change to webpack.config.js the build would fail.

Testing done

Changed the CSP plugin config to disallow data: as img-src, enforced it, and clicked around on the UI. No findings were reported. Screenshots indicate it works:
Screenshot 2025-11-02 at 16 53 53 Screenshot 2025-11-02 at 16 53 42 Screenshot 2025-11-02 at 16 53 40 Screenshot 2025-11-02 at 16 53 38 Screenshot 2025-11-02 at 16 51 34 Screenshot 2025-11-02 at 16 51 31

Setup wizard:
Screenshot 2025-11-03 at 09 20 27
Screenshot 2025-11-03 at 09 20 21

Proposed changelog entries

  • Migrate CSS mask-image attribute values from inline data: to files for better compatibility with restrictive Content-Security-Policy settings.

Proposed changelog category

/label internal,web-ui

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@comment-ops-bot comment-ops-bot bot added internal web-ui The PR includes WebUI changes which may need special expertise labels Nov 2, 2025
timja
timja previously approved these changes Nov 2, 2025
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

LGTM

@timja
Copy link
Member

timja commented Nov 3, 2025

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Nov 3, 2025
@daniel-beck daniel-beck dismissed timja’s stale review November 3, 2025 08:25

significant changes since

@daniel-beck daniel-beck requested a review from timja November 3, 2025 08:25
@daniel-beck daniel-beck removed the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Nov 3, 2025
@daniel-beck
Copy link
Member Author

I had to amend this in 54d0522 so went ahead and did the setup wizard too (0006a71)

@daniel-beck daniel-beck added the squash-merge-me Unclean or useless commit history, should be merged only with squash-merge label Nov 3, 2025
@janfaracik
Copy link
Member

Not a blocker - but any thoughts on exposing Symbols through an API so we don't duplicate them?

@timja
Copy link
Member

timja commented Nov 3, 2025

Not a blocker - but any thoughts on exposing Symbols through an API so we don't duplicate them?

It would be better definitely although this isn't making the status quo any worse than before and it makes it easier to understand where the duplication is for a refactor.

@timja
Copy link
Member

timja commented Nov 3, 2025

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Nov 3, 2025
@timja timja merged commit 45c2842 into jenkinsci:master Nov 4, 2025
19 checks passed
@daniel-beck daniel-beck deleted the mask-images-in-files branch November 4, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback squash-merge-me Unclean or useless commit history, should be merged only with squash-merge web-ui The PR includes WebUI changes which may need special expertise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants