Back to skill

Security audit

Laravel Forge

Security checks for vulnerabilities and agentic risk

Overview

This skill honestly wraps Laravel Forge, but it gives an agent broad infrastructure-changing power with weak safeguards around destructive actions and secrets.

Install only for trusted operators managing Forge infrastructure. Use a narrowly scoped token where possible, secure the config file with owner-only permissions, avoid passing secrets directly on the command line, and require human review before delete, credential, role/team, deployment-script, scheduled-job, firewall, or remote-command operations.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:34
Finding

Credential setup instructions do not enforce restrictive filesystem permissions

Content
View full analysis
~/.openclaw/credentials/laravel-forge/config.json ``` ### Technical Analysis The recommended setup stores a Laravel Forge API token in a local plaintext JSON file but does not explicitly restrict the permissions of either the credentials directory or the file. Their resulting permissions depend on the user's current `umask`. Under a permissive `umask`, another local user or process may be able to read the configuration file. The script subsequently treats the token in this file as an authentication credential for infrastructure-management operations. The credential-file mechanism itself is necessary for the declared functionality, but secure permissions should be enforced when recommending its creation. ### Attack Path 1. A user follows the documented credential-file setup. 2. The user's active `umask` permits group or other read access. 3. The Forge token is written to `config.json` with insufficiently restrictive permissions. 4. Another local account or compromised process reads the file. 5. The attacker submits authenticated requests to Laravel Forge using the stolen token. 6. The attacker performs any operation allowed by the token's Forge permissions. ### Impact Assessment Successful exploitation discloses the Laravel Forge API token and default organization identifier. Depending on the token's scope and the victim's Forge privileges, an attacker may be able to inspect or modify servers and sites, access logs and configuration, trigger deployments, manage databases, alter firewall rules, register SSH keys, run remote commands, or delete infrastructure resources. The issue does not independently elevate local operating-system privileges; ...[truncated 93 chars]
Remediation
View remediation
"$HOME/.openclaw/credentials/laravel-forge/config.json" chmod 600 "$HOME/.openclaw/credentials/laravel-forge/config.json" ``` Additional hardening measures: - Prefer injecting the token from an operating-system secret manager. - Validate at runtime that the credential file is owned by the current user and is not group- or world-readable. - Reject insecure file permissions rather than silently loading the token. - Recommend a narrowly scoped Forge token instead of a broadly privileged account token. - Document token rotation and immediate revocation procedures for suspected disclosure. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/laravel-forge.sh:38
Finding

API tokens and request-body secrets are exposed through process command-line arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (47)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
path: scripts/laravel-forge.sh

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

This command performs server deletion directly from user-supplied parameters with no confirmation, allowlist, or policy guard. In an agent setting, parameter abuse or prompt-induced misuse could cause irreversible deletion of production infrastructure.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 206)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "server-id required"
      api DELETE "/orgs/$org/servers/$1" ;;
    
    action)
      [[ ${1:-} ]] || die "server-id required"; local sid=$1; shift

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 222)May include surrounding context.

sh
unarchive)
      [[ ${1:-} ]] || die "server-id required"
      api DELETE "/orgs/$org/servers/archives/$1" ;;
    
    events)
      [[ ${1:-} ]] || die "server-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This action uninstalls a PHP version on a server using a direct identifier supplied by the caller. In an agent-controlled workflow, misuse could remove required runtime versions and break hosted applications or deployments.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 352)May include surrounding context.

sh
uninstall)
      [[ ${1:-} ]] || die "php-version required"
      api DELETE "/orgs/$org/servers/$sid/php/versions/$1" ;;
    
    fpm-config)
      [[ ${1:-} ]] || die "php-version required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Disabling opcache is a state-changing operation that can materially affect application performance and behavior, and it is executed without guardrails. In an autonomous or semi-autonomous agent context, parameter misuse could trigger service degradation unexpectedly.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 403)May include surrounding context.

sh
api POST "/orgs/$org/servers/$sid/php/opcache" ;;
    
    disable-opcache)
      api DELETE "/orgs/$org/servers/$sid/php/opcache" ;;
    
    *) cat <<'EOF'
php: cli-version <srv> | update-cli-version <srv> --php-version V

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting a background process by raw ID can stop critical workers or daemons and impair application functionality. Because the skill is designed for remote infrastructure control, a mistaken or manipulated parameter can directly disrupt production workloads.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 471)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "process-id required"
      api DELETE "/orgs/$org/servers/$sid/background-processes/$1" ;;
    
    log)
      [[ ${1:-} ]] || die "process-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Firewall rule deletion is a sensitive administrative action that can expose services or cut off intended protections. With no confirmation or policy checks, an agent or user error can materially weaken network security posture.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 519)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "rule-id required"
      api DELETE "/orgs/$org/servers/$sid/firewall-rules/$1" ;;
    
    *) cat <<'EOF'
firewall: list <srv> | get <srv> <rule-id> | delete <srv> <rule-id>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting site-scoped scheduled jobs can disable maintenance, backups, or security tasks and is performed directly from caller-supplied identifiers. In an agent execution context, this creates a realistic risk of accidental operational disruption.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 559)May include surrounding context.

sh
api POST "/orgs/$org/servers/$sid/sites/$siteid/scheduled-jobs" "$body" ;;
      delete)
        [[ ${1:-} ]] || die "job-id required"
        api DELETE "/orgs/$org/servers/$sid/sites/$siteid/scheduled-jobs/$1" ;;
      output)
        [[ ${1:-} ]] || die "job-id required"
        api GET "/orgs/$org/servers/$sid/sites/$siteid/scheduled-jobs/$1/output" ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting server-scoped scheduled jobs can silently stop important recurring tasks such as cron automation or monitoring scripts. The skill does not provide user-facing safeguards against accidental or manipulated invocation.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 586)May include surrounding context.

sh
api POST "/orgs/$org/servers/$sid/scheduled-jobs" "$body" ;;
      delete)
        [[ ${1:-} ]] || die "job-id required"
        api DELETE "/orgs/$org/servers/$sid/scheduled-jobs/$1" ;;
      output)
        [[ ${1:-} ]] || die "job-id required"
        api GET "/orgs/$org/servers/$sid/scheduled-jobs/$1/output" ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting SSH keys from servers is a privileged action that can revoke administrative access or alter trust relationships. In an agent-integrated tool, raw parameter control over this endpoint can be abused to deny access or interfere with operations.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 634)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "key-id required"
      api DELETE "/orgs/$org/servers/$sid/ssh-keys/$1" ;;
    
    *) cat <<'EOF'
keys: list <srv> | get <srv> <key-id> | delete <srv> <key-id>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting database schemas is highly destructive and can cause irreversible data loss if backups are absent or stale. The command accepts the target ID and immediately issues the remote delete request without any safeguard.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 681)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "database-id required"
      api DELETE "/orgs/$org/servers/$sid/database/schemas/$1" ;;
    
    sync)
      api POST "/orgs/$org/servers/$sid/database/schemas/synchronizations" ;;

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting database users can break application connectivity and revoke access unexpectedly across dependent systems. In the context of an infrastructure management skill, lack of confirmation makes accidental privilege disruption more likely.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 733)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "user-id required"
      api DELETE "/orgs/$org/servers/$sid/database/users/$1" ;;
    
    *) cat <<'EOF'
db-users: list <srv> | get <srv> <user-id> | delete <srv> <user-id>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting backup configurations can disable future backups and silently reduce recovery readiness. The lack of safety interlocks is especially risky in an automation context, where a mistaken parameter may remove resilience controls.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 808)May include surrounding context.

sh
delete-config)
      [[ ${1:-} ]] || die "config-id required"
      api DELETE "/orgs/$org/servers/$sid/database/backups/$1" ;;
    
    list)
      [[ ${1:-} ]] || die "config-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting backup instances directly removes recovery points and can materially worsen the impact of later incidents. This is a sensitive destructive action exposed through simple parameterized invocation.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 824)May include surrounding context.

sh
delete)
      [[ ${1:-} && ${2:-} ]] || die "config-id backup-id required"
      api DELETE "/orgs/$org/servers/$sid/database/backups/$1/instances/$2" ;;
    
    restore)
      [[ ${1:-} && ${2:-} ]] || die "config-id backup-id required"; local cid=$1 bid=$2; shift 2

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting monitors can disable alerting for CPU, memory, or disk issues and reduce visibility into system health. In an agent context, this can weaken operational defenses without any review step.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 870)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "monitor-id required"
      api DELETE "/orgs/$org/servers/$sid/monitors/$1" ;;
    
    *) cat <<'EOF'
monitors: list <srv> | get <srv> <id> | delete <srv> <id>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting Nginx templates can affect future site configuration behavior and may break templated provisioning workflows. The script offers no friction or validation for this state-changing administrative operation.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 912)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "template-id required"
      api DELETE "/orgs/$org/servers/$sid/nginx/templates/$1" ;;
    
    *) cat <<'EOF'
nginx-templates: list <srv> | get <srv> <id> | delete <srv> <id>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 939)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "log-key required"
      api DELETE "/orgs/$org/servers/$sid/logs/$1" ;;
    
    *) cat <<'EOF'
logs: get <srv> <key> | delete <srv> <key>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

Site deletion is a destructive infrastructure operation that can cause application outage and configuration loss. Because this skill is meant for remote management and takes direct identifiers, it is susceptible to accidental or manipulated deletion when driven by an agent.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1012)May include surrounding context.

sh
delete)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"
      api DELETE "/orgs/$org/servers/$1/sites/$2" ;;
    
    healthcheck)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1062)May include surrounding context.

sh
delete-log-nginx-access)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"
      api DELETE "/orgs/$org/servers/$1/sites/$2/logs/nginx-access" ;;
    
    log-nginx-error)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1070)May include surrounding context.

sh
delete-log-nginx-error)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"
      api DELETE "/orgs/$org/servers/$1/sites/$2/logs/nginx-error" ;;
    
    log-application)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1078)May include surrounding context.

sh
delete-log-application)
      [[ ${1:-} && ${2:-} ]] || die "server-id site-id required"
      api DELETE "/orgs/$org/servers/$1/sites/$2/logs/application" ;;
    
    *) cat <<'EOF'
sites: list-all | list [<srv>] | get <site-id> | delete <srv> <site>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting domains from a site can break routing, certificate coverage, and public availability. In an agent-mediated tool, one-step deletion from raw parameters creates a realistic risk of accidental service disruption.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1146)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "domain-id required"
      api DELETE "/orgs/$org/servers/$sid/sites/$siteid/domains/$1" ;;
    
    dns-config)
      [[ ${1:-} ]] || die "domain-id required"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting a domain certificate can immediately affect TLS availability and expose users to connection failures or insecure fallback behavior. This is a high-impact administrative action exposed without any protective confirmation.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1182)May include surrounding context.

sh
delete-cert)
      [[ ${1:-} ]] || die "domain-id required"
      api DELETE "/orgs/$org/servers/$sid/sites/$siteid/domains/$1/certificate" ;;
    
    cert-action)
      [[ ${1:-} ]] || die "domain-id required"; local did=$1; shift

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting composer credentials can break dependency installation and deployment workflows for private repositories. Because it affects authentication state, unguarded invocation can cause outages or build failures in production pipelines.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1236)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "repository required"
      api DELETE "/orgs/$org/servers/$sid/sites/$siteid/composer/credentials/$1" ;;
    
    *) cat <<'EOF'
composer-credentials: list <srv> <site> | get <srv> <site> <repository>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Deleting npm credentials can disrupt package fetches for private registries and cause deployment failures. In a remote management skill, access-management changes should not occur without deliberate operator confirmation.

Content

Scanner excerpt · scripts/laravel-forge.sh (reported line 1282)May include surrounding context.

sh
delete)
      [[ ${1:-} ]] || die "registry required"
      api DELETE "/orgs/$org/servers/$sid/sites/$siteid/npm/credentials/$1" ;;
    
    *) cat <<'EOF'
npm-credentials: list <srv> <site> | get <srv> <site> <registry>

Static analysis

No suspicious patterns detected.