Back to skill

Security audit

meta-long-lived-token

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Meta token-renewal helper, but users should understand it handles sensitive app secrets and access tokens and may update gateway environment settings.

Install only if you want an agent to handle Meta app secrets and access tokens for this gateway. Confirm the requester is the owner before running it, avoid putting long-lived secrets in chat history when possible, review the exact gateway env file/update method before saving, and approve any daily cron/preflight reminder explicitly.

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 (2)

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

md
1. Vào `developers.facebook.com/tools/explorer`
2. Chọn app (loại Business)
3. Thêm quyền cần dùng — tối thiểu `ads_read` (thêm `ads_management` nếu cần ghi; thêm `pages_manage_posts`, `pages_read_engagement` nếu dùng page)
4. **Generate Access Token** → đăng nhập → cho phép
5. Copy token (bắt đầu bằng `EAA...`) — token này chỉ sống ~1–2h

## 3. Đổi sang long-lived token

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

md
| Lỗi | Nguyên nhân | Cách xử lý |
|---|---|---|
| `(#190) Error validating access token` | Token chết/sai | Lấy short-lived mới ở Graph Explorer, đổi lại từ mục 3 |
| `(#200) Provide valid app ID` | Thiếu `access_token` hoặc sai `client_id` | Kiểm tra lại `APP_ID` + có truyền `access_token` |
| Lỗi 4xx "giả" dù token đúng | Token nhét thẳng vào URL bị shell cắt | Dùng `curl -G --data-urlencode` |
| `expires_in` trả về rất ngắn | Đang đổi từ token đã là long-lived, hoặc app chưa cấu hình đúng | Thử lại với short-lived token mới |

Static analysis

No suspicious patterns detected.