T09 · Insecure Skill Coding Practices
- Location
SKILL.md:207- Finding
Authenticated session is not rotated after successful login
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Auth0 setup guide, but its main copy-paste authentication examples can produce weaker-than-expected login security.
Review this skill before installing or using it for production code. If you use it, require session ID rotation immediately after successful callback validation, derive callback/logout base URLs from trusted configuration, keep exact Auth0 allowlists, and avoid writing client secrets to local files unless the user explicitly approves the location and .env is gitignored.
SKILL.md:207Authenticated session is not rotated after successful login
SKILL.md:175OAuth callback and logout URLs are constructed from request-controlled host data
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Scope and Audience Configuration
See [Integration Guide](references/integration.md) for requesting custom scopes, audience for API access tokens, and Organizations support.
---
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- `AuthenticationController` — Main entry point, builds authorize URLs and handles callbacks
- `AuthenticationController.Builder` — Configures the controller via `newBuilder(domain, clientId, clientSecret)`
- `AuthorizeUrl` — Fluent builder for `/authorize` URL parameters
- `Tokens` — Access token, ID token, refresh token from callback
- `IdentityVerificationException` — Authentication error with error code
- `DomainResolver` — Interface for Multiple Custom Domain support
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- `AuthenticationController` — Main entry point, builds authorize URLs and handles callbacks
- `AuthenticationController.Builder` — Configures the controller via `newBuilder(domain, clientId, clientSecret)`
- `AuthorizeUrl` — Fluent builder for `/authorize` URL parameters
- `Tokens` — Access token, ID token, refresh token from callback
- `IdentityVerificationException` — Authentication error with error code
- `DomainResolver` — Interface for Multiple Custom Domain support
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
**Builder Methods (`AuthorizeUrl`):**
- `.withScope("openid profile email")` — Set requested scopes
- `.withAudience("https://my-api")` — Request API access token
- `.withOrganization("org_xxx")` — Lock to specific Organization
- `.withInvitation("invite_xxx")` — Accept Organization invitation
- `.withConnection("google-oauth2")` — Skip to specific connection
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Method | Parameter | Description |
|--------|-----------|-------------|
| `.withScope(String)` | `"openid profile email"` | Space-separated scopes to request |
| `.withAudience(String)` | `"https://my-api"` | API audience for access token |
| `.withOrganization(String)` | `"org_xxx"` | Lock login to specific Organization |
| `.withInvitation(String)` | `"invite_xxx"` | Accept Organization invitation |
| `.withConnection(String)` | `"google-oauth2"` | Skip to specific identity provider |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
---
## Requesting API Access Tokens
To call external APIs with an access token, include the `audience` parameter:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Important: Add .env to .gitignore to prevent committing secrets:
echo ".env" >> .gitignore
Load environment variables in your application. For servlet containers:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
src/main/webapp/ ├── WEB-INF/ │ └── web.xml # Servlet configuration .env # Auth0 credentials (gitignored)
---
The skill instructs the agent to use provided Auth0 credentials directly and write them to environment configuration without an immediate, explicit warning at the action point about handling sensitive secrets. In an agentic workflow, this increases the chance secrets are persisted to disk, echoed in logs, or inserted into the workspace without clear user consent or secure-handling guidance.
The automatic setup flow directs the agent to take returned Auth0 credentials, including the client secret, and write them to a .env file immediately. Without a contemporaneous warning and guardrails, an automated agent may expose the secret through shell history, generated files, logs, or accidental source-control inclusion.
The manual workflow explicitly tells the agent to collect a client secret and then write it to a .env file, but the step itself lacks a warning about the sensitivity of the secret or a consent checkpoint. In a skill executed by an agent, this can normalize unsafe secret collection and storage practices and increase the risk of credential leakage.
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
The example hard-codes ui_locales to fr, which imposes a specific language on users. This is a natural-language locale policy concern because the file does not present it as user-selectable or clearly justified as region-specific.
Detected: suspicious.exposed_secret_literal