Repository navigation
Releases
v0.3.0
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: ignoreinside a comment (#,
//or/* ... */, case-insensitive) suppresses static findings on
that exact line — for intentional fixtures such aseval()in tests. - Secret matches that are obvious placeholders (
test/dummy/
example/fakevalues,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, realisticsk-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(responsesby default,
chat_completionsfor OpenRouter, Ollama, Groq, vLLM and any
OpenAI-compatible provider), plus a--api-formatflag onreview/
review-diffand anapi_formatAction 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) andinstructions_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_filestruncation, 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-runnever lists, posts or
resolves anything. - Deduplication runs before the
max_inline_commentscut, 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 separateinstructionsfield, 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
--configpath. - GraphQL bot-ownership check (external review). In GitHub Actions
the author login isgithub-actions(no[bot]suffix) and
GET /userfails with 403 onGITHUB_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 aBot
(or the token user, or a[bot]login). - List-shaped
contentinchat_completions(external review).
Providers that returnmessage.contentas 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.lockwas 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_formaton both paths, instructions, risk ordering, inline
lifecycle, and the resolver coverage rules). ruff checkandruff format --checkclean.mypy --strict srcclean (10 source files, no issues).twine checkPASSED 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 namedpr_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 realisticghp_token and a
bareeval()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
instructionsfield was proven only on a fake
server. Most OpenAI-compatible providers accept it, but a strict
provider could reject it — useapi_format: chat_completionsfor
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-aiOr use the GitHub Action — see the README quick start.
v0.2.4
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
mypyand runspython -m mypy --strict srcon every push and pull request (all four Python versions,
3.10–3.13). Previously CI ran only pytest, ruff and the CLI smoke
test, whilemypy --strictwas 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
srconly: the tests are not strict-clean (433
errors, mostly missing annotations in test helpers), so scoping the
check tosrcis deliberate, not an oversight.
2. README naming clarified
- The top of the README now states the three names plainly:
repository and CLI commandpr-sentinel, PyPI package
pr-sentinel-ai, GitHub Marketplace actionai-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 checkandruff format --checkclean.mypy --strict srcclean (10 source files, no issues).twine checkPASSED 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 namedpr_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=Trueoryaml.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-aiOr use the GitHub Action — see the README quick start.
pr-sentinel v0.2.3
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-aiwhen v0.2.2 was submitted
to the Marketplace: an organization namedpr-sentinel-aialready
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
nameinaction.ymlis nowai-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-aistill 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 checkandruff format --checkclean.mypy --strictclean.twine checkPASSED for the wheel and the sdist built from this
version; both artifacts are still namedpr_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=Trueoryaml.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-aiOr use the GitHub Action — see the README quick start.
pr-sentinel v0.2.2
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-sentinelis 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 inpyproject.tomland thenameinaction.ymlare now
pr-sentinel-ai. - Install from PyPI once this release is published there:
pip install pr-sentinel-ai- The
pr-sentinelconsole command is unchanged — installing the
pr-sentinel-aipackage still provides thepr-sentinelcommand —
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 byMANIFEST.in(it contains fake
credential fixtures that must not ship). - A
.github/workflows/publish.ymlworkflow (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 forpr-sentinel-aiis registered. See
docs/publishing.mdfor the full checklist.
Verification
- 183 pytest tests, all passing (no code changes in this release —
rename and version bump only). ruff checkandruff format --checkclean.mypy --strictclean.twine checkPASSED 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=Trueoryaml.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-aiOr use the GitHub Action — see the README quick start.
pr-sentinel v0.2.1
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_commitAction input (optional, default"") and
--reviewed-commitflag onreviewandreview-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: forpull_requestevents 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/checkoutv4 → v5 andactions/setup-pythonv5 → 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 checkandruff format --checkclean.mypy --strictclean.- CLI smoke tests:
pr-sentinel 0.2.1; a localreview-diffrun
printsReviewed commit: <short-sha>when--reviewed-commitis
passed and omits the line without it.
Not fixed / known limitations
- No AST-based static checks. Multi-line patterns (for example
shell=Trueoryaml.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.1Or use the GitHub Action — see the README quick start.
pr-sentinel v0.2.0
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-severityflag onreview
andreview-diff(the flag wins over the config file), and the
fail_on_severityAction input. Valid values:critical,high,
medium,low;none(or unset) disables the gate. - Exit codes:
0success (no gate, or no finding meets it),1at
least one reported finding meets or exceeds the threshold,2
config/usage error,3API error. - The review is always posted and
--json-out/--sarif-outare
always written before exit1. The gate only sees reported
findings (afterseverity_threshold+ignore_pathsfiltering). - A warning is printed to stderr when
fail_on_severityis set lower
thanseverity_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
inlinemode,create_reviewruns only when there are inline
comments to submit, with a brief body; the full table lives in the
summary comment.summarymode no longer creates a review. - A clean re-push updates the comment to "No findings" instead of
leaving a stale table.--dry-runcreates or updates nothing.
3. SARIF 2.1.0 output (--sarif-out)
findings_to_sarif()emits valid SARIF 2.1.0 (stdlibjsononly):
deduplicated rules,critical/high→error,medium→
warning,low→note, file + 1-based line locations.region.startLineis only emitted for valid lines (>= 1);
artifactLocation.uriis normalized (\→/, leading./
stripped); shared rule ids (likeai-review) get generic rule
descriptions instead of the first finding's message.- Available on both
reviewandreview-diffand as thesarif_out
Action input.--sarif-outand--json-outnow create missing
parent directories, so nested paths like
reports/sentinel.sarifwork. See the README for the
github/codeql-action/upload-sarif@v3example.
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 checkandruff formatclean.mypy --strictclean onsrc/pr_sentinel.- CLI smoke tests:
pr-sentinel 0.2.0, gate exit1with outputs
written first, nested--sarif-out/--json-outpaths. - 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
deliberateeval()calls in the tests) — no real secrets.
- the PR review). The v0.1.2 self-review posted 12 findings on the
Not fixed / known limitations
- No AST-based static checks. Multi-line patterns (for example
shell=Trueoryaml.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
summarymode beyond
fail_on_severity. The exit code is0on a completed review
unless the gate is configured.
Install
pip install git+https://github.com/vadofespanili-cyber/pr-sentinel.git@v0.2.0Or use the GitHub Action — see the README quick start.
pr-sentinel v0.1.2
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 themax_fileslimit 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,
--repofalls back to$GITHUB_REPOSITORY, stalepr-number
wording fixed.action.yml:api_keyis now optional (required: false),
matching the CLI's static-only mode.api_base_urlmust now be a real URL with anhttp/https
scheme and a host; plainhttp://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 --gitand---/+++lines are
parsed correctly (C-style quoting). - Inline comments now cover context lines too, and use the modern
line+sidefields instead of the legacypositionfield. - GitHub client:
JSONDecodeErrorandTimeoutErrorare converted
toGitHubError; 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_reviewpost 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 assecurity. - 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-slimby SHA256
digest (verified against Docker Hub). mypy --strictis 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 undershand retry tests
against scripted fake servers). ruff checkandruff formatclean.mypy --strictclean onsrc/pr_sentinel.- CLI smoke test:
pr-sentinel 0.1.2andcheck-configwork. - 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=Trueoryaml.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.2Or use the GitHub Action — see the README quick start.
pr-sentinel v0.1.1
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.pyregression tests that runentrypoint.shundershand prove the renamed inputs reach the CLI — plus a test documenting that the old hyphenated names do not survive dash. ruff checkandruff formatclean.- 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.1Or use the GitHub Action — see the README quick start.
pr-sentinel v0.1.0
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.patchfor local use without GitHub, andcheck-configto 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 checkandruff formatclean.- 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.gitOr 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.