Agent skill

Security

Security best practices for Angular (XSS, CSP, Route Guards).

Stars 163
Forks 31

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 innerHTML unless 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

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results