Skip to content

Conversation

@daniel-beck
Copy link
Member

JENKINS-74745

This removes the inline JS in favor of an a link. This link works even when Jenkins 2.539+ enforces Content Security Policy, prohibiting inline scripts.

#457 discusses problems with the feature as it currently exists, so it's not clear to me what the supported use cases are. If the use case is indeed showing the image in an iframe, this PR will not help, unless administrators use https://plugins.jenkins.io/csp/ to relax the frame-ancestors directive (which is still better than having to allow script-src 'unsafe-inline' though).

Testing done

Accessed the image URL directly. With valid ?link value, click opens new tab. Without, no link. With and without CSP enforcement.

In an iframe, without CSP enforcing frame-ancestors, it also works.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@daniel-beck daniel-beck requested a review from a team as a code owner December 9, 2025 11:26
@MarkEWaite MarkEWaite added the bug Incorrect or flawed behavior label Dec 9, 2025
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks!

@MarkEWaite MarkEWaite merged commit d878e68 into jenkinsci:master Dec 12, 2025
18 checks passed
@daniel-beck daniel-beck deleted the JENKINS-74745 branch December 12, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Incorrect or flawed behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[JENKINS-74745] [embeddable-build-status] Extract inline event handler in StatusImage

2 participants