bedkillerspacex-boop/codex-skill-library/angular-security-basics
Claude Code and agent skill by bedkillerspacex-boop/codex-skill-library
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Angular client security: template encoding defaults, DomSanitizer, bypassSecurityTrust* review, HttpClient XSRF/CSRF, and auth interceptors. Use when reviewing Angular XSS sinks, innerHTML bindings, DomSanitizer bypass, HttpClient withCredentials, XSRF-TOKEN, HTTP interceptors for Bearer/cookie auth, or hardening org-owned Angular SPAs — authorized only.
Install
npx vskill@latest install bedkillerspacex-boop/codex-skill-library/angular-security-basicsSKILL.md
The same SKILL.md was published earlier as bedkillerspacex-boop/codex-skill-library/angular-security-basics.
Angular Security Basics
Scope And Authorization
- In scope: Angular applications you own or are authorized to assess.
- Out of scope: Attacking third-party Angular sites without permission.
- Prefer staging for CSP/XSRF experiments.
- Pair with
code-quality-standardsandtypescript-style-and-eslint.
When To Use
- SPA XSS review (templates,
innerHTML, sanitizer bypass). - Cookie-session CSRF/XSRF configuration with HttpClient.
- Auth interceptors (Bearer tokens vs cookies).
- Router open-redirect / URL handling review.
Do Not Use As Primary
| Need | Skill instead | |
|---|---|---|
| Angular Signals migration | angular-signals-basics | |
| SSR hydration issues | angular-ssr-hydration | |
| Generic XSS methodology | xss-cross-site-scripting | |
| API JWT abuse testing | api-auth-and-jwt-abuse | |
| Implementation quality baseline | code-quality-standards |
Domain Focus
| Area | Guidance | |
|---|---|---|
| Templates | Interpolation encodes HTML; prefer {{ }} over binding raw HTML | |
[innerHTML] | Sanitized by default; still avoid untrusted HTML | |
bypassSecurityTrust* | Audit every call; require code-owner justification | |
| DomSanitizer | Do not “sanitize” by bypassing | |
| HttpClient XSRF | Cookie XSRF-TOKEN + header for mutating cookie auth | |
| Interceptors | Attach auth; never log tokens | |
| Router | Validate returnUrl allowlist |
Workflow
1. Confirm scope and success criteria
- Record Angular version, auth mode (JWT in memory vs cookies), API origins.
- Success: no unjustified bypasses; XSRF correct for cookie auth; interceptors safe; CSP considered.
- Inventory third-party libs that write HTML.
2. Hunt XSS sinks
| Pattern | Risk | |
|---|---|---|
bypassSecurityTrustHtml(user) | XSS | |
| Resource URL bypass for iframe | Open redirect / script | |
Binding untrusted URL to script src | XSS |
3. HttpClient CSRF/XSRF (cookie sessions)
- JWT in
Authorizationheader from memory: CSRF less relevant; XSS becomes token theft risk. - Do not store long-lived tokens in
localStoragewithout XSS defense-in-depth.
4. Auth interceptors
- Skip attaching tokens to absolute third-party URLs.
- Handle 401 refresh without infinite loops.
- Pair with server authz always.
5. Router / redirects
6. Verify
7. Hand off
- Document remaining bypasses with owners.
- Prefer Trusted Types / CSP where org supports.
- Security unit tests for sanitizer helpers.
Good / Bad
| Topic | Good | Bad | |
|---|---|---|---|
| HTML | Text binding | Bypass sanitizer for convenience | |
| Tokens | Memory + short TTL / BFF cookies | Forever token in localStorage | |
| CSRF | XSRF for cookie auth | Cookie auth with no CSRF defense | |
| Redirects | Relative allowlist | Open returnUrl=//evil |
Output Checklist
- [ ] Angular version and auth mode recorded
- [ ] bypassSecurityTrust* audited
- [ ] innerHTML usage justified
- [ ] XSRF/cookie or JWT threat model applied
- [ ] Interceptors don’t leak tokens to third parties
- [ ] Router redirects allowlisted
- [ ] Tests/build green; manual XSS/CSRF checks
- [ ]
code-quality-standardsapplied
Rules
- Owned apps only.
- Angular encoding is not a substitute for safe HTML policies.
- Never bypass sanitizer without threat review.
- Server-side authz remains mandatory.
- Redact tokens in logs and error reports.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingangular-security-basics/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bedkillerspacex-boop/codex-skill-library/angular-security-basics)