Skip to content

Releases

v0.3.0

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 24 Nov 06:07
8e3b520

pr-sentinel v0.3.0 — Release notes

Minor release: fewer false positives, Chat Completions providers, repo
instructions, and a clean inline-comment lifecycle. The reviewer, its
findings and its output format are the same shape as v0.2.4 — what
changed is what it reports, which providers it can talk to, and how it
treats its own comments on re-pushes.

What is new

1. Smart false-positive reduction in static checks

  • An added line carrying pr-sentinel: ignore inside a comment (#,
    // or /* ... */, case-insensitive) suppresses static findings on
    that exact line — for intentional fixtures such as eval() in tests.
  • Secret matches that are obvious placeholders (test/dummy/
    example/fake values, changeme, your_..., repeated
    characters, very short low-entropy values) are filtered by a
    stdlib-only Shannon entropy helper, while real high-entropy secrets
    (genuine AWS keys, private key headers, realistic sk-proj-... /
    ghp_... tokens) are still reported — with regression tests pinning
    both sides.
  • The suppression is string-aware: an ignore marker inside a quoted
    string literal (single, double, triple-quoted, or a JavaScript
    backtick template literal) no longer suppresses a finding, while a
    real comment marker after the string closes still does. ${...}
    interpolations inside template literals stay visible as code.

2. Chat Completions provider support (api_format)

  • New config setting api_format (responses by default,
    chat_completions for OpenRouter, Ollama, Groq, vLLM and any
    OpenAI-compatible provider), plus a --api-format flag on review /
    review-diff and an api_format Action input. Retry/backoff,
    timeout, JSON parsing and prompt-injection delimiters are identical
    for both formats; an invalid value is a config error.

3. Custom repo instructions

  • New instructions (inline) and instructions_file (path) config
    settings (max 4,000 chars; the file wins over the inline string; a
    missing/unreadable file or an over-cap value is a config error).
    Instructions are injected into the reviewer prompt as repository
    guidelines, clearly separated from the untrusted diff delimiters.
    The file path must stay inside the config file's directory
    (absolute paths and .. escapes are config errors), and the file
    is read bounded (at most cap+1 characters), so a very large file is
    rejected without ever loading it fully.

4. Risk-prioritized diff ordering

  • Before max_diff_chars / max_files truncation, files are sorted
    by risk tier (CI/CD and auth/security/crypto first, core source
    next, tests next, docs and lockfiles last; stable within a tier),
    so the most security-relevant files survive a cut. Hunk headers now
    keep their enclosing function/class context when rendered for the
    model.

5. Clean inline comment lifecycle

  • Inline comments carry a hidden <!-- pr-sentinel:inline -->
    marker: re-pushes no longer duplicate an identical comment from the
    bot, and threads the bot opened for findings that are now fixed are
    resolved automatically via GraphQL (resolveReviewThread). Both are
    best effort — a failed listing or GraphQL call warns on stderr and
    the review still succeeds. --dry-run never lists, posts or
    resolves anything.
  • Deduplication runs before the max_inline_comments cut, so
    previously posted findings no longer crowd out new findings on
    re-pushes.
  • The resolver only closes threads the review actually saw: it uses
    the pre-filter findings and the review coverage, so a finding hidden
    by the severity threshold — or in a file/hunk dropped by
    max_diff_chars / max_files / ignore_paths — no longer looks
    "fixed". A thread whose diff position is outdated (null line) is
    resolved only when its file was fully reviewed and has no current
    findings left.

Fixes from the external review and the bot's own reviews

  • Prompt injection via repo instructions (external review,
    Google Gemini 4 Neon).
    Guidelines no longer go into the system
    prompt: they are placed in the user message as lower-priority
    style/focus preferences, and the system prompt states explicitly
    that they can never override the core security rules, the JSON
    output schema, or instruct the reviewer to suppress or ignore
    findings. On the Responses path the system prompt is sent in the
    API's separate instructions field, with the guidelines + diff in
    input — the same separation the Chat Completions path gets from
    its system/user roles. The README advises repos with untrusted
    external PRs to load config from the base branch or a trusted
    --config path.
  • GraphQL bot-ownership check (external review). In GitHub Actions
    the author login is github-actions (no [bot] suffix) and
    GET /user fails with 403 on GITHUB_TOKEN, so auto-resolving our
    own threads never matched. The query now fetches
    author { __typename login } and a thread counts as ours when its
    root comment carries the inline marker and its author is a Bot
    (or the token user, or a [bot] login).
  • List-shaped content in chat_completions (external review).
    Providers that return message.content as a list of content blocks
    now have their text blocks joined instead of the reply being
    dropped as "no output text".
  • Two lockfile/entry bugs found while building v0.3.0.
    Cargo.lock was not recognized as a lockfile in risk ordering
    (case mismatch), and the gate-value normalizer mangled its input.
    Both fixed with regression tests.

Verification

  • 282 pytest tests, all passing (183 in v0.2.4; the rest are new
    v0.3.0 coverage: suppression, entropy/placeholder filtering,
    api_format on both paths, instructions, risk ordering, inline
    lifecycle, and the resolver coverage rules).
  • ruff check and ruff format --check clean.
  • mypy --strict src clean (10 source files, no issues).
  • twine check PASSED for the wheel and the sdist built from this
    version (pr_sentinel_ai-0.3.0-py3-none-any.whl, 50,763 bytes;
    pr_sentinel_ai-0.3.0.tar.gz, 53,723 bytes); both artifacts are
    still named pr_sentinel_ai-0.3.0 (the distribution name is
    unchanged) and contain only the package plus metadata.
  • CLI smoke test: pr-sentinel 0.3.0.
  • The v0.3.0 static checks report 0 findings on the full PR #12
    diff
    , while a synthetic diff with a realistic ghp_ token and a
    bare eval() is still caught.

Not fixed / known limitations

  • A triple-quoted string opened on a context line is not tracked.
    The ignore-marker scanner only sees added lines, so a marker inside
    a string that opens on an unchanged (context) line can still
    suppress. Documented in the code; a full fix needs the surrounding
    file content, which the reviewer does not have.
  • The Responses instructions field was proven only on a fake
    server.
    Most OpenAI-compatible providers accept it, but a strict
    provider could reject it — use api_format: chat_completions for
    such a provider.
  • The bot's self-review still reports static false positives.
    Its review runs the v0.2.4 action, so the ~20 static findings on
    PR #12 (placeholder tokens in fixtures/examples, eval() in docs
    and tests) are v0.2.4's checks, not v0.3.0's. The v0.3.0 checks
    themselves give 0 findings on the same diff.
  • Findings are suggestions, not verdicts. The AI reviewer can
    miss real bugs (experimental PR #5's unbounded-cache leak is a live
    example) and can flag code that is fine. Always verify before
    acting.

Install

pip install pr-sentinel-ai

Or use the GitHub Action — see the README quick start.

v0.2.4

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 23 Nov 11:05
f51b483

pr-sentinel v0.2.4 — Release notes

Patch release: mypy --strict now runs in CI, plus README cleanups
(naming clarification and a stale version reference). No behavior
changes — the reviewer, its findings and its output are the same as
v0.2.3.

What is new

1. mypy --strict in CI

  • The CI job now installs mypy and runs python -m mypy --strict src on every push and pull request (all four Python versions,
    3.10–3.13). Previously CI ran only pytest, ruff and the CLI smoke
    test, while mypy --strict was only run locally — so a type
    regression could have slipped through unnoticed. This closes the
    gap flagged by the independent external review (Google Gemini 4
    Neon) of v0.2.3.
  • The check covers src only: the tests are not strict-clean (433
    errors, mostly missing annotations in test helpers), so scoping the
    check to src is deliberate, not an oversight.

2. README naming clarified

  • The top of the README now states the three names plainly:
    repository and CLI command pr-sentinel, PyPI package
    pr-sentinel-ai, GitHub Marketplace action ai-pr-sentinel — so a
    newcomer is not confused by the three different names.

3. README Limitations wording fixed

  • The "English prompts" item no longer says "in v0.1.0" (stale —
    prompts are still in English in v0.2.4).

4. Version pins

  • The example workflow (examples/github-workflow.yml) and the README
    usage examples now pin @v0.2.4.

Verification

  • 183 pytest tests, all passing (no code changes in this release —
    CI config, version bump and docs only).
  • ruff check and ruff format --check clean.
  • mypy --strict src clean (10 source files, no issues).
  • twine check PASSED for the wheel and the sdist built from this
    version (pr_sentinel_ai-0.2.4-py3-none-any.whl, 35,682 bytes;
    pr_sentinel_ai-0.2.4.tar.gz, 36,579 bytes); both artifacts are
    still named pr_sentinel_ai-0.2.4 (the distribution name is
    unchanged) and contain only the package plus metadata.
  • CLI smoke test: pr-sentinel 0.2.4.

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • Findings are suggestions, not verdicts. The AI reviewer can miss
    real bugs (experimental PR #5's unbounded-cache leak is a live
    example) and can flag code that is fine. Always verify before
    acting.
  • Old inline comments are not auto-resolved. When a bug is fixed,
    the bot's summary comment updates to "No findings", but an inline
    comment on the earlier commit stays open as history (seen on PR
    #9). Slated for v0.3.0.
  • Test-fixture false positives. Fake tokens and keys in tests/
    still trigger the credential patterns — there is no allowlist or
    entropy check yet. Slated for v0.3.0.

Install

pip install pr-sentinel-ai

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.2.3

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 23 Nov 06:10
7f15a14

pr-sentinel v0.2.3 — Release notes

Patch release: the GitHub Marketplace action is now called
ai-pr-sentinel. Nothing else changes — the Python import package
stays pr_sentinel, the console command stays pr-sentinel, the
GitHub repository stays vadofespanili-cyber/pr-sentinel, and the
PyPI distribution name stays pr-sentinel-ai. This is the first
release carrying a Marketplace-listable action name.

What is new

1. Marketplace action renamed to ai-pr-sentinel

  • GitHub rejected the name pr-sentinel-ai when v0.2.2 was submitted
    to the Marketplace: an organization named pr-sentinel-ai already
    exists on GitHub, and action names must be unique across actions,
    users and organizations ("Name must be unique. Cannot match an
    existing action, user or organization name."). The 2FA requirement
    was already met (two-factor authentication is enabled on the
    account and the Marketplace Developer Agreement is accepted), so
    the name was the only blocker.
  • The name in action.yml is now ai-pr-sentinel (verified free on
    GitHub and on the Marketplace before this release). Check the
    "Publish this Action to the GitHub Marketplace" box on this
    release — v0.2.2 carries the blocked name and cannot be listed.
  • The PyPI distribution name is unaffected: pip install pr-sentinel-ai still installs this version once it is published
    there, and the GitHub Action is still used as
    vadofespanili-cyber/pr-sentinel@v0.2.3.

Verification

  • 183 pytest tests, all passing (no code changes in this release —
    action name and version bump only).
  • ruff check and ruff format --check clean.
  • mypy --strict clean.
  • twine check PASSED for the wheel and the sdist built from this
    version; both artifacts are still named pr_sentinel_ai-0.2.3
    (the distribution name is unchanged) and contain only the package
    plus metadata.
  • CLI smoke test: pr-sentinel 0.2.3.

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • Findings are suggestions, not verdicts. The AI reviewer can miss
    real bugs (experimental PR #5's unbounded-cache leak is a live
    example) and can flag code that is fine. Always verify before
    acting.

Install

pip install pr-sentinel-ai

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.2.2

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 23:15
016233a

pr-sentinel v0.2.2 — Release notes

Rename release: the distribution and the GitHub Marketplace action are
now called pr-sentinel-ai. Nothing else changes — the Python import
package stays pr_sentinel, the console command stays pr-sentinel,
and the GitHub repository stays
vadofespanili-cyber/pr-sentinel. This is the first release under the
new name, and the first version listed on the GitHub Marketplace.
PyPI publication follows once the trusted publisher is set up
(see docs/publishing.md).

What is new

1. Renamed to pr-sentinel-ai

  • The PyPI distribution name pr-sentinel is taken by an unrelated
    tool, and an action named "PR Sentinel" already exists on the
    GitHub Marketplace, so both names had to change. The distribution
    name in pyproject.toml and the name in action.yml are now
    pr-sentinel-ai.
  • Install from PyPI once this release is published there:
pip install pr-sentinel-ai
  • The pr-sentinel console command is unchanged — installing the
    pr-sentinel-ai package still provides the pr-sentinel command —
    and the GitHub Action is still used as
    vadofespanili-cyber/pr-sentinel@v0.2.2.

2. Publishing preparation

  • The package builds cleanly and passes twine check; the test
    suite is excluded from the sdist by MANIFEST.in (it contains fake
    credential fixtures that must not ship).
  • A .github/workflows/publish.yml workflow (Trusted Publishing via
    OIDC, no stored token) will publish to PyPI whenever a GitHub
    release is published — it lands in a small follow-up once the PyPI
    trusted publisher for pr-sentinel-ai is registered. See
    docs/publishing.md for the full checklist.

Verification

  • 183 pytest tests, all passing (no code changes in this release —
    rename and version bump only).
  • ruff check and ruff format --check clean.
  • mypy --strict clean.
  • twine check PASSED for the wheel and the sdist built from this
    version; both artifacts contain only the package plus metadata.
  • CLI smoke test: pr-sentinel 0.2.2.

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • Findings are suggestions, not verdicts. The AI reviewer can miss
    real bugs (experimental PR #5's unbounded-cache leak is a live
    example) and can flag code that is fine. Always verify before
    acting.

Install

pip install pr-sentinel-ai

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.2.1

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 22:44
96feaba

pr-sentinel v0.2.1 — Release notes

Patch release: the summary comment now names the commit it reviewed,
and the README shows real screenshots of the bot's live review. Both
changes are backward compatible (default behaviour unchanged: no
commit line unless one is given, same summary output otherwise).

What is new

1. "Reviewed commit" line in the summary comment

  • The summary ends with Reviewed commit: <short-sha> (first 7
    characters of the reviewed commit), after "Reviewed by
    pr-sentinel" and before the hidden <!-- pr-sentinel:summary -->
    marker — so the marker stays findable and re-pushes still update
    the comment in place.
  • New reviewed_commit Action input (optional, default "") and
    --reviewed-commit flag on review and review-diff; the
    self-review workflow passes ${{ github.event.pull_request.head.sha }}.
    The entrypoint forwards the input only when non-empty (whitespace
    is trimmed, like the other optional inputs).
  • No fallback to GITHUB_SHA: for pull_request events it is the
    merge commit, not the reviewed head, and would be misleading.
    Without a commit the summary is byte-identical to v0.2.0.

2. Real review screenshots in the README

  • The top of the README now embeds the bot's live inline comment
    (docs/screenshots/pr5-inline-comment.png) and a "See it in
    action" section shows the summary comment
    (docs/screenshots/pr5-summary-comment.png).
  • Both come from experimental PR #5, which intentionally contained
    two logic bugs (an off-by-one and an unbounded in-memory cache).
    The reviewer caught the off-by-one on line 16 with the correct fix
    and missed the cache leak — 1 of 2. The PR was closed without
    merging and its branch deleted.

3. Actions bumps (from the unreleased changes)

  • actions/checkout v4 → v5 and actions/setup-python v5 → v6 in
    the CI and self-review workflows (removes the Node.js 20
    deprecation warnings).

Verification

  • 183 pytest tests, all passing (174 in v0.2.0 + 9 new: 3 reporter,
    3 CLI and 3 entrypoint tests for the Reviewed commit line).
  • ruff check and ruff format --check clean.
  • mypy --strict clean.
  • CLI smoke tests: pr-sentinel 0.2.1; a local review-diff run
    prints Reviewed commit: <short-sha> when --reviewed-commit is
    passed and omits the line without it.

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • Findings are suggestions, not verdicts. The AI reviewer can miss
    real bugs (experimental PR #5's unbounded-cache leak is a live
    example) and can flag code that is fine. Always verify before
    acting.

Install

pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git@v0.2.1

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.2.0

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 20:06
6fccd17

pr-sentinel v0.2.0 — Release notes

Minor release: three high-impact features, all stdlib-only and backward
compatible with v0.1.2 (default behaviour unchanged: no gate, exit 0,
same summary output). Developed on PR #3, reviewed externally, then
squash-merged.

What is new

1. Optional CI gate (fail_on_severity)

  • Config key fail_on_severity, --fail-on-severity flag on review
    and review-diff (the flag wins over the config file), and the
    fail_on_severity Action input. Valid values: critical, high,
    medium, low; none (or unset) disables the gate.
  • Exit codes: 0 success (no gate, or no finding meets it), 1 at
    least one reported finding meets or exceeds the threshold, 2
    config/usage error, 3 API error.
  • The review is always posted and --json-out / --sarif-out are
    always written before exit 1. The gate only sees reported
    findings (after severity_threshold + ignore_paths filtering).
  • A warning is printed to stderr when fail_on_severity is set lower
    than severity_threshold, since those findings are filtered out
    before the gate runs.

2. Idempotent summary comment

  • The summary is posted as an issue comment with a hidden
    <!-- pr-sentinel:summary --> marker and updated in place on
    re-push — no more one summary comment per push.
  • Only a comment authored by the bot (or the token user) is ever
    updated, so an unrelated user quoting the marker cannot be
    overwritten; if updating fails with 403/404, a new comment is
    created instead of crashing the review.
  • In inline mode, create_review runs only when there are inline
    comments to submit, with a brief body; the full table lives in the
    summary comment. summary mode no longer creates a review.
  • A clean re-push updates the comment to "No findings" instead of
    leaving a stale table. --dry-run creates or updates nothing.

3. SARIF 2.1.0 output (--sarif-out)

  • findings_to_sarif() emits valid SARIF 2.1.0 (stdlib json only):
    deduplicated rules, critical/high → error, medium →
    warning, low → note, file + 1-based line locations.
  • region.startLine is only emitted for valid lines (>= 1);
    artifactLocation.uri is normalized (\ → /, leading ./
    stripped); shared rule ids (like ai-review) get generic rule
    descriptions instead of the first finding's message.
  • Available on both review and review-diff and as the sarif_out
    Action input. --sarif-out and --json-out now create missing
    parent directories, so nested paths like
    reports/sentinel.sarif work. See the README for the
    github/codeql-action/upload-sarif@v3 example.

Verification

  • 174 pytest tests, all passing (116 in v0.1.2 + 37 new for the
    three features + 21 new regression tests for the review fixes).
  • ruff check and ruff format clean.
  • mypy --strict clean on src/pr_sentinel.
  • CLI smoke tests: pr-sentinel 0.2.0, gate exit 1 with outputs
    written first, nested --sarif-out / --json-out paths.
  • PR #3 (squash-merged): all 5 checks green (CI on Python 3.10–3.13
    • the PR review). The v0.1.2 self-review posted 12 findings on the
      PR, all test-fixture false positives (fake tokens/keys and
      deliberate eval() calls in the tests) — no real secrets.

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • No CI gate on critical findings in summary mode beyond
    fail_on_severity.
    The exit code is 0 on a completed review
    unless the gate is configured.

Install

pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git@v0.2.0

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.1.2

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 16:58
deb83c3

pr-sentinel v0.1.2 — Release notes

Patch release: fixes for every verified finding from an independent
external review of v0.1.1 (Google Gemini 4 Neon; the full review text is
in docs/reviews/gemini-2026-11-22.md).

What was wrong

The review found 18 real issues in v0.1.1, from a pipeline-order bug
that let ignored files consume the file quota and AI tokens, to an
empty-token hole, a crash on one bad model line number, and a missing
sk-proj- secret pattern. Every finding was checked against the code
before fixing; the review's "Dockerfile 100% in the language bar" claim
could not be verified and was ignored.

The fixes

  • Review pipeline order. Ignored files are dropped right after
    parsing, before the max_files limit and before any review work.
    The size limit is applied after parsing by dropping whole trailing
    hunks/files, never by cutting the raw diff mid-hunk.
  • Empty tokens rejected in the CLI, in GitHubClient, and in
    entrypoint.sh (no more empty Bearer header and confusing 401).
  • entrypoint.sh: null-safe PR extraction from the event JSON,
    --repo falls back to $GITHUB_REPOSITORY, stale pr-number
    wording fixed.
  • action.yml: api_key is now optional (required: false),
    matching the CLI's static-only mode.
  • api_base_url must now be a real URL with an http/https
    scheme and a host; plain http:// still works (local test servers)
    but warns that the API key is sent in cleartext.
  • YAML parser: escaped quotes (\") no longer break comment
    stripping.
  • Filenames with spaces in diff --git and ---/+++ lines are
    parsed correctly (C-style quoting).
  • Inline comments now cover context lines too, and use the modern
    line + side fields instead of the legacy position field.
  • GitHub client: JSONDecodeError and TimeoutError are converted
    to GitHubError; transient failures (429/5xx, network errors) are
    retried up to 3 attempts with exponential backoff, honoring
    Retry-After — but a POST is retried only on 429 or a connection
    error, never on a 5xx or a timeout, so a lost response cannot make
    create_review post the same review twice.
  • AI reviewer: the diff is wrapped in delimiters and marked as
    untrusted data (prompt-injection hardening); one bad line number no
    longer kills a whole chunk's parse; transient failures are retried
    the same way as the GitHub client.
  • Static checks: sk-proj-... keys are detected; eval()/exec()
    are now categorized as security.
  • Summary note now says which kind of findings these are: the
    "AI-generated" note appears only when the AI reviewer ran.
  • Dockerfile: base image pinned to python:3.12.16-slim by SHA256
    digest (verified against Docker Hub).
  • mypy --strict is now clean (31 errors fixed, mostly pre-existing
    bare-generic annotations; annotation-only changes).

Verification

  • 116 pytest tests, all passing (83 in v0.1.1 + 33 new regression
    tests, including entrypoint tests run under sh and retry tests
    against scripted fake servers).
  • ruff check and ruff format clean.
  • mypy --strict clean on src/pr_sentinel.
  • CLI smoke test: pr-sentinel 0.1.2 and check-config work.
  • Verified live: the action ran on real PR #2 with v0.1.2
    (self-review workflow pinned to @v0.1.2) and posted its review
    ("No findings. Nothing to report — the changes look clean."),
    which was correct for the docs-only change; the PR was then merged.
    All 5 checks passed (CI on Python 3.10–3.13 + the PR review).

Not fixed / known limitations

  • No AST-based static checks. Multi-line patterns (for example
    shell=True or yaml.load( split across lines) are still not
    detected, and the generic credential pattern can fire on harmless
    test values. A full AST migration was deliberately not done: the
    reviewer only sees the diff, not full file contents, so AST on
    partial content would still miss cases.
  • No CI gate on critical findings. The exit code is always 0 on a
    completed review, and the summary comment is not updated when new
    commits are pushed. Both are feature work for a later minor version.

Install

pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git@v0.1.2

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.1.1

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 15:45

Bugfix release: v0.1.0's GitHub Action could not run at all — every run failed immediately with error: GITHUB_TOKEN is not set.

What broke

The action inputs used hyphenated names (github-token, api-key, pr-number, config-path). The GitHub runner passes action inputs to a Docker container as INPUT_<NAME> environment variables, and /bin/sh (dash, the shell in the python:3.12-slim image) silently drops environment variables whose names are not valid shell identifiers. So INPUT_GITHUB-TOKEN never reached entrypoint.sh, the token stayed empty, and the CLI refused to run. The bug was found by dogfooding: the first real pull request on pr-sentinel's own repository (PR #1) triggered the action, and the run failed in 14 seconds.

The fix

Inputs are now underscore names: github_token, api_key, pr_number, config_path. The README quick start and the example workflow are updated to match. No CLI behaviour changes; review, review-diff and check-config are unchanged.

If you copied the v0.1.0 workflow example, rename the with: keys: api-key becomes api_key (and github-token, if you set it, becomes github_token).

Verification

  • 83 pytest tests, all passing, including new tests/test_entrypoint.py regression tests that run entrypoint.sh under sh and prove the renamed inputs reach the CLI — plus a test documenting that the old hyphenated names do not survive dash.
  • ruff check and ruff format clean.
  • Live verification on the project's own repository: after upgrading the self-review workflow to v0.1.1, the action posted its first live review on PR #1 ("No findings. Nothing to report — the changes look clean."), and the PR was merged.

Install

pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git@v0.1.1

Or use the GitHub Action — see the README quick start.

pr-sentinel v0.1.0

Choose a tag to compare

@vadofespanili-cyber vadofespanili-cyber released this 22 Nov 15:12
2b409a1

First public release of pr-sentinel: an AI-powered pull request review bot, as a GitHub Action and a CLI.

What it does

Every pull request gets a first review within seconds. pr-sentinel reads the PR diff, runs deterministic static checks, asks an AI model (via a Responses-compatible API) to review the changes, and posts a Markdown summary plus line-level review comments — with severity (critical/high/medium/low) and category (bug/security/performance/style/maintainability) on every finding. It never merges, closes or changes code; it only comments, and the human always decides.

Highlights

  • GitHub Action (action.yml + Dockerfile): automatic review on every pull request, with one summary comment and inline comments.
  • CLI (pr-sentinel): review --repo OWNER/REPO --pr NUMBER, review-diff --file diff.patch for local use without GitHub, and check-config to validate a config file.
  • Two review layers: fast static checks (leaked secrets, eval/exec, shell=True, pickle, oversized files) plus an AI reviewer for the things regexes cannot see.
  • Zero-dependency core: Python standard library only — nothing extra to install, audit or keep up to date.
  • Safe by default: API keys come from environment variables only; secret values are never echoed in findings or logs.

Verification

  • 78 pytest tests, all passing.
  • ruff check and ruff format clean.
  • A full review cycle was verified end to end against test servers: a sample patch produced 4 findings (1 critical leaked API key, 1 high eval() use, 1 medium and 1 low from the AI reviewer), and the review was posted with the correct inline-comment positions.

Install

pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git

Or use the GitHub Action — see the README quick start.

Known limitations

Findings are suggestions, not verdicts: the AI reviewer can miss real bugs and can flag code that is fine. No code is executed; review scope is function-level, one diff chunk at a time. See the README "Limitations (honest)" section for the full list.