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.

SETUP.md

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

Setup Guide — sentry-find-bugs

Generated by melleafy 4.3.2 on 2026-04-30.


§1 Install

From the skill root (skills/sentry-find-bugs/):

pip install -e .

Verify the install:

sentry-find-bugs --help

Expected output includes usage: sentry-find-bugs [--diff DIFF] [--output-format {json,text}].


§3 Model backend

This package targets ollama with model granite4.1:3B.

Install and start ollama (if not already running):

# macOS
brew install ollama
ollama serve &

# Pull the required model
ollama pull granite4.1:3B

Verify the model is available:

ollama list | grep granite4.1:3B

These values are baked into config.py:

  • BACKEND = 'ollama'
  • MODEL_ID = 'granite4.1:3B'

To use a different backend or model, edit config.py or re-run melleafy with --backend and --model-id overrides.


§8 Generated stubs to implement

This package was generated in auto mode. Two C6 tool stubs require implementation before the full verification pipeline runs. Without them, the pipeline falls back to diff-only analysis (stubs raise NotImplementedError which is caught and ignored).

constrained_slots.py:search_fn

Source element: elem_013 — spec.md:46 — "Search for existing tests covering the scenario"

Signature: search_fn(pattern: str) -> list[str]

Purpose: Searches the repository for test files or symbols matching pattern. Used in Phase 4 to check whether an existing test already covers a detected vulnerability scenario.

Suggested implementation:

import subprocess

def search_fn(pattern: str) -> list[str]:
    result = subprocess.run(
        ["grep", "-r", "--include=*.py", "-l", pattern, "."],
        capture_output=True, text=True
    )
    return [line.strip() for line in result.stdout.splitlines() if line.strip()]

Replace the NotImplementedError body in constrained_slots.py with this implementation (or your preferred search approach).


constrained_slots.py:read_file_fn

Source element: elem_014 — spec.md:47 — "Read surrounding context to verify the issue is real"

Signature: read_file_fn(file_path: str, start_line: int, end_line: int) -> str

Purpose: Reads lines start_line..end_line (1-indexed, inclusive) from file_path. Used in Phase 4 to supply surrounding code context for issue confirmation.

Suggested implementation:

def read_file_fn(file_path: str, start_line: int, end_line: int) -> str:
    try:
        with open(file_path, "r", encoding="utf-8", errors="replace") as f:
            lines = f.readlines()
        return "".join(lines[start_line - 1:end_line])
    except OSError:
        return ""

Replace the NotImplementedError body in constrained_slots.py with this implementation.


§9 Fixtures and smoke test

Run fixtures from the skill root:

python -m pytest sentry_find_bugs_mellea/fixtures/ -v

Or run individual fixtures:

python -m pytest sentry_find_bugs_mellea/fixtures/positive_sql_injection.py -v
python -m pytest sentry_find_bugs_mellea/fixtures/clean_secure_parameterized.py -v

Available fixtures:

Fixture ID Expected behaviour
positive_sql_injection Detects SQL injection (Critical) in api/views.py
positive_missing_authz Detects Authorization/IDOR (High) in api/admin_actions.py
clean_secure_parameterized Returns no issues — well-written parameterized code
edge_empty_diff Returns empty FindingsReport with no modified files
edge_comments_only Returns no issues — comment-only changes
mixed_partial_csrf_fix Detects CSRF (Medium) on new endpoint; notes webhook exemption is intentional

Prerequisites for fixtures:

  • ollama running with granite4.1:3B loaded
  • constrained_slots.py stubs may raise NotImplementedError — the pipeline handles this gracefully, so fixtures run without implementing stubs

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