Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-71034] [JENKINS-71035] [JENKINS-71036] [JENKINS-71037] Improve CSP compatibility #7893

Merged
merged 6 commits into from Jul 7, 2023

Conversation

yaroslavafenkin
Copy link
Contributor

@yaroslavafenkin yaroslavafenkin commented Apr 28, 2023

Testing done

Tested manually whether the behaviour is the same before and after the fix. Did certain modifications in Java code to make it easier to reach corresponding Jelly templates.
Unsure if the UI part has any test coverage. I can try to write some unit tests for certain bits to make sure functionality isn't broken if you tell me it's needed.

Proposed changelog entries

  • Improve CSP compatibility by un-inlining javascript code

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

@jenkinsci/core-security-review

Maintainer checklist

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

  • 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).

@yaroslavafenkin yaroslavafenkin requested a review from a team April 28, 2023 13:26
@yaroslavafenkin yaroslavafenkin added needs-security-review Awaiting review by a security team member web-ui The PR includes WebUI changes which may need special expertise labels Apr 28, 2023
@Wadeck
Copy link
Contributor

Wadeck commented May 1, 2023

Failures seem related to some ATH changes, re-triggered the build to see if it's confirmed or not.

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label May 3, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label May 4, 2023
@daniel-beck daniel-beck self-requested a review May 12, 2023 13:13
@NotMyFault NotMyFault requested a review from a team May 19, 2023 07:57
Copy link
Contributor

@Kevin-CB Kevin-CB left a comment

Choose a reason for hiding this comment

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

I tested each of these changes locally, they all seems good and correctly remove the reported CSP warnings.

@Kevin-CB Kevin-CB added security-approved @jenkinsci/core-security-review reviewed this PR for security issues and removed needs-security-review Awaiting review by a security team member labels Jun 8, 2023
@NotMyFault NotMyFault requested review from a team and removed request for a team June 23, 2023 10:52
@NotMyFault NotMyFault requested a review from a team June 23, 2023 10:52
@NotMyFault NotMyFault changed the title Improve CSP compatibility [JENKINS-71034] [JENKINS-71035] [JENKINS-71036] [JENKINS-71037] Improve CSP compatibility Jun 26, 2023
@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 Jun 26, 2023
@timja timja merged commit ca92a22 into jenkinsci:master Jul 7, 2023
16 checks passed
@NotMyFault NotMyFault added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted security-approved @jenkinsci/core-security-review reviewed this PR for security issues web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
6 participants