Agent skill
Security
Security best practices for Angular (XSS, CSP, Route Guards).
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/security-hoangnguyen0403-agent-skills-standar-6
Metadata
Additional technical details for this skill
- labels
-
angular security xss csp
- triggers
-
{ "files": [ "**/*.ts", "**/*.html" ], "keywords": [ "DomSanitizer", "innerHTML", "bypassSecurityTrust", "CSP" ] }
SKILL.md
Security
Priority: P0 (CRITICAL)
Principles
- XSS Prevention: Angular sanitizes by default. Do NOT use
innerHTMLunless absolutely necessary. - Bypass Security: Avoid
DomSanitizer.bypassSecurityTrust...unless the content source is trusted. - Route Guards: Protect all sensitive routes with
CanActivateFn.
Guidelines
- CSP: Configure Content Security Policy headers on the server.
- HTTP: Use Interceptors to attach secure tokens (HttpOnly cookies preferred over LocalStorage tokens).
- Secrets: NEVER store secrets (API keys) in Angular code.
References
- Security Best Practices
Related Topics
common/security-standards | components
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?