# fix-csp-compliance

> Claude/Codex skill by [@ui5](https://omgskills.com/library/ui5/index.md) · 41 stars · Updated 2026-10-20

Fix Content Security Policy (CSP) compliance issues that UI5 linter reports but cannot auto-fix. Use this skill when linter outputs: - \`csp-unsafe-inline-script\` with message "Use of unsafe inline script" Trigger on: inline JavaScript in HTML files, script tags without src attribute, onclick/onload handlers in HTML. Also use when user mentions 'security headers', 'inline script warning', 'CSP policy', 'unsafe-inline', or 'Content-Security-Policy'. Provides guidance on moving inline scripts to external files for CSP compliance.

Tags: claude, development, openui5, plugin, sapui5, ui5

## Install

```sh
git clone https://github.com/UI5/plugins-coding-agents /tmp/plugins-coding-agents && ln -s /tmp/plugins-coding-agents/plugins/ui5-modernization/skills/fix-csp-compliance ~/.claude/skills/fix-csp-compliance
```

## From README

Fix CSP Compliance - Unsafe Inline Scripts Key Rules NEVER delete inline script content. Always extract it to an external .js file and replace the inline ... with . Even trivial config objects, debug flags, or seemingly unused code must be externalized — removal is a functional regression. File naming: use a descriptive name matching the content's purpose (e.g., appConfig.js for configuration, init.js for initialization). This skill fixes Content Security Policy (CSP) compliance issues that the UI5 linter detects but cannot auto-fix because they require restructuring code into external files.

## Links

- HTML page: https://omgskills.com/library/ui5/plugins-coding-agents/plugins/ui5-modernization/skills/fix-csp-compliance/
- GitHub: https://github.com/UI5/plugins-coding-agents
- Author: [@ui5](https://omgskills.com/library/ui5/index.md)

## More from this repo

- [fix-bootstrap-params](https://omgskills.com/library/ui5/plugins-coding-agents/plugins/ui5-modernization/skills/fix-bootstrap-params/index.md) — Used to fix HTML bootstrap parameter issues that UI5 linter reports but cannot auto-fix.
   - [@ui5](https://omgskills.com/library/ui5/index.md) · 41 stars
- [fix-component-async](https://omgskills.com/library/ui5/plugins-coding-agents/plugins/ui5-modernization/skills/fix-component-async/index.md) — Used to fix Component.js async configuration issues that UI5 linter reports but cannot auto-fix.
   - [@ui5](https://omgskills.com/library/ui5/index.md) · 41 stars
- [fix-control-renderer](https://omgskills.com/library/ui5/plugins-coding-agents/plugins/ui5-modernization/skills/fix-control-renderer/index.md) — Used to fix Control renderer issues that UI5 linter reports but cannot auto-fix.
   - [@ui5](https://omgskills.com/library/ui5/index.md) · 41 stars
