Back to skill

Security audit

Instagram Strategic Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a simple Instagram content-strategy helper, but its configuration asks for an Instagram/Facebook access token that the documented purpose and code do not justify.

Review this skill before installing if the platform would ask you for an Instagram or Facebook access token. Do not provide a token unless the publisher documents why it is needed, what scopes are required, how it is protected, and why the current implementation uses it. The inspected code did not show exfiltration or persistence, but the credential request is broader than the working skill needs.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
config.json:5
Finding
Unnecessary Collection of a Sensitive Instagram Access Token## Vulnerability Details **File Location**: `config.json:5-10` **Vulnerability Type**: Excessive credential access and violation of least privilege **Risk Level**: Medium **Complete Code Snippet**: ```json "inputs": { "instagram_id": "string", "access_token": "string" }, "api": { "base_url": "https://graph.facebook.com/v25.0" } ``` ### Technical Analysis The skill configuration declares `access_token` as an input even though the executable entry point does not use this credential. The implementation in `index.js` ignores both `input` and `config` and returns only a fixed activation message. Moreover, `SKILL.md` describes the expected input as text containing artist context or a post idea rather than a privileged Instagram credential. Requiring a bearer token that is unnecessary for the implemented functionality violates the principle of least privilege. Supplying the token places it within the skill runtime and its surrounding configuration, telemetry, and logging boundaries without a legitimate operational need. The audited code does not transmit, log, or steal the token, and the configured URL is the official Facebook Graph API endpoint; therefore, this finding concerns unnecessary credential exposure rather than confirmed exfiltration. ### Attack Path 1. A user or orchestration platform installs and configures the skill. 2. Based on `config.json`, the platform requests or supplies an Instagram/Facebook access token. 3. The credential enters the skill's configuration or execution boundary despite not being used by `index.js`. 4. If the surrounding runtime, configuration store, diagnostics, or logs are later compromised or improperly exposed, an attacker could recover the unnecessarily supplied token. 5. The attacker could then use the token against the Facebook Graph API within the permissions and lifetime granted to that token. This attack path depends on a separate exposure of the ...[truncated 595 chars]
Remediation
## Remediation Suggestions 1. Remove `access_token`, `instagram_id`, and the unused API configuration until API access is actually implemented. 2. Align the declared inputs with the documented functionality in `SKILL.md`, accepting only the artist context or post data needed for analysis. 3. If Graph API integration is implemented later, request only the minimum required permissions and use short-lived tokens where supported. 4. Supply credentials through a dedicated secret manager or protected runtime secret facility rather than ordinary user input or plaintext configuration. 5. Ensure tokens are never included in logs, error messages, analytics, generated content, or persisted execution traces. 6. Restrict outbound requests to the expected official Facebook Graph API host and validate request destinations before attaching credentials. 7. Document the required token type, permissions, purpose, retention policy, and revocation procedure. 8. Add automated tests verifying that credentials are neither returned in responses nor disclosed through exception handling and diagnostics.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The instruction "Sei Alfred" and the entire prompt are written as a mandatory Italian persona/output framing, with no indication that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless clearly justified as region-specific.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The user-facing string "Skill attiva: Instagram Strategic Analyzer" is hard-coded in Italian, which imposes a specific language without any visible user opt-in or documented locale constraint. This matches the policy category for language or locale violations because the file provides no mechanism to select or justify the language.

Static analysis

No suspicious patterns detected.