agentsclimarketplace

Syncfusion aspnetmvc security

Skill syncfusion/aspnetmvc-ui-components-skills/skills/syncfusion-aspnetmvc-security

**CONTENT SECURITY POLICY (CSP) GUIDE** — Assist with configuring Syncfusion ASP.NET MVC EJ2 components to work with strict Content Security Policy (CSP) headers. Use when: implementing CSP headers, applying nonces to inline scripts/styles, configuring external font allowlists, or troubleshooting CSP violations and XSS protections.From its SKILL.md

Install
npx -y skills add syncfusion/aspnetmvc-ui-components-skills --skill syncfusion-aspnetmvc-security

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • 24 days oldThe repository was created 24 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.9 KB, 791 tokens by cl100k_base, as published. Nobody here has run it

Content Security Policy (CSP) — Syncfusion ASP.NET MVC (Security)

Use this skill for high-level, Syncfusion-specific CSP guidance and vulnerability-free configurations. Detailed implementation patterns and troubleshooting live in the concern's references files.

When to Use

  • Implementing CSP headers for Syncfusion EJ2 controls in ASP.NET MVC
  • Running in strict CSP mode where inline scripts/styles are restricted
  • Blocking XSS, data injection, and other browser-based attacks
  • Allowlisting CDN resources, external fonts, and trusted origins
  • Validating and testing CSP compliance in development and production
  • Troubleshooting CSP violation errors in browser console

ASP.NET MVC-Specific CSP Implementation

  • Location: Meta tag in ~/Views/Shared/_Layout.cshtml head, or HTTP headers via IIS/code
  • Scope: Applied globally to all views; can be overridden per view if needed
  • Script Manager: Syncfusion's ScriptManager may require unsafe-inline mitigation via nonces

Key CSP Directives for Syncfusion

Core Directives Required

default-src 'self'                          // Restrict all to same origin
script-src 'self' 'unsafe-inline' https://cdn.syncfusion.com  // Scripts (inline needed for init)
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com // Styles (inline for themes)
font-src 'self' data: https://fonts.gstatic.com https://fonts.googleapis.com // Fonts

Optional Directives

  • unsafe-eval (in script-src): Required ONLY if controls use templates (Grid, Dialog, etc.)
  • img-src: Add external CDN URLs if images hosted elsewhere
  • connect-src: For AJAX/fetch requests to data endpoints

Quick Checklist

✓ Add meta tag with strict CSP to _Layout.cshtml head
✓ Allow https://cdn.syncfusion.com for Syncfusion scripts/styles
✓ Allow https://fonts.googleapis.com and https://fonts.gstatic.com (Material/Tailwind themes)
✓ Include 'unsafe-inline' for style-src (Syncfusion uses inline styles for theming)
✓ Include 'unsafe-eval' in script-src ONLY if using template-based controls
✓ Test in browser DevTools (F12) → Console for CSP violations
✓ Monitor Content-Security-Policy-Report-Only for violation reports
✓ Avoid * wildcards; use explicit origins and 'self'
✓ Document any relaxations and security implications

Security Best Practices

  • Nonce Strategy: Generate unique nonce per request; apply to inline scripts/styles
  • Header vs Meta: Prefer HTTP header over meta tag for true enforcement
  • Violation Reporting: Use report-uri or report-to to monitor violations
  • Development vs Production: Use Content-Security-Policy-Report-Only in staging; validate before enforcing
  • Third-party Scripts: Audit Syncfusion CDN and trusted sources regularly
  • Minimize Inline Code: Refactor to external scripts where possible to reduce unsafe-inline scope

Common Violations & Fixes

ViolationRoot CauseFix
Inline style blockedSyncfusion theme stylesAdd 'unsafe-inline' to style-src
Font load failedExternal font from googleapisAdd https://fonts.googleapis.com to font-src, style-src
Script init failedScriptManager inline setupAdd 'unsafe-inline' to script-src or generate nonce
Template not renderingGrid/Dialog template uses evalAdd 'unsafe-eval' to script-src (with caution)

References

What ships with it: 1 file

23.3 KB alongside SKILL.md

references/

Gives 0 of the 12 instructions most security skills give in 791 tokens

Counted across 648 of the 828 authors here whose files we hold, read 2026-08-07

  • Parameterize all database queriesin 68 of 648, across 51 files
  • Hash passwords using bcrypt, scrypt, or argon2in 49 of 648, across 36 files
  • Apply rate limiting to authentication endpointsin 48 of 648, across 24 files
  • Configure security headersin 35 of 648, across 19 files
  • Validate all inputsin 32 of 648, across 24 files
  • Validate all external input at the system boundaryin 29 of 648, across 19 files
  • Run containers as a non-root userin 28 of 648, across 15 files
  • Use httponly secure samesite cookies for sessionsin 26 of 648, across 15 files
  • Run dependency audits before every releasein 21 of 648, across 10 files
  • Encode output to prevent cross-site scriptingin 21 of 648, across 11 files
  • Copy dependencies before source codein 20 of 648, across 9 files
  • Store secrets in environment variablesin 20 of 648, across 18 files

Said here and by no other author read

  • add a strict Content Security Policy tag to the layout head
  • allow the component CDN in script-src and style-src directives
  • allow external font origins in font-src and style-src directives
  • include unsafe-inline in style-src for component theming
  • add unsafe-eval to script-src only when using template-based controls
  • check the browser console for Content Security Policy violations

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,834. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.