Skip to content

Demos: Add Content Security Policy (CSP) validation#32731

Merged
pharret31 merged 25 commits intoDevExpress:26_1from
EugeniyKiyashko:26_1_csp_in_demos
Mar 5, 2026
Merged

Demos: Add Content Security Policy (CSP) validation#32731
pharret31 merged 25 commits intoDevExpress:26_1from
EugeniyKiyashko:26_1_csp_in_demos

Conversation

@EugeniyKiyashko
Copy link
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko self-assigned this Feb 27, 2026
@EugeniyKiyashko EugeniyKiyashko changed the title Demos: run testing with testcafe Demos: run testing Feb 27, 2026
@EugeniyKiyashko EugeniyKiyashko changed the title Demos: run testing Demos: check CSP Feb 27, 2026
@EugeniyKiyashko EugeniyKiyashko changed the title Demos: check CSP Demos: run CSP testing Mar 4, 2026
@EugeniyKiyashko EugeniyKiyashko marked this pull request as ready for review March 4, 2026 09:10
@EugeniyKiyashko EugeniyKiyashko requested a review from a team as a code owner March 4, 2026 09:10
Copilot AI review requested due to automatic review settings March 4, 2026 09:10
@EugeniyKiyashko EugeniyKiyashko changed the title Demos: run CSP testing Demos: Add Content Security Policy (CSP) validation Mar 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automated CSP (Content Security Policy) “report-only” validation for the demos, so CI can detect CSP violations across jQuery + framework demos and publish a consolidated report.

Changes:

  • Introduces an Express-based CSP report-only server for demos, plus scripts to run CSP checks and summarize violations.
  • Extends TestCafe visual tests to inject a CSP violation listener and write violations into a report file when enabled.
  • Adds GitHub Actions jobs to run CSP checks per framework and generate a merged step summary + artifacts.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
package.json Adds a root-level script to start demos with the CSP server.
apps/demos/utils/visual-tests/inject/csp-listener.js Captures securitypolicyviolation events in the browser during tests.
apps/demos/utils/server/csp-server.js Implements CSP Report-Only middleware, report endpoints, and nonce injection for framework demos.
apps/demos/utils/server/csp-report-summary.js Adds a CLI summarizer for CSP violation reports.
apps/demos/utils/server/csp-check.js Adds a headless Chrome crawler to visit demo pages and query CSP violations from the server.
apps/demos/testing/common.test.ts Optionally injects the CSP listener and writes JSONL violation output during TestCafe runs.
apps/demos/package.json Adds scripts to run CSP server/check/report and a CSP-enabled TestCafe run.
apps/demos/.gitignore Ignores generated csp-reports/ output.
.github/workflows/visual-tests-demos.yml Adds CI jobs to run CSP checks per framework and publish a consolidated report.

Copilot AI review requested due to automatic review settings March 4, 2026 09:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

@pharret31 pharret31 requested a review from a team as a code owner March 4, 2026 11:57
Copilot AI review requested due to automatic review settings March 4, 2026 12:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Copilot AI review requested due to automatic review settings March 4, 2026 14:20
@dmlvr dmlvr requested a review from a team as a code owner March 4, 2026 14:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 4, 2026 19:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

anna-shakhova
anna-shakhova previously approved these changes Mar 5, 2026
Copilot AI review requested due to automatic review settings March 5, 2026 13:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

@pharret31 pharret31 merged commit 67497e5 into DevExpress:26_1 Mar 5, 2026
267 of 273 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants