Back to skill

Security audit

Ko-fi Webhooks

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill benign with medium confidence: the reported findings appear consistent with its stated webhook purpose, though one referenced path was unresolved and the scan is partial.

The verdict is benign, not risk-free. Before installing, consider whether you are comfortable with the undeclared tool scope and deployment steps involving systemd and sudo. Evidence is incomplete: one local path-like reference could not be resolved, although all seven listed components were scanned.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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 · references/deployment.md (reported line 75)May include surrounding context.

md
1. Confirm this is a first activation and that the intended production DB does not contain existing payment history. Do not truncate or replace an existing production DB.
2. Move **only this deployment's** `testing.conf` outside the active drop-in directory into the private deployment backup. Keep the test DB and receipt. Do not remove other drop-ins.
3. Run `systemctl daemon-reload` and restart the configured service. Verify the effective environment selects `events.sqlite3` under the manifest's `state_dir`, internal health is OK, and the service is active and enabled.
4. Check production starts with zero records and test records remain unchanged. Do not insert synthetic events into production to prove it works. If real payments arrive during activation, inspect and preserve them instead of enforcing emptiness destructively.
5. Record the endpoint, live-delivery evidence, production DB path and startup status in workspace notes. Distinguish successful activation from historical-payme

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/deployment.md (reported line 86)May include surrounding context.

Obtain the actual SSH target/key and deployment manifest from the user's configuration. Perform reports on the host holding the live database. In the remote shell, assign SERVICE, PYTHON, HELPER, PROD_DB, and PORT from that configuration (HELPER is app_dir plus /kofi_webhooks.py; PROD_DB is state_dir plus /events.sqlite3). Then run:

sh
sudo systemctl is-active "$SERVICE"
sudo systemctl is-enabled "$SERVICE"
sudo systemctl show "$SERVICE" --property=Environment --value
curl --fail --silent "<redacted-url>"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/deployment.md (reported line 87)May include surrounding context.

sh
sudo systemctl is-active "$SERVICE"
sudo systemctl is-enabled "$SERVICE"
sudo systemctl show "$SERVICE" --property=Environment --value
curl --fail --silent "<redacted-url>"
sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" summary

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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 · references/deployment.md (reported line 87)May include surrounding context.

sh
sudo systemctl is-active "$SERVICE"
sudo systemctl is-enabled "$SERVICE"
sudo systemctl show "$SERVICE" --property=Environment --value
curl --fail --silent "<redacted-url>"
sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" summary

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/deployment.md (reported line 88)May include surrounding context.

sh
sudo systemctl is-active "$SERVICE"
sudo systemctl is-enabled "$SERVICE"
sudo systemctl show "$SERVICE" --property=Environment --value
curl --fail --silent "<redacted-url>"
sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" summary
sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" list --limit 20

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/deployment.md (reported line 90)May include surrounding context.

sudo systemctl is-enabled "$SERVICE" sudo systemctl show "$SERVICE" --property=Environment --value curl --fail --silent "" sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" summary sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" list --limit 20

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/deployment.md (reported line 91)May include surrounding context.

sudo systemctl show "$SERVICE" --property=Environment --value curl --fail --silent "" sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" summary sudo "$PYTHON" -B "$HELPER" --db "$PROD_DB" list --limit 20

text

Keep `--db` before the subcommand. Exports use the same explicit production DB and a private, previously nonexistent output file. Default exports redact private fields; use `--include-private` only when the requested output calls for those fields. For DynamicUser state directories, use authorized administrative read access rather than weakening directory permissions.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/test_kofi_webhooks.py (reported line 57)May include surrounding context.

python
conn.close()

    def cli(self, *args):
        return subprocess.run([sys.executable, str(Path(kofi.__file__)), '--db', str(self.db), *args],
                              capture_output=True, text=True, encoding='utf-8', check=True)

    def test_default_database_uses_user_data_directory(self):