agentleFS
UfukCetinkaya57UfukCetinkaya57/backend-governance/.claude/skills/code-audit/SKILL.md

code-audit

Skill0 starsChanged 5 months agoMITView on GitHub

Otonom codebase audit — kesif, tespit, raporlama. Tum projeyi tarar.

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use database-security, malware-analysis and 7 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.
  • JeremyMorganSkill

    database-security

    Examines all database interactions for injection, access control, encryption, and data-exposure risks. Use when auditing database and data-layer security.

    Also in 3 projects that use this

  • tsaleSkill

    malware-analysis

    Professional malware analysis workflow for PE executables and suspicious files. Triggers on file uploads with requests like "analyze this malware", "analyze this sample", "what does this executable do", "check this file for malware", or any request to examine suspicious files. Performs static analysis, threat intelligence triage, behavioral inference, and produces analyst-grade reports with reasoned conclusions.

    Also in 3 projects that use this

  • jefflesterSkill

    api-security

    API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.

    Also in 3 projects that use this

  • QiuChenlySkill

    reverse-engineering

    专业二进制逆向工程分析技能。使用IDA Pro MCP工具分析二进制文件、反编译代码、识别漏洞、理解程序逻辑。当用户要求分析可执行文件、反汇编、逆向工程、漏洞挖掘、恶意软件分析时使用此技能。

    Also in 3 projects that use this

  • SentrySkill

    ui-design

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 1

    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:

    Test dosyalarinin konumu ve sayisi

    line 26

“Common” is measured: kept by at least 6 in 10 of the 19 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

Codebase Audit

Tum codebase'i sistematik olarak tara, sorunlari tespit et, rapor olustur. Bu skill quality-gate'ten FARKLIDIR: quality-gate gorev bazli (degisen dosyalar), code-audit proje bazli (tum codebase).

Ne Zaman Kullanilir

  • Projeye ilk giristte genel saglik kontrolu
  • Sprint sonu / milestone oncesi review
  • Buyuk refactor oncesi durum tespiti
  • Periyodik bakim (aylik/sprint bazli)

Faz 1: Kesif (Yapi Haritasi)

  1. Proje kok dizinini tara:
    • Klasor yapisi (Controller, Service, Repository, Model, DTO, Middleware)
    • Dosya sayilari ve buyuklukleri
    • Stack tespiti (csproj, package.json, composer.json)
    • Test dosyalarinin konumu ve sayisi
  2. Giris noktalarini belirle:
    • API endpoint'leri (controller/route dosyalari)
    • Middleware pipeline
    • DI/IoC kayitlari
    • Migration dosyalari
  3. Yapi haritasi ozeti olustur:
    src/
      Controllers/ (X dosya)
      Services/    (X dosya)
      Models/      (X dosya)
      ...
    tests/ (X dosya, coverage: ?)

Faz 2: Tespit (Sorun Tarama)

Asagidaki kategorilerde sistematik tarama yap. Her kategori icin grep pattern'leri ve dosya okuma kullan.

2A: Guvenlik (bkz. .claude/rules/guvenlik.md)

  • Hardcoded secret/password/API key
  • SQL/NoSQL injection riski (raw query + string concatenation)
  • IDOR potansiyeli (kullanici ID dogrudan parametre)
  • Hassas veri response'da (password, token, hash alanlari)
  • CORS wildcard (*) kullanimi
  • Rate limiting eksikligi
Grep pattern'leri:
- password|secret|api.?key|token.*=.*["']
- raw.*query|exec.*sql|string.*format.*select
- cors.*origin.*\*

2B: Performans (bkz. .claude/rules/kalite.md Madde 6)

  • N+1 sorgu potansiyeli (dongu icinde DB cagrisi)
  • SELECT * kullanimi
  • Pagination eksikligi (liste endpoint'leri)
  • Index eksikligi (sik sorgulanan alanlar)
  • Gereksiz eager loading veya eksik include

2C: Kod Kalitesi (bkz. .claude/rules/kalite.md Madde 9)

  • Controller'da is mantigi (Controller → Service katmanlasma ihlali)
  • Kullanilmayan import/using/require
  • Tekrar eden kod bloklari (copy-paste)
  • Cok buyuk dosyalar (>300 satir controller, >500 satir service)
  • TODO/FIXME/HACK yorumlari

2D: Hata Yonetimi (bkz. .claude/rules/kalite.md Madde 7)

  • Bos catch bloklari (exception yutma)
  • Generic exception yakalama (catch-all)
  • 500 hatasinda detay sizintisi
  • Tutarsiz hata formati

2E: Test Durumu (bkz. .claude/rules/test.md)

  • Test dosyasi olmayan service'ler
  • Integration test olmayan endpoint'ler
  • Assertion'siz testler
  • Coverage orani (olculebiliyorsa)

2F: Veritabani (bkz. .claude/rules/veri.md)

  • Rollback'siz migration
  • FK/index eksikligi
  • Isimlendirme ihlalleri (camelCase tablo/kolon)
  • Cascade delete kuralsizligi

Faz 3: Raporlama

Bulgulari asagidaki formatta raporla:

CODEBASE AUDIT RAPORU
=====================
Tarih: {tarih}
Proje: {proje adi}
Stack: {tespit edilen stack}

OZET
----
Toplam dosya: X
Toplam sorun: X (Kritik: X, Yuksek: X, Orta: X, Dusuk: X)

BULGULAR
--------
[KRITIK] {kategori} — {dosya:satir}
  Sorun: {aciklama}
  Oneri: {ne yapilmali}

[YUKSEK] {kategori} — {dosya:satir}
  Sorun: {aciklama}
  Oneri: {ne yapilmali}

...

GENEL SAGLIK
------------
Guvenlik:      [X/6 kontrol gecti]
Performans:    [X/5 kontrol gecti]
Kod Kalitesi:  [X/5 kontrol gecti]
Hata Yonetimi: [X/4 kontrol gecti]
Test:          [X/5 kontrol gecti]
Veritabani:    [X/4 kontrol gecti]

ONCELIKLI AKSIYONLAR
--------------------
1. {en kritik sorun + cozum onerisi}
2. {ikinci oncelikli}
3. {ucuncu oncelikli}

Onemli Kurallar

  • Bu skill KOD DEGISTIRMEZ — sadece tespit ve rapor
  • Fix onerileri Team Lead'e sunulur, otomatik duzeltme YAPILMAZ
  • Mevcut kalite.md ve guvenlik.md kurallarini referans alir, duplicate etmez
  • Raporu kullaniciya goster, dosyaya kaydetme gereksiz (istenirse kaydedilir)

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.