Back to skill

Security audit

Facebook Get Profile ID API

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to perform the advertised Facebook profile-ID lookup, but it handles the JustOneAPI token in the request URL, which can expose credentials through logs or telemetry.

Install only if you are comfortable sending both the Facebook profile path and your JustOneAPI token to JustOneAPI with the token placed in the URL query string. Prefer a version that uses an Authorization header or other non-query secret mechanism, and rotate the token if you suspect URLs may have been logged.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
bin/run.mjs:18
Finding

API Authentication Token Exposed in the Request URL

Content
View full analysis
parameter.name === "token"); if (!tokenParam || params.token !== undefined) { return; } if (!cliToken) { fail("--token is required for this operation.", { operationId: operation.operationId, }); } params.token = cliToken; } ``` ```js function applyQueryParams(operation, params, url) { for (const parameter of operation.parameters.filter((item) => item.location === "query")) { const value = params[parameter.name]; if (value === undefined) { continue; } appendValue(url.searchParams, parameter.name, value); } } function appendValue(searchParams, name, value) { if (Array.isArray(value)) { for (const item of value) { appendValue(searchParams, name, item); } return; } if (value && typeof value === "object") { searchParams.append(name, JSON.stringify(value)); return; } searchParams.append(name, String(value)); } ``` ### Technical Analysis The token is inserted into `params.token`. Because the operation metadata marks `token` as a query parameter, `applyQueryParams` serializes it into a URL resembling: ```text https://api.justoneapi.com/api/facebook/get-profile-id/v1?token=&url= ``` HTTPS encrypts the URL while it tra ...[truncated 2059 chars]
Remediation
View remediation
``` Alternatively, use a provider-specific secret header such as `X-API-Key`. 2. Remove `token` from the operation's query-parameter metadata and construct the request headers separately: ```js const requestInit = { headers: { accept: "application/json", authorization: `Bearer ${args.token}`, }, method: operation.method, }; ``` 3. Do not copy credentials into the general-purpose `params` object. Keep secrets separate from user-controlled endpoint parameters to reduce accidental serialization or logging. 4. Update `generated/operations.json`, `generated/operations.md`, and `SKILL.md` so they no longer describe or rely on query-string authentication. 5. Add explicit redaction for `token`, `authorization`, and similar fields in all errors, diagnostics, traces, and telemetry. Never report the complete request URL if it could contain sensitive parameters. 6. Prefer reading the token directly from `JUST_ONE_API_TOKEN` rather than requiring it as a command-line argument, because command-line values may be visible through process inspection or shell history in some environments. 7. Rotate tokens that may previously have been captured in URL logs. Review and sanitize API gateway, proxy, server, and observability logs according to the provider's retention controls. 8. Add an automated test asserting that the generated request URL never contains `token`, while the expected authentication header is present. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a network-capable helper (node .../run.mjs) that calls an external API, but it does not declare an explicit tool scope such as permissions or allowed-tools. This can weaken sandboxing and review controls by leaving the agent runtime to infer or overgrant capabilities, making unintended outbound requests more likely if the skill is reused or modified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code performs an outbound network request to a third-party API and includes a required authentication token as a query parameter, along with a user-supplied Facebook profile path. There is no confirmation prompt or user-facing disclosure at the point of transmission, so the data-sharing behavior is not surfaced to the user by the code itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill requires an authentication token to be passed in the URL query string, which is an unsafe pattern because query parameters are commonly logged by clients, proxies, web servers, analytics tools, browser history, and error telemetry. Even when sent over HTTPS, the token may still be exposed through operational logging or accidental sharing, allowing unauthorized use of the API credential.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.