agentleFS
soden46soden46/syarif-laravel-ai-skills/skills/security/SKILL.md

security

Skill4 starsChanged 5 months agoMITView on GitHub

Run focused Laravel security checks for authorization, request forgery, rate limits, uploads, secrets, APIs, and configuration.

78 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cost-reducer, trigger-dev and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • daianepepes-labSkill

    cost-reducer

    Analyze and reduce costs across cloud infrastructure, code, and services. Use when asked to cut costs, optimize spending, reduce bills, or improve cost efficiency.

    Also in 5 projects that use this

  • xfstudioSkill

    trigger-dev

    Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    scalability

    Core foundational concepts and principles for Scalability

    Also in 4 projects that use this

  • daianepepes-labSkill

    self-healing

    Detect, diagnose, and automatically fix recurring errors, memory issues, and system degradation. Use when a system has recurring failures, memory leaks, performance degradation, or needs automatic recovery mechanisms.

    Also in 5 projects that use this

  • xfstudioSkill

    customer-support

    Elite AI-powered customer support specialist mastering

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    cicd

    Continuous integration and delivery pipelines

    Also in 4 projects that use this

  • +1 more from daianepepes-lab

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a focused security pass whenever work touches authentication, authorization, input handling, uploads, external integrations, …

    line 11
  2. Distinctive:

    Every route/action that reads or mutates protected data needs authorization.

    line 15
  3. Distinctive:

    Test both allowed and denied paths.

    line 24
  4. Distinctive:

    Use CSRF protection for browser forms.

    line 28
  5. Distinctive:

    Keep credentials in environment/config, not database-backed admin settings or source files.

    line 55
  6. Distinctive:

    Use structured logs with safe identifiers and sanitized summaries.

    line 66
  7. Distinctive:

    avoid leaking internal IDs when public identifiers are needed.

    line 85
  8. Distinctive:

    add compatibility tests for consumed response shapes.

    line 86
  9. Distinctive:

    When dependency or deployment configuration changes are in scope:

    line 90
  10. Distinctive:

    check for known advisories.

    line 92
  11. Distinctive:

    avoid exposing frontend env values that are not meant for browsers.

    line 94
  12. Distinctive:

    verify production debug settings are safe.

    line 95

“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security

Run a focused security pass whenever work touches authentication, authorization, input handling, uploads, external integrations, payment-like flows, public APIs, or sensitive data.

Access Control

Every route/action that reads or mutates protected data needs authorization.

Use:

  • route middleware for coarse access boundaries;
  • Policies for model actions;
  • Gates for cross-cutting checks;
  • Form Request authorize() for request-input-dependent checks.

Test both allowed and denied paths.

Request Forgery And Rate Limits

Use CSRF protection for browser forms. Exclude webhooks only deliberately, and authenticate webhook requests through signatures, shared secrets, IP allowlists, or provider verification as appropriate.

Apply rate limits to abuse-prone routes such as login, password reset, public forms, file uploads, and expensive API endpoints.

Input And Output Safety

Validate all request input at the boundary. Use query builder bindings or Eloquent instead of interpolated raw SQL.

Escape output in Blade. Be deliberate about HTML rendering.

For frontend stacks, expose only the props needed by the page. Do not send hidden sensitive data because it is "not displayed."

Uploads And Files

Validate uploaded files for:

  • required/optional state;
  • MIME/type;
  • extension if relevant;
  • size;
  • count;
  • image dimensions when needed.

Store files through Laravel Storage. Do not trust original filenames for storage paths. Keep visibility explicit.

Secrets And Logs

Keep credentials in environment/config, not database-backed admin settings or source files.

Do not log:

  • tokens;
  • signatures;
  • passwords;
  • card data;
  • full provider payloads;
  • unnecessary personally identifiable information.

Use structured logs with safe identifiers and sanitized summaries.

Log::info('integration.gateway.create.completed', [
    'record_id' => $record->id,
    'reference' => $record->public_reference,
    'provider_status' => $response->status(),
]);

API Security

For APIs:

  • return consistent errors;
  • hide stack traces;
  • validate input;
  • authorize every action;
  • apply rate limits;
  • avoid leaking internal IDs when public identifiers are needed;
  • add compatibility tests for consumed response shapes.

Dependency And Configuration Review

When dependency or deployment configuration changes are in scope:

  • check for known advisories;
  • remove unused packages;
  • avoid exposing frontend env values that are not meant for browsers;
  • verify production debug settings are safe.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.