You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa48aee
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/autoreview/SKILL.md
+7-10Lines changed: 7 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Do not invoke Autoreview automatically before a commit, push, PR, merge, deploy,
33
33
- Tools are useful in review mode. Codex receives the validated bundle in an empty workspace so ignored files and linked-worktree metadata remain unreadable; web search stays available for dependency contracts and upstream docs.
34
34
- Security perspective is always included, but it should not cripple legitimate functionality. Report security findings only when the change creates a concrete, actionable risk or removes an important safety check.
35
35
- Reviewer subprocesses preserve engine authentication and non-credentialed proxy variables needed by headless or restricted-network environments while stripping process-injection, Git override, and credentialed proxy values.
36
-
-Immediately before every provider call, autoreview writes the exact outgoing review pack to an owner-only temporary file and scans it with TruffleHog using `verified,unknown`. It uses the installed binary with `--no-update` to disable self-update checks and attempts. The scan covers prompt and dataset inputs, untracked content, and every diff line, including deleted lines. A finding, scanner error, or missing TruffleHog binary refuses the send and names the implicated repository file when it can be resolved; credentials are never redacted and forwarded. Security-sensitive paths remain omitted. Safe large diffs are sent as one pass while they fit the aggregate prompt limit, then partitioned into complete bounded passes without truncation.
36
+
-Credential checking belongs to the reviewer: the hard rules require inspection of the entire change bundle for accidentally committed credentials and require every suspected real credential to be reported as a P0 security finding without reproducing its value. The helper does not invoke an external credential scanner. Security-sensitive paths remain omitted. Safe large diffs are sent as one pass while they fit the aggregate prompt limit, then partitioned into complete bounded passes without truncation.
37
37
- Regression provenance needs patch proof, not blame alone. `git log -S/-G`, `git blame`, commit subjects, and PR metadata locate candidates. Before saying `introduced by`, inspect raw parents with `git --no-replace-objects cat-file -p <sha>` and verify the implicated behavior changed in `git --no-replace-objects diff --no-ext-diff --no-textconv <raw-parent> <sha> -- <path>`; a genuine root needs raw-header proof that it has no parents.
38
38
- Blame `^sha`, porcelain `boundary`, and shallow/grafted history alone are not introduction proof. `--root` can hide boundary markers; `git show` or `rev-list --parents` can make a shallow boundary look like a root. An available raw parent permits explicit comparison even at a shallow boundary; missing parents or an unverifiable patch require `unknown` with the gap. Use `carried forward` only for verified preexisting behavior and `made visible` only for a verified trigger. Apply the same bar to finding prose, summaries, and owner hints.
39
39
- Keep code author, introducing PR author, merger, committer, automation trigger, and current PR author separate; none of those roles alone proves causation. Cite the verified commit/PR/date. If no PR is traceable, use the verified commit and known author identity; unknown identities stay unknown, and missing PR metadata is not a separate finding.
@@ -191,10 +191,7 @@ history and rerun. The helper does not fetch it automatically.
191
191
192
192
## Oversized Bundles
193
193
194
-
The helper validates the complete patch before partitioning it. For partitioned
195
-
reviews it scans the complete frozen input first, so credentials cannot evade
196
-
detection by crossing a chunk boundary. It also scans each exact outgoing review
197
-
pack before sending it. A safe bundle that fits
194
+
The helper validates the complete patch before partitioning it. A bundle that fits
198
195
the aggregate prompt limit remains one integrated review pass. Larger bundles
199
196
are split at bundle sections and file boundaries where possible; an oversized
200
197
single-file block is split at line boundaries with repeated file/hunk context
@@ -211,7 +208,7 @@ batch, and every evidence byte is retained. All validated reports are merged
211
208
before required-finding and exit-status checks.
212
209
There is no fixed pass-count ceiling: the complete frozen input determines the
213
210
finite pass sequence. The helper prints its size and pass count before running
214
-
passes serially. Each pass retains the same prompt-size limit, secret scan, and
211
+
passes serially. Each pass retains the same prompt-size limit and
215
212
reviewer isolation; a failed pass aborts without publishing a partial verdict.
216
213
217
214
Preparation prints immediate phase updates and periodic elapsed time to stderr,
@@ -220,7 +217,7 @@ are separate from provider heartbeats and do not count against engine deadlines.
220
217
Bundle construction captures finding membership alongside validated text; normal
221
218
and dry runs reuse that record without reopening untracked files for membership.
222
219
223
-
Dry runs reuse capture and scanning without whole-tree integrity sweeps. Real
220
+
Dry runs reuse captured inputs and prompt construction without whole-tree integrity sweeps. Real
224
221
reviews retain full fresh tree hashing before bundle construction, before review,
225
222
and before publication, including unrelated tracked files, nonignored untracked files, index
226
223
state, and initialized submodules. Explicit prompt files and datasets also retain
@@ -375,7 +372,7 @@ The helper:
375
372
- supports `codex`, `claude`, `amp`, `pi`, and `kimi`; default is `AUTOREVIEW_ENGINE` or `codex`
376
373
- resolves bare `git`, `gh`, reviewer, and PowerShell shell commands from absolute `PATH` entries only, never from the reviewed checkout; explicit `--*-bin` paths are interpreted from the reviewed repository root when relative and accepted only when both the supplied path and resolved target stay outside the reviewed repository
377
374
- use `--mode commit --commit <ref>` for already-committed work, especially clean `main` after landing
378
-
- validates complete Git patches, scans every outgoing review pack, reviews them in one pass up to the aggregate prompt limit, and automatically uses complete bounded passes above it
375
+
- validates complete Git patches, reviews them in one pass up to the aggregate prompt limit, and automatically uses complete bounded passes above it
379
376
- uses branch mode for committed-only PR work, or explicit local mode with a pinned merge base for a complete PR plus dirty candidate
380
377
- writes reports to stdout and optionally to `--output` or `--json-output` files; preparation progress and provider heartbeats use stderr
381
378
- supports `--dry-run` (validates bundle construction, reviewer CLI resolution, and local isolation startup with version/help probes without contacting a provider; exits nonzero if any check fails), an opt-in per-reviewer wall-clock bound via `--engine-timeout-seconds`, `--prompt`, repo-relative `--prompt-file`, repo-relative `--dataset`, `--no-tools`, `--no-web-search`, repeatable Codex-only safe model/response tuning with `--codex-config key=value`, Codex-only `--codex-speed fast|flex|default`, and commit refs
@@ -419,8 +416,8 @@ The exact source filename `CredentialFile.swift` is allowed for untracked and
419
416
evidence inputs only outside sensitive parent paths, matching its existing
420
417
tracked-source treatment. This is not a general source-extension exemption:
421
418
credential stores, credential directories, `.env`, PEM, and key files retain
422
-
their exclusions. TruffleHog still scans the exact outgoing pack, including
423
-
source content, deleted lines, prompts, and datasets, before every provider call.
419
+
their exclusions. Reviewers inspect the source content, deleted lines, prompts,
420
+
and datasets present in each outgoing pack for accidentally committed credentials.
"refusing to send review pack: TruffleHog found credentials in "
1718
-
+", ".join(paths)
1719
-
)
1720
-
ifresult.returncode!=0:
1721
-
raiseSystemExit(
1722
-
"refusing to send review pack: TruffleHog could not complete the scan"
1723
-
)
1724
-
1725
-
1726
1598
defbounded(text: str, limit: int=180_000) ->str:
1727
1599
iflen(text) <=limit:
1728
1600
returntext
@@ -3218,6 +3090,7 @@ def render_review_prompt(
3218
3090
- Report EVERY distinct actionable defect in this single pass, ordered most severe first. Each review round costs the caller a full fix-test-review cycle; withholding a known defect until a later round wastes one.
3219
3091
- Before returning, sweep the bundle once more for independent defects in other files or failure modes that you may have stopped scanning for after an earlier find.
3220
3092
- Include security findings: injection, secret leaks, authz/authn bypass, path traversal, unsafe deserialization, unsafe filesystem or shell use, privacy leaks, and credential handling.
3093
+
- Inspect the entire change bundle for accidentally committed credentials or secrets, including API keys, access tokens, passwords, private keys, and credential-bearing URLs. Report every suspected real credential as a P0 security finding at the smallest file/line location that demonstrates it, without reproducing the credential value. Do not flag obvious placeholders or inert test fixtures unless they are usable credentials or create a concrete risk.
3221
3094
- Do not reject legitimate functionality merely because it touches shell, filesystem, network, auth, or sensitive data. Report a security finding only when the patch creates a concrete exploitable risk, removes an important safety check, or lacks validation at a trust boundary.
3222
3095
- Security-sensitive bundle material may be redacted or omitted before review. Continue reviewing the material that is present. A redaction notice is not itself a defect and does not prove either safety or vulnerability in the omitted material.
3223
3096
- For each finding, use the smallest file/line location that demonstrates the issue.
0 commit comments