Back to skill

Security audit

Indie App Marketing Pipeline

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real social-post scheduling skill, but it should be reviewed because editable content can lead to local command execution and the setup stores a posting API key without strong safeguards.

Review and harden before installing. Replace execSync command-string execution with argument-based execFile or spawn, remove eval from setup.sh, protect .env with owner-only permissions and .gitignore, avoid overwriting existing secrets, use a least-privilege Postiz key, and only enable cron after dry-running and validating all content-bank and plan files.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/daily-publisher.js:209
Finding

Shell Command Injection in Video Generator Invocation

Content
View full analysis
/tmp/video-gen-command-injection", "hook": "Example", "texts": ["A", "B", "C"], "caption": "Example" } ``` The generated command would contain: ```sh node "/configured/video-generator.js" --angle normal-id; id > /tmp/video-gen-command-injection --schedule "..." ``` Using a configured video-generation script is legitimate functionality, but invoking it through a shell is unnecessary. ### Attack Path 1. An attacker persuades a user to import a crafted content bank, or otherwise obtains write access to `cont ...[truncated 1150 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup.sh:34
Finding

Arbitrary Command Execution Through eval in Setup Prompts

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup.sh:148
Finding

Postiz API Key Written Without Explicit Restrictive Permissions

Content
View full analysis
"$TARGET_DIR/.env" << ENVEOF # Indie App Marketing Pipeline — environment variables # Generated by setup.sh POSTIZ_API_KEY=${POSTIZ_KEY} ENVEOF echo " ✓ .env" ``` ### Technical Analysis The setup script stores the Postiz API key in a plaintext `.env` file but does not establish a restrictive umask or explicitly apply mode `0600`. The resulting permissions depend on the invoking user's environment. Under a common `022` umask, a newly created file can be readable by other local users. The redirection also unconditionally truncates an existing `.env` file without confirmation, potentially deleting unrelated secrets or configuration. Plaintext local storage may be necessary for unattended publishing, but least privilege requires limiting access to the publisher account. The current implementation does not enforce that boundary. ### Attack Path 1. The user runs `setup.sh` and enters a valid Postiz API key. 2. The script creates `.env` using the current process umask. 3. On a shared or multi-user system with permissive resulting permissions, another local account reads the file. 4. The other account obtains the Postiz API key. 5. Depending on the key's Postiz permissions, it can use the API to interact with the user's connected social-media integrations. A separate availability path exists when an already populated `.env` file is silently truncated during setup. ### Impact Assessment Exposure of the API key may permit unauthorized scheduling or management of posts through the associated Postiz account and connected integrations, within the API key's server-side permissions. It may also expose private Po ...[truncated 268 chars]
Remediation
View remediation
&2 exit 1 fi cat > "$TARGET_DIR/.env" << ENVEOF # Indie App Marketing Pipeline — environment variables # Generated by setup.sh POSTIZ_API_KEY=${POSTIZ_KEY} ENVEOF chmod 600 "$TARGET_DIR/.env" ``` Further hardening should include: 1. Warn users that `.env` must not be committed to source control and create or update `.gitignore` accordingly. 2. Prefer a platform credential store or secrets manager where practical. 3. Use a dedicated Postiz API key with only the permissions required to schedule posts. 4. Provide an explicit credential-rotation procedure. 5. Avoid placing the API key directly in `config.json` or command-line arguments. 6. Preserve existing `.env` content or require explicit user confirmation before replacement. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 144)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 145)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 147)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 175)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 206)May include surrounding context.

md
node scripts/weekly-planner.js --dry-run # preview

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 153)May include surrounding context.

md
node scripts/daily-publisher.js --dry-run # preview today

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 154)May include surrounding context.

md
node scripts/daily-publisher.js --dry-run # preview today

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 155)May include surrounding context.

md
node scripts/daily-publisher.js --dry-run # preview today

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 156)May include surrounding context.

md
node scripts/daily-publisher.js --dry-run # preview today

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 166)May include surrounding context.

md
node scripts/daily-publisher.js --dry-run # preview today

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/daily-publisher.js (reported line 63)May include surrounding context.

js
// ── .env loader ──────────────────────────────────────────────────────────────
function loadEnv(dir) {
  const envPath = path.join(dir, '.env');
  if (!fs.existsSync(envPath)) return;
  for (const line of fs.readFileSync(envPath, 'utf-8').split('\n')) {
    const t = line.trim();

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/daily-publisher.js (reported line 61)May include surrounding context.

js
# What it does:
#   1. Creates directory structure (plans/, logs/)
#   2. Copies template files (content-templates.json, sample content bank)
#   3. Prompts for env vars and writes .env + config.json
#   4. Creates posting-history.json
#   5. Creates a sample fb-brand-content-bank.json

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/daily-publisher.js (reported line 96)May include surrounding context.

js
# What it does:
#   1. Creates directory structure (plans/, logs/)
#   2. Copies template files (content-templates.json, sample content bank)
#   3. Prompts for env vars and writes .env + config.json
#   4. Creates posting-history.json
#   5. Creates a sample fb-brand-content-bank.json

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 10)May include surrounding context.

sh
# What it does:
#   1. Creates directory structure (plans/, logs/)
#   2. Copies template files (content-templates.json, sample content bank)
#   3. Prompts for env vars and writes .env + config.json
#   4. Creates posting-history.json
#   5. Creates a sample fb-brand-content-bank.json

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

At this point the script begins creating a .env file that will contain the Postiz API key in plaintext. Persisting credentials on disk is not inherently malicious, but without restrictive permissions, explicit consent, or anti-leak safeguards, it increases the chance of local disclosure or accidental source-control exposure.

Content

Scanner excerpt · scripts/setup.sh (reported line 146)May include surrounding context.

sh
echo "  → fb-brand-content-bank.json already exists, skipping"
fi

# ── Write .env ────────────────────────────────────────────────────────────────
echo -e "${GREEN}Writing .env...${NC}"
cat > "$TARGET_DIR/.env" << ENVEOF
# Indie App Marketing Pipeline — environment variables

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The redirection to "$TARGET_DIR/.env" is part of the secret persistence flow and contributes to writing a sensitive credential to a plaintext file. In the context of an automation pipeline that may live in a developer workspace or repo, this creates realistic exposure risk if the directory is shared, backed up, or committed.

Content

Scanner excerpt · scripts/setup.sh (reported line 148)May include surrounding context.

sh
# ── Write .env ────────────────────────────────────────────────────────────────
echo -e "${GREEN}Writing .env...${NC}"
cat > "$TARGET_DIR/.env" << ENVEOF
# Indie App Marketing Pipeline — environment variables
# Generated by setup.sh

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This line writes the API key value directly into the generated .env file, leaving a usable credential in plaintext at rest. If an attacker gains access to the workstation, project directory, logs, or repository copy, they may be able to reuse the token to post content or access the associated Postiz account.

Content

Scanner excerpt · scripts/setup.sh (reported line 154)May include surrounding context.

sh
POSTIZ_API_KEY=${POSTIZ_KEY}
ENVEOF
echo "  ✓ .env"

# ── Write config.json ─────────────────────────────────────────────────────────
echo -e "${GREEN}Writing config.json...${NC}"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly requires an environment variable (POSTIZ_API_KEY) and describes automatic interaction with the external Postiz API, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens least-privilege controls and can cause operators to grant broader execution, environment, or network access than intended for a skill that performs outbound scheduling actions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 163)May include surrounding context.

bash
# Open crontab
crontab -e

# Add line (runs at 7:00 AM daily):
0 7 * * * cd /path/to/your-app-marketing && node scripts/daily-publisher.js >> logs/cron.log 2>&1

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

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.

Content

Scanner excerpt · scripts/setup.sh (reported line 221)May include surrounding context.

sh
```bash
# Open crontab
crontab -e

# Add line (runs at 7:00 AM daily):
0 7 * * * cd /path/to/your-app-marketing && node scripts/daily-publisher.js >> logs/cron.log 2>&1

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 169)May include surrounding context.

0 7 * * * cd /path/to/your-app-marketing && node scripts/daily-publisher.js >> logs/cron.log 2>&1

text

Or use a launchd plist for more control.

## Customization

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/daily-publisher.js (reported line 83)May include surrounding context.

js
echo ""
echo "── Postiz Setup ────────────────────────────────────"
echo "  Get your API key from: https://app.postiz.com/settings (or your self-hosted instance)"
prompt "Postiz API URL"                "https://api.postiz.com/public/v1" POSTIZ_URL
prompt "Postiz API key"                ""          POSTIZ_KEY

echo ""

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/setup.sh (reported line 65)May include surrounding context.

sh
echo ""
echo "── Postiz Setup ────────────────────────────────────"
echo "  Get your API key from: https://app.postiz.com/settings (or your self-hosted instance)"
prompt "Postiz API URL"                "https://api.postiz.com/public/v1" POSTIZ_URL
prompt "Postiz API key"                ""          POSTIZ_KEY

echo ""

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script interactively collects a Postiz API key and writes it to a plaintext .env file in the target directory without warning about local secret storage, file permissions, or the risk of committing the file to version control. In a marketing automation skill, this is a real secret-handling weakness because the generated project is likely to be stored alongside other app files and may be backed up, shared, or accidentally published.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/daily-publisher.js:220

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/daily-publisher.js:75