laravel-security

laravel-security is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 55 tokens per session (6,476 once invoked), scanned A, a copy of laravel-security, MIT.

Security guidance for Laravel, a PHP framework for building web applications. It covers login and permissions, safe database queries, protection against common browser attacks, API security, and secure deployment settings.

In plain words
What is it for?
Use it when setting up authentication and user roles, reviewing Eloquent database code, securing APIs, checking CSRF and XSS protections, or preparing a Laravel app for production.
Why use it?
It helps prevent common security mistakes in Laravel apps, such as exposing sensitive configuration, allowing unauthorized access, or accepting unsafe input. It also provides checks for production settings that are easy to overlook.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting up authentication and user roles, reviewing Eloquent database code, securing APIs, checking CSRF and XSS protections, or preparing a Laravel app for production.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/laravel-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gongyijie85/dsh-ecc --skill laravel-security
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for laravel-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/laravel-security"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/laravel-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,476 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.06476
Opus 5 $0.00028 $0.03238
Sonnet 5 $0.00011 $0.01295
Haiku 4.5 $0.00006 $0.00648

Measured 9d ago against content hash 0440ddff450c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

laravel-security scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

axios.defaults.headers.common['X-CSRF-TOKEN'] = document.querySelector(
Origin

This is a copy

92% identical to laravel-security — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/laravel-security/SKILL.md · 949 lines

How it starts

The opening of the file, as written. The whole thing — 949 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel Security Best Practices

Comprehensive security guidelines for Laravel applications to protect against common vulnerabilities.

When to Activate

  • Setting up Laravel authentication and authorization (Sanctum, Passport, Jetstream, Breeze)
  • Implementing user roles, permissions, and policies
  • Configuring production security settings and environment variables
  • Reviewing Laravel applications for security vulnerabilities
  • Deploying Laravel applications to production
  • Writing secure Eloquent queries and migrations

Production Configuration

Essential Production Settings

// config/app.php
'env' => env('APP_ENV', 'production'),
'debug' => (bool) env('APP_DEBUG', false), // CRITICAL: Never true in production
'key' => env('APP_KEY'), // Must be set: php artisan key:generate

// config/session.php
'secure' => env('SESSION_SECURE_COOKIE', true),
'http_only' => true,
'same_site' => 'lax',

// Verify APP_KEY is set at boot
// bootstrap/app.php or a service provider
if (empty(config('app.key'))) {
    throw new RuntimeException('APP_KEY is not set. Run: php artisan key:generate');
}

Environment File Security

# NEVER commit .env to version control
# .gitignore already includes .env by default

# Use .env.example with placeholders instead
DB_PASSWORD=
APP_KEY=
SANCTUM_TOKEN_PREFIX=

# Validate required variables at boot
// In AppServiceProvider::boot()
$requiredKeys = ['app.key', 'database.connections.mysql.database', 'database.connections.mysql.username'];
foreach ($requiredKeys as $key) {
    if (empty(config($key))) {
        throw new RuntimeException("Missing required config key: {$key}");
    }
}

HTTPS Enforcement

// AppServiceProvider::boot() or middleware
if (app()->environment('production')) {
    URL::forceScheme('https');
    request()->server->set('HTTPS', 'on');
}

// config/app.php for trusted proxies (load balancers)
// Use specific IP ranges — * trusts all, allowing X-Forwarded-* spoofing
// AWS: '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'
'trusted_proxies' => ['10.0.0.0/8', '172.16.0.0/12'],

// Force HTTPS in production via middleware
// app/Http/Middleware/ForceHttps.php
public function handle($request, Closure $next)
{
    if (!$request->secure() && app()->environment('production')) {
        return redirect()->secure($request->getRequestUri());
    }
    return $next($request);
}

Read the full file on GitHub · 949 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 949 lines · 55 tokens per session scan A 0440ddff450c

Subscribe to this mod's changes

laravel-security is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 6,476 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 92% identical to laravel-security, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

dsh-web-pet-developer

Create a pet for the dsh-pet plugin and integrate it into the dsh web GUI — author a v2 pet.json manifest plus an 8-column x 9-row atlas per the Codex/hatch-pet contract (live2d pets, voice packs and status decorations included), drop it into the pet-center user directory or contribute it as a built-in asset under…

zhu1090093659/dsh-web · 162 tokens

xiaohongshu-search

A tool for searching and ranking popular Xiaohongshu posts, a Chinese social content platform. It uses keywords, engagement, relevance, and recency to recommend content and related search directions.

redfox-data/redfox-community-dsh · 61 tokens

investor-distiller

An analysis tool for studying investment bloggers on WeChat, a Chinese messaging and publishing platform. It collects their articles and builds a structured profile of their trading methods, market views, writing style, topics and audience interaction.

redfox-data/redfox-community-dsh · 113 tokens

playlet-douyin-feed

A tool that tracks popular short dramas on Douyin, a Chinese short-video platform, and creates a daily HTML report with covers, engagement data, links, topic groups, and writing observations.

redfox-data/redfox-community-dsh · 264 tokens

account-video-downloader

A command-line tool that lists and downloads videos and image posts from a creator’s account on Douyin, Kuaishou, Bilibili, or YouTube.

redfox-data/redfox-community-dsh · 187 tokens