Back to skill

Security audit

LinkedIn Skill

Security checks for vulnerabilities and agentic risk

Overview

This LinkedIn automation skill fits its stated purpose, but it needs Review because it handles reusable tokens unsafely and enables live account actions without clear confirmation safeguards.

Install only if you trust Linked API and the npm package source, and prefer an isolated environment with a pinned CLI version. Do not paste reusable tokens into an agent chat or command line unless you understand they may appear in logs or process history. Require explicit review before any message, InMail, connection change, post, comment, reaction, workflow run, or account reset.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:12
Finding

Unpinned Global Installation of a Third-Party CLI Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:12-16
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Medium

Vulnerable Code

markdown
If `linkedin` is not available, install it:

```bash
npm install -g @linkedapi/linkedin-cli
text

### Technical Analysis

The Skill instructs the Agent to install the latest available version of `@linkedapi/linkedin-cli` from the npm registry. No fixed version, integrity hash, lockfile, package provenance check, or reviewed artifact is specified.

The `-g` option installs the package into the global npm environment. Depending on local configuration, this may modify shared executable paths and expose the package to other sessions. npm installation can also execute package lifecycle scripts with the privileges of the invoking user.

This does not establish that the named package is malicious. However, the installation method creates a supply-chain trust boundary that is not constrained to a reviewed package version. A compromised maintainer account, registry package, transitive dependency, or unexpectedly changed future release could introduce arbitrary code after the Skill itself has been audited.

### Attack Path

1. An attacker compromises the npm package, its maintainer account, or one of its dependencies.
2. The attacker publishes a malicious release under the existing package name.
3. The Agent follows the Skill instruction and runs `npm install -g @linkedapi/linkedin-cli`.
4. npm retrieves the current malicious release rather than a previously reviewed version.
5. Malicious lifecycle or runtime code executes with the invoking user's privileges.
6. The code may read accessible files, capture Linked API credentials, alter globally installed tooling, or send account data to an attacker-controlled service.

### Impact Assessment

Successful exploitation could obtain the privileges of the user running npm. The affected scope
...[truncated 481 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the CLI to a specifically reviewed version, for example @linkedapi/linkedin-cli@X.Y.Z.
  • Verify the downloaded package against an approved integrity digest and maintain a lockfile or equivalent dependency manifest.
  • Avoid global installation. Install the dependency in an isolated, dedicated working directory or container with minimal filesystem and network access.
  • Review all transitive dependencies and verify package provenance, publisher identity, signatures, and registry source.
  • Disable npm lifecycle scripts during installation where compatible, then explicitly permit only reviewed setup operations.
  • Run the CLI as a dedicated unprivileged user and deny access to unrelated credentials and files.
  • Require explicit user approval before installing or upgrading the dependency.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:20
Finding

Authentication Tokens Passed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:20-29
Vulnerability Type: Sensitive credentials exposed through process arguments and Agent execution records
Risk Level: High

Vulnerable Code

markdown
1. Go to [app.linkedapi.io](https://app.linkedapi.io) and sign up or log in
2. Connect their LinkedIn account
3. Copy the **Linked API Token** and **Identification Token** from the dashboard

Once the user provides the tokens, run:

```bash
linkedin setup --linked-api-token=TOKEN --identification-token=TOKEN
text

### Technical Analysis

The Skill directs the user to provide two authentication tokens to the Agent and then places both secrets directly in command-line arguments.

Command arguments can be captured by process inspection facilities, shell history, terminal logs, Agent transcripts, command-execution telemetry, debugging output, or monitoring systems. Even if the CLI securely stores the tokens after setup, exposing them during invocation creates additional credential copies outside the intended credential store.

The instruction also requires users to disclose reusable credentials to the Agent conversation. This unnecessarily expands the trusted surface to include transcript retention, model-facing context, orchestration infrastructure, and tool-call logs.

The network transfer to Linked API is expected for the declared cloud-backed LinkedIn automation functionality. The vulnerability is not the required authenticated network request itself; it is the avoidable handling of credentials in command arguments and conversational context.

### Attack Path

1. The user copies the Linked API Token and Identification Token into the Agent conversation.
2. The Agent substitutes the real values into the documented `linkedin setup` command.
3. The tokens become visible in the process argument vector and may also be retained in the transcript or execution logs.
4. A local process, support operator,
...[truncated 1225 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not ask users to paste reusable tokens into an Agent conversation.
  • Replace command-line token flags with a secure interactive authentication flow, protected standard input, operating-system credential store, or browser-based authorization mechanism.
  • Ensure secrets are never printed in terminal output, tool-call records, telemetry, error messages, or debug logs.
  • If environment-based injection is unavoidable, provide the environment only to the target process, prevent inherited exposure to child processes, and redact values from diagnostics.
  • Store credentials with restrictive filesystem permissions and platform-native encryption.
  • Issue narrowly scoped, short-lived tokens and enforce rotation, revocation, account binding, rate limits, and anomaly detection.
  • Require explicit user confirmation before account mutations such as sending messages, changing connections, publishing content, or executing custom workflows.
  • Document the data sent to Linked API, its retention policy, subprocess exposure risks, and the procedure for immediately revoking a disclosed token.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented reset commands remove configured account data, including an --all variant, without a prominent destructive-operation warning. In an agent context, accidental invocation could wipe account configuration for one or all accounts, disrupt service, and require manual re-authentication or recovery.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill enables sending LinkedIn messages and InMails but does not clearly warn that provided content will be transmitted to third parties and may create externally visible communications from the user's account. In an agent setting, this increases the risk of unintended disclosure of sensitive data or accidental outreach if the agent composes or forwards content without explicit user confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation describes withdrawing requests and removing connections without emphasizing that these are user-visible, state-changing account actions that may be difficult or impossible to undo. In an automated agent workflow, lack of confirmation safeguards can lead to accidental relationship changes, loss of network access, or reputational harm.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Post creation, reactions, and comments create public or semi-public activity on a personal or company LinkedIn presence, yet the skill text does not prominently warn about this visibility. This is dangerous because an agent could publish unintended content, leak internal information, or create reputational damage through mistaken posts or engagement actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow feature allows executing arbitrary workflow JSON from file, stdin, or inline, which can batch multiple real LinkedIn actions, but the documentation does not warn about the breadth of side effects. In agent environments, this can magnify mistakes or prompt-injection-driven abuse by allowing a single unreviewed workflow to send messages, modify connections, or publish content at scale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.