Back to skill

Security audit

Mapbox Token Security

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only skill that gives Mapbox token security guidance and does not try to access, collect, or modify credentials itself.

Install this as a security reference skill for Mapbox token handling. Users should still review any suggested token revocation, rotation, or dashboard/API changes before applying them, because those actions can affect production services.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (17)

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 · AGENTS.md (reported line 28)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 43)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 45)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 109)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 126)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 189)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · SKILL.md (reported line 219)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · SKILL.md (reported line 223)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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/incident-response.md (reported line 113)May include surrounding context.

console.log('Token:', token); // Shows in browser console

// ❌ NEVER share tokens in public repos // .env file committed to GitHub

text

### ✅ Always Do This

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 · AGENTS.md (reported line 46)May include surrounding context.

// ✅ Add .env to .gitignore // .gitignore .env .env.local

text

## Token Selection Decision Tree

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 · AGENTS.md (reported line 105)May include surrounding context.

// ✅ Add .env to .gitignore // .gitignore .env .env.local

text

## Token Selection Decision Tree

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 · AGENTS.md (reported line 127)May include surrounding context.

// ✅ Add .env to .gitignore // .gitignore .env .env.local

text

## Token Selection Decision Tree

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 · SKILL.md (reported line 224)May include surrounding context.

// ✅ Add .env to .gitignore // .gitignore .env .env.local

text

## Token Selection Decision Tree

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 · AGENTS.md (reported line 89)May include surrounding context.

For all public tokens, always add URL restrictions:

  1. Go to Mapbox Dashboard → Access Tokens
  2. Select token → URL Restrictions
  3. Add allowed URLs:
    text

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 · AGENTS.md (reported line 3)May include surrounding context.

md
---
name: mapbox-token-security
description: Security best practices for Mapbox access tokens, including scope management, URL restrictions, rotation strategies, and protecting sensitive data. Use when creating, managing, or advising on Mapbox token security.
---

# Mapbox Token Security Skill

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 3)May include surrounding context.

md
---
name: mapbox-token-security
description: Security best practices for Mapbox access tokens, including scope management, URL restrictions, rotation strategies, and protecting sensitive data. Use when creating, managing, or advising on Mapbox token security.
---

# Mapbox Token Security Skill

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 8)May include surrounding context.

md
---
name: mapbox-token-security
description: Security best practices for Mapbox access tokens, including scope management, URL restrictions, rotation strategies, and protecting sensitive data. Use when creating, managing, or advising on Mapbox token security.
---

# Mapbox Token Security Skill