Skip to content

(#527)(#528) Support Content Security Policy#529

Merged
corbob merged 4 commits intomainfrom
choco-theme/2.8.0
Apr 29, 2026
Merged

(#527)(#528) Support Content Security Policy#529
corbob merged 4 commits intomainfrom
choco-theme/2.8.0

Conversation

@st3phhays
Copy link
Copy Markdown
Member

Description Of Changes

The changes here:

  • Updates classes and scripts to support a Content Security Policy on Chocolatey Central Management.
  • Adds classes to the safe-list for Chocolatey Central Management.
  • Removes the blockUi and pwstrength-bootstrap packages.
  • Upgrades packages to their latest minor or patch release.

Motivation and Context

These changes are necessary for the next version of Chocolatey Central Management, and for supporting a Content Security Policy.

Testing

  1. On the PR that consumes this GitHub branch, run yarn and yarn choco-theme.
  2. Ensure all specific tests to that repository pass.

Operating Systems Testing

Developer VM 4.

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?
  • All items are complete on the Definition of Done.

Related Issue

This adds a few social icons to the safe-list for the
@chocolatey-software/ccm package. These will be needed for future
functionality.
@st3phhays st3phhays self-assigned this Apr 23, 2026
@st3phhays st3phhays requested a review from corbob April 23, 2026 21:24
The changes here will support the enforcement of a Content Security
Policy on Chocolatey Central Management. While Chocolatey Central
Management is the focus of this, changes will effect multiple packages
in choco-theme. For the most part, changes are limited to the addition
of new classes so that inline styles are not used.

Two libraries have been removed in favor of custom JavaScript. The
`block-ui` and `pwstrength-bootstrap` packages internally applied inline
styles to elements, which is prohibited for a valid Content Security
Policy. These libraries were easily replaced or removed by using
custom JavaScript, as seen in the newly added blockUI() and unBlockUI()
functions.
@st3phhays st3phhays force-pushed the choco-theme/2.8.0 branch 5 times, most recently from 1029a2e to 1baa84c Compare April 25, 2026 23:44
This removes the jstree library and replaces it
with custom styles for the permissions tree in
Chocolatey Central Mangaement. The jstree library
is being removed because it does not enforce a
CSP.
@st3phhays st3phhays marked this pull request as ready for review April 28, 2026 13:37
@st3phhays st3phhays requested a review from a team as a code owner April 28, 2026 13:37
@st3phhays st3phhays requested a review from pauby April 28, 2026 13:37
This upgrades all packages to their latest minor and patch versions,
and bumps choco-theme to 2.8.0.
@st3phhays st3phhays requested review from vexx32 and removed request for pauby April 28, 2026 16:06
Copy link
Copy Markdown
Member

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

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

I think this one's good from a codeowner perspective, although I've not taken it for a spin locally as yet.

Copy link
Copy Markdown
Member

@corbob corbob left a comment

Choose a reason for hiding this comment

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

LGTM!

@corbob corbob merged commit 86735ca into main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants