T09 · Insecure Skill Coding Practices
- Location
scripts/lk.py:145- Finding
LinkedIn Session Cookies Stored in Plaintext Without Enforced Access Controls
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent LinkedIn inbox monitor, but it asks for persistent access to a logged-in LinkedIn account and external messaging channels with under-scoped safeguards for credentials, automatic actions, and untrusted message content.
Review before installing. Use only a dedicated LinkedIn browser profile, avoid autonomous levels 2 and 3 unless you accept messages being sent as you, and do not store LinkedIn session cookies in plaintext. Confirm exactly which alert channel receives private message previews and drafts, and disable cron/remove local state when you no longer need monitoring.
scripts/lk.py:145LinkedIn Session Cookies Stored in Plaintext Without Enforced Access Controls
CRON-PAYLOAD.md:12Indirect Prompt Injection Through Attacker-Controlled LinkedIn Messages
SKILL.md:150Unpinned and Globally Installed Third-Party Dependencies
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
clawdhub uninstall linkedin-monitor
rm -rf ~/.clawdbot/linkedin-monitor
---
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
clawdhub uninstall linkedin-monitor
rm -rf ~/.clawdbot/linkedin-monitor
---
If the real behavior includes interactive credential harvesting or storage that is not disclosed in the description, that is a serious trust and transparency issue. Users may provide credentials under false assumptions about the skill’s scope, and undocumented account-access flows materially increase the risk of credential mishandling or abuse.
If the real behavior includes interactive credential harvesting or storage that is not disclosed in the description, that is a serious trust and transparency issue. Users may provide credentials under false assumptions about the skill’s scope, and undocumented account-access flows materially increase the risk of credential mishandling or abuse.
If the real behavior includes interactive credential harvesting or storage that is not disclosed in the description, that is a serious trust and transparency issue. Users may provide credentials under false assumptions about the skill’s scope, and undocumented account-access flows materially increase the risk of credential mishandling or abuse.
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
linkedin-monitor status # Show current state linkedin-monitor config # View/edit configuration linkedin-monitor logs # View recent activity linkedin-monitor reset # Clear state (start fresh)
## Configuration
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
linkedin-monitor status # Show current state linkedin-monitor config # View/edit configuration linkedin-monitor logs # View recent activity linkedin-monitor reset # Clear state (start fresh)
## Configuration
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
linkedin-monitor status # Show current state linkedin-monitor config # View/edit configuration linkedin-monitor logs # View recent activity linkedin-monitor reset # Clear state (start fresh)
## Configuration
The guide says the alert includes a draft reply and that the user can reply with a command to approve and send, but it does not prominently warn that the skill can act on the user's behalf on LinkedIn. In an agent skill with progressive autonomy, insufficient disclosure of outbound autonomous or semi-autonomous messaging materially increases the risk of unauthorized, mistaken, or reputation-damaging communications.
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
linkedin-monitor check --debug
linkedin-monitor reset
This finding correctly identifies a destructive shell command operating on a user directory subtree. Even though the path is more specific than 'rm -rf ~', documenting such a command without strong guardrails is risky because copy-paste execution in support workflows can cause permanent deletion of configuration, logs, and state.
linkedin-monitor disable
linkedin-monitor reset
rm -rf ~/.clawdbot/linkedin-monitor
linkedin-monitor setup
linkedin-monitor enable
This finding correctly identifies a destructive shell command operating on a user directory subtree. Even though the path is more specific than 'rm -rf ~', documenting such a command without strong guardrails is risky because copy-paste execution in support workflows can cause permanent deletion of configuration, logs, and state.
linkedin-monitor disable
linkedin-monitor reset
rm -rf ~/.clawdbot/linkedin-monitor
linkedin-monitor setup
linkedin-monitor enable
The script outputs a prompt-like instruction block for an agent to browse LinkedIn, parse messages, update state, draft replies in the user's voice, and post results. This is a true prompt-execution surface because unstructured instructions are being handed to downstream automation with authority to access external content and perform write actions, increasing the risk of prompt injection, unintended data extraction, and unauthorized autonomous messaging.
# This script is called by the cron, which then invokes Clawdbot
# to do the browser work and parse results
# Output instruction for Clawdbot cron
cat << 'EOF'
LINKEDIN_BROWSER_CHECK
Instructions for Clawdbot:
This code reads authentication cookies from a local credentials file, which is credential access behavior even if done for the tool's stated purpose. In the context of a monitoring skill, consuming stored browser-session material is dangerous because any code path that can access the file can impersonate the user on LinkedIn.
if not li_at or not jsessionid:
# Try loading from config
config_path = os.path.expanduser('~/.clawdbot/linkedin-monitor/credentials.json')
if os.path.exists(config_path):
with open(config_path) as f:
creds = json.load(f)
This code persists LinkedIn session cookies to a local credentials file, creating a durable stash of reusable authentication material. Because these values are sufficient to act as the user, file theft or accidental exposure can directly lead to account takeover and unauthorized message access.
config_dir = os.path.expanduser('~/.clawdbot/linkedin-monitor')
os.makedirs(config_dir, exist_ok=True)
config_path = os.path.join(config_dir, 'credentials.json')
with open(config_path, 'w') as f:
json.dump({
'li_at': li_at,
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
- Identify INBOUND messages (where last message is NOT from me)
STEP 4: Compare against state
- For each inbound message, create unique ID: {name}_{timestamp}
- Check if ID exists in seenIds
- Collect only NEW messages (ID not in seenIds)
The instructions direct the agent to forward message previews and drafted replies derived from private LinkedIn conversations to external messaging platforms, but they do not include a clear privacy warning or explicit consent step. This can leak personal, confidential, or regulated content into third-party systems with different retention, access control, and logging practices.
The skill description frames behavior as inbox monitoring and drafting, but the cron payload broadens data delivery to arbitrary third-party channels like Discord, Telegram, Slack, and WhatsApp. That scope expansion increases data exposure risk because LinkedIn message content and AI-generated replies are transmitted outside LinkedIn without clear limitation, creating an unexpected data-sharing surface.
The opening description emphasizes inbox monitoring and notifications, but later sections describe drafting replies, auto-replying, and booking meetings. This mismatch can mislead users about the skill's actual capabilities and trust boundary, especially because it operates on a logged-in browser session tied to a real LinkedIn account.
The README advertises hourly monitoring, draft generation, and approval workflows without a clear privacy warning that the skill continuously accesses LinkedIn message content. Users may not realize that private inbox data is being repeatedly read, processed, stored in state/logs, and potentially forwarded to external alerting channels.
The README claims 'nothing sent without your OK' while also documenting autonomy levels that can automatically reply and book meetings. This is dangerous because users may enable the skill under a false assumption that outbound actions always require approval, leading to unintended communications from their account.
The skill depends on a browser profile remaining logged into LinkedIn and staying open, which creates persistent authenticated session exposure. If the local environment, browser profile, or automation tooling is compromised, an attacker could inherit access to the user's LinkedIn account and messages.
## Setup Guide
### Step 1: Create a Browser Profile
LinkedIn Monitor uses Clawdbot's browser tool to check your inbox. You need a browser profile that's logged into LinkedIn.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Drafts are generated using your communication style from USER.md in your Clawdbot workspace.
If you don't have a USER.md, create one with your preferences:
# USER.md
The skill advertises behavior that would require filesystem access and likely environment interaction, but it does not declare any explicit tool scope or permissions boundary. That creates ambiguity about what the skill is allowed to access and makes it harder for a runtime or reviewer to enforce least privilege, increasing the chance of overbroad file writes or secret exposure.
The skill supports autonomous sending and booking actions affecting a user's LinkedIn account, calendar, and professional reputation, but the description does not prominently warn about those consequences. Users may enable higher autonomy without understanding that external communications and meetings could be initiated on their behalf.
No suspicious patterns detected.