T03 · Remote Payload Retrieval and Execution
- Location
scripts/utils/validation.mjs:21- Finding
Mutable Remote Installer Is Piped Directly to a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent for Auth0 Expo setup, but unsafe token-handling examples and mutable install commands need review before use.
Install only after reviewing the bootstrap steps and active Auth0 tenant. Do not copy the examples that log accessToken/API tokens or pass session-transfer tokens in URLs; redact or avoid those patterns. Prefer pinned package/tool versions or a reviewed lockfile, and avoid the printed curl | sh installer unless you independently verify the source and contents.
scripts/utils/validation.mjs:21Mutable Remote Installer Is Piped Directly to a Shell
references/integration.md:56Access Token Is Written to Application Logs
references/integration.md:318Multi-Resource API Token Is Written to Application Logs
references/integration.md:369Session-Transfer Credential Is Embedded in a URL Query String
scripts/package.json:9Bootstrap Installation Uses Mutable Dependency Ranges Without a Lockfile
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Parameter | Type | Description |
|-----------|------|-------------|
| `scope` | `string` | OAuth scopes (default: `openid profile email`) |
| `audience` | `string` | API identifier for access token |
| `organization` | `string` | Organization ID for enterprise login |
| `invitationUrl` | `string` | Organization invitation URL |
| `connection` | `string` | Force a specific connection (e.g., `google-oauth2`) |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Parameter | Type | Description |
|-----------|------|-------------|
| `scope` | `string` | OAuth scopes (default: `openid profile email`) |
| `audience` | `string` | API identifier for access token |
| `organization` | `string` | Organization ID for enterprise login |
| `invitationUrl` | `string` | Organization invitation URL |
| `connection` | `string` | Force a specific connection (e.g., `google-oauth2`) |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Parameter | Type | Description |
|-----------|------|-------------|
| `scope` | `string` | OAuth scopes (default: `openid profile email`) |
| `audience` | `string` | API identifier for access token |
| `organization` | `string` | Organization ID for enterprise login |
| `invitationUrl` | `string` | Organization invitation URL |
| `connection` | `string` | Force a specific connection (e.g., `google-oauth2`) |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Property | Type | Description |
|----------|------|-------------|
| `accessToken` | `string` | Access token for API calls |
| `idToken` | `string` | ID token with user claims |
| `refreshToken` | `string` | Refresh token (if `offline_access` requested) |
| `tokenType` | `string` | Token type (`Bearer` or `DPoP`) |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### Token Handling Best Practices
- Never log tokens to the console in production builds
- Use `getCredentials()` to access tokens — it auto-refreshes expired tokens
- Request `offline_access` scope for refresh token support
- Do not store tokens in React state — use `getCredentials()` on demand
- Enable DPoP for enhanced token security (enabled by default)
The finding is valid because the example accesses and immediately prints a live access token. In an Expo/mobile auth integration context, developers may copy-paste this pattern into production, turning a sensitive credential into log data that can be replayed to access protected APIs.
{ scope: 'openid profile email' }, { customScheme: 'auth0sample' } ); console.log('Access Token:', credentials.accessToken);
### Login with Audience (API Access)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
The credentials manager automatically refreshes expired access tokens using the refresh token. Ensure you request the offline_access scope during login:
await authorize(
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
domain="YOUR_AUTH0_DOMAIN"
clientId="YOUR_AUTH0_CLIENT_ID"
localAuthenticationOptions={{
title: 'Authenticate to access credentials',
subtitle: 'Please verify your identity',
cancelTitle: 'Cancel',
evaluationPolicy: LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
domain="YOUR_AUTH0_DOMAIN"
clientId="YOUR_AUTH0_CLIENT_ID"
localAuthenticationOptions={{
title: 'Authenticate to access credentials',
subtitle: 'Please verify your identity',
cancelTitle: 'Cancel',
evaluationPolicy: LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Access tokens for multiple APIs using a single refresh token:
const { authorize, getApiCredentials, clearApiCredentials } = useAuth0();
The SSO example appends a sessionTransferToken to a URL query string, which can leak through browser history, referrer headers, analytics, server logs, proxy logs, screenshots, or deep-link handlers. A leaked session transfer token may let an attacker bootstrap an authenticated web session for the victim.
The skill instructs use of npx expo install expo-dev-client, which resolves and executes the latest matching package tooling at runtime rather than a pinned version. In an agentic or automated environment, this weakens supply-chain integrity and reproducibility, and could expose users to unexpected or compromised upstream releases.
npx expo install react-native-auth0 relies on whatever Expo CLI version npx fetches at execution time. That creates a supply-chain and integrity risk because automated agents may download and run new code without review, and behavior may differ across runs.
npx expo prebuild --clean executes Expo CLI code that may be fetched dynamically if not already installed locally. In a skill that encourages automated build/test execution, unpinned tooling increases risk of supply-chain compromise and non-reproducible native project generation.
npx expo run:ios can cause the agent to fetch and run an unpinned Expo CLI version at build time. Because this skill explicitly directs the agent to build and iterate on failures, the attack surface is larger than a passive doc example: upstream changes or compromise could directly affect the execution environment.
npx expo run:android has the same dynamic-resolution problem as other npx expo commands in the file. In CI or autonomous agent workflows, executing unpinned build tooling can result in unreviewed code execution and inconsistent outcomes.
A third matched npx expo token appears on the same troubleshooting line. Repeated examples amplify the chance that automated systems or users execute an unpinned command, increasing practical exposure even if intent is documentation only.
The guidance to rerun npx expo prebuild --clean repeats execution of unpinned tooling during remediation steps. Because this may occur multiple times in iterative build-fix loops, the skill compounds the dependency on dynamically fetched code.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
| `customScheme` | `string` | No | Custom URL scheme (lowercase, no special chars). If `"https"`, enables Android App Links with `autoVerify`. |
**What the plugin configures automatically:**
- **iOS**: Adds URL scheme to Info.plist (`CFBundleURLSchemes`), adds deep linking handler to AppDelegate
- **Android**: Sets `manifestPlaceholders` (`auth0Domain`, `auth0Scheme`) in build.gradle
## User Profile Claims
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
| `customScheme` | `string` | No | Custom URL scheme (lowercase, no special chars). If `"https"`, enables Android App Links with `autoVerify`. |
**What the plugin configures automatically:**
- **iOS**: Adds URL scheme to Info.plist (`CFBundleURLSchemes`), adds deep linking handler to AppDelegate
- **Android**: Sets `manifestPlaceholders` (`auth0Domain`, `auth0Scheme`) in build.gradle
## User Profile Claims
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
| `customScheme` | `string` | No | Custom URL scheme (lowercase, no special chars). If `"https"`, enables Android App Links with `autoVerify`. |
**What the plugin configures automatically:**
- **iOS**: Adds URL scheme to Info.plist (`CFBundleURLSchemes`), adds deep linking handler to AppDelegate
- **Android**: Sets `manifestPlaceholders` (`auth0Domain`, `auth0Scheme`) in build.gradle
## User Profile Claims
The documentation explicitly logs credentials.accessToken to the console, which normalizes exposing bearer tokens in app logs. On mobile platforms, logs may be accessible during debugging, through crash reporting, or on rooted/jailbroken devices, allowing token replay against APIs.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
| Policy | Behavior |
|--------|----------|
| `BiometricPolicy.default` | System-managed. May skip prompt if recently authenticated. |
| `BiometricPolicy.always` | Always prompts for biometric on every credential access. |
| `BiometricPolicy.session` | Prompts once per session; reuses for the specified timeout. |
| `BiometricPolicy.appLifecycle` | Prompts once until app restarts or credentials are cleared. |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const callApi = async () => {
const credentials = await getCredentials();
const headers = await getDPoPHeaders({
url: 'https://api.example.com/data',
method: 'GET',
accessToken: credentials.accessToken,
tokenType: credentials.tokenType,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const callApi = async () => {
const credentials = await getCredentials();
const headers = await getDPoPHeaders({
url: 'https://api.example.com/data',
method: 'GET',
accessToken: credentials.accessToken,
tokenType: credentials.tokenType,