Index of every page on this site: llms.txt
All skills
Run it yourself

Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch.

  • 37 files
  • 112 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/generative-computing/mellea-skills-compiler/sentryfindbugsmellea

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

sentry-find-bugs

Find bugs, security vulnerabilities, and code quality issues in local branch changes.


What it does

sentry-find-bugs performs a structured five-phase security review of all code changes on your current git branch. It gathers the full diff, maps the attack surface of every changed file, runs an 11-item OWASP-aligned security checklist, verifies each potential issue with additional context, and produces a pre-audited FindingsReport containing only confirmed, real issues with severity ratings, evidence, and concrete fix suggestions.

The pipeline skips stylistic issues and never invents findings — if nothing is found, it says so explicitly.

Quickstart

# From inside your git repository
sentry-find-bugs

# Or supply a diff directly
sentry-find-bugs --diff "$(git diff main...HEAD)"

# JSON output
sentry-find-bugs --output-format json

Output

Found 2 issue(s):

  [Critical] api/views.py:18
  Problem:   Raw SQL string formatting with user-controlled input
  Evidence:  Line 18 uses f-string interpolation of request.GET parameter into SQL query
  Fix:       Replace with parameterized query: cursor.execute("SELECT ... WHERE username = %s", [username])
  Refs:      OWASP A03:2021 - Injection

  [High] api/admin_actions.py:12
  Problem:   Authorization check absent — any authenticated user can delete any order
  Evidence:  login_required decorator confirms identity but does not verify ownership of order_id
  Fix:       Add ownership check: if order.user != request.user and not request.user.is_staff: return 403
  Refs:      OWASP A01:2021 - Broken Access Control

Reviewed files:
  api/views.py
  api/admin_actions.py
  api/urls.py

Pipeline phases

Phase Description Mellea primitive
1 Gather diff + list modified files main.py:gather_diff + @generative slot
2 Attack surface mapping Two-step @generative + m.instruct(format=AttackSurfaceMap)
3 11-item security checklist per file m.instruct(format=SecurityChecklist)
4 Per-issue verification m.instruct(format=IssueVerdict)
5 Pre-conclusion audit + final report m.instruct(format=FindingsReport, requirements=[...])

Security checklist categories

Injection · XSS · Authentication · Authorization/IDOR · CSRF · Race conditions · Session · Cryptography · Information disclosure · DoS · Business logic

Requirements

  • Python ≥ 3.11
  • ollama running with granite4.1:3B pulled
  • git CLI on PATH
  • gh CLI (GitHub CLI) authenticated (for automatic default-branch detection)

See SETUP.md for install and configuration instructions.

Injectable tool parameters

The pipeline accepts two optional callable parameters for deeper analysis:

Parameter Default Purpose
search_fn stub (NotImplementedError) Searches repo for test files covering a scenario
read_file_fn stub (NotImplementedError) Reads surrounding file context for issue confirmation

Both stubs are handled gracefully — the pipeline falls back to diff-only analysis when they raise NotImplementedError. See SETUP.md §8 for recommended implementations.

Package layout

sentry_find_bugs_mellea/
  pipeline.py          # run_pipeline() — main entry point
  config.py            # BACKEND, MODEL_ID, PREFIX_TEXT, constants
  schemas.py           # Pydantic models: FindingsReport, IssueReport, etc.
  slots.py             # @generative slots: extract_modified_files, extract_attack_surface_raw
  requirements.py      # Mellea Requirements: audit_completeness_req, no_invented_issues_req
  constrained_slots.py # Stubs: search_fn, read_file_fn (implement before production use)
  main.py              # CLI entry point
  fixtures/            # 6 test fixtures (run with pytest)
  SETUP.md             # Setup and stub implementation guide
  melleafy.json        # Package manifest
  mapping_report.md    # Full element-to-primitive mapping documentation

Generated by

melleafy 4.3.2 from spec.md (agent_skills_std runtime).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 3cb711d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago

README badge

README badge for generative-computing/mellea-skills-compiler/sentryfindbugsmellea