Back to skill

Security audit

Auth0 Angular

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Auth0 Angular guide, but its automated setup uses an unverified remote installer and some examples handle tokens unsafely, so it belongs in Review.

Review before installing or using. Prefer the manual setup path, avoid running the downloaded installer as written, do not log access tokens, avoid localStorage token persistence unless you understand the tradeoff, and remove debug-style full profile JSON dumps from production code.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/setup.md:20
Finding

Mutable Remote Installer Is Downloaded and Executed Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/api.md:271
Finding

Bearer Access Tokens Are Exposed Through Browser Console Logging

Content
View full analysis
console.log('Token:', token), error: () => { // Silent auth failed, try popup this.auth.getAccessTokenWithPopup().subscribe(token => { console.log('Got token via popup:', token); }); } }); ``` ### Technical Analysis The example prints complete OAuth bearer access tokens to the browser console after both silent and popup-based token acquisition. A bearer token grants access based on possession; no additional proof of identity is generally required when it is presented to the intended API. Console output can remain available in developer tools and may be captured by remote debugging software, browser extensions, automated testing systems, support recordings, telemetry wrappers, or users sharing diagnostic output. Developers may also copy this example into production code because it is presented as an API usage pattern. The token retrieval operations are legitimate, but revealing the token value is not necessary to demonstrate successful authentication. ### Attack Path 1. A developer adopts the documented example in an Angular application. 2. A user authenticates, causing the SDK to return an access token. 3. The application writes the complete bearer token to the browser console. 4. A malicious extension, person with access to the browser session, remote debugging participant, or console-collection tool obtains the value. 5. The attacker sends the token in an `Authorization: Bearer` header to the corresponding API. 6. Until the token expires or is revoked, the attacker can exercise the scopes and permissions represented by that token. ### Impact Assessment Exposure can allow unauthorized API calls under the affected user's identity. ...[truncated 454 chars]
Remediation
View remediation
console.debug('Access token acquired successfully'), error: () => { this.auth.getAccessTokenWithPopup().subscribe({ next: () => console.debug('Access token acquired through popup'), error: (err) => console.error('Token acquisition failed', err) }); } }); ``` 3. Ensure authentication errors are sanitized before sending them to telemetry or support systems. 4. Configure log redaction for bearer tokens and `Authorization` headers as defense in depth. 5. Add code-review or linting checks that detect token variables passed to console or logging functions. 6. Document that tokens must only be passed directly to the intended SDK or API request path and must never be printed, persisted in diagnostics, or included in client-side analytics. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
- `user$` - Observable user profile information
- `loginWithRedirect()` - Initiate login
- `logout()` - Log out user
- `getAccessTokenSilently()` - Get access token manually (alternative to HTTP interceptor)

**Common Use Cases:**
- Login/Logout buttons → See Step 4 above

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/integration.md (reported line 56)May include surrounding context.

md
## Calling a Protected API

There are two alternative approaches to attach access tokens to API requests. Choose the one that best fits your needs — you do not need both:

- **HTTP Interceptor (recommended)** — Automatically attaches tokens to outgoing requests matching a configured URL list. This is the simplest, most centralized approach and works well for most applications.
- **Manual token retrieval** — Call `getAccessTokenSilently()` to obtain a token and attach it to requests yourself. Use this when you need explicit, per-request control over token handling.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/api.md (reported line 270)May include surrounding context.

};

text

With this in place, any `HttpClient` request to a URL matching `allowedList` will automatically include the access token:

```typescript
// data.service.ts

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/integration.md (reported line 94)May include surrounding context.

};

text

With this in place, any `HttpClient` request to a URL matching `allowedList` will automatically include the access token:

```typescript
// data.service.ts

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/integration.md (reported line 107)May include surrounding context.

getData() { return this.http.get('https://your-api.com/data'); // Access token automatically added by interceptor } }

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The setup guide instructs users to download and execute a remote shell script from GitHub with local install privileges, which creates a supply-chain execution risk. Although it tells users to review the script first, it immediately proceeds to run it, and then deletes the file, reducing auditability and encouraging unsafe trust in remote content.

Content

Scanner excerpt · references/setup.md (reported line 23)May include surrounding context.

md
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh -o /tmp/auth0-install.sh
    echo "⚠️  Review the install script at /tmp/auth0-install.sh before running"
    sh /tmp/auth0-install.sh -b /usr/local/bin
    rm /tmp/auth0-install.sh
  fi
fi

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/setup.md (reported line 134)May include surrounding context.

md
- Add `http://localhost:4200` to "Allowed Web Origins" in Auth0 Dashboard

**Environment variables not working:**
- Angular uses environment files, not .env
- Rebuild app after changing environment files

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly presents cacheLocation: 'localstorage' as a normal configuration option without clearly warning that localStorage increases token exposure to XSS and browser-extension compromise. In an Angular SPA auth guide, this can lead developers to adopt a weaker token storage model for real applications, increasing the chance of session/token theft.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The markdown demonstrates retrieving an access token and attaching it to an outbound request, which is a safety-relevant operation affecting user security and privacy. Although this is expected in an Auth0 integration guide, the description does not warn users to send tokens only to trusted APIs, avoid logging them, and scope their use carefully.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The profile component renders the entire user object with {{ user | json }}, which can expose sensitive identity attributes, tokens-adjacent metadata, or internal claims to any user viewing the page or to screenshots, logs, and shared sessions. In an authentication integration guide, this is risky because developers may copy the example into production without minimizing displayed PII.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.