| Age | Commit message (Collapse) | Author |
|
split path list
|
|
|
|
|
|
security-guidance: reviews run when the Windows certificate store has an unreadable entry
|
|
security-guidance: keep nested repositories out of the index copy
|
|
fixture works with LibreSSL
|
|
|
|
unreadable entry
Older Python releases load each Windows certificate store in one call, so
one certificate OpenSSL cannot parse makes the default TLS context fail to
build and every review call fails before a request is sent.
When that happens the plugin's API calls now use a default context built
from the store entries that do parse. Verification of the chain and the
host name is unchanged. Review rows carry tls_store_skipped (a count) when
this route is in use.
|
|
The test deleted a repository with shutil.rmtree, which fails on git's
read-only object files there. It moves the directory away instead.
|
|
security-guidance: find a rewritten file's earlier version from a repo subdirectory
|
|
|
|
security-guidance: keep the Stop review working when the changed paths do not fit one command
|
|
security-guidance: report which pattern rules fired on every Stop row
|
|
security-guidance: report how long the launcher waits for interpreter probes
|
|
symlinked folder
When the tool's path and the session directory name the same repo through
different symlinks (/tmp and /var on macOS), the relative path between the two
spellings left the repo and the lookup found nothing, so a rewrite re-reported
code that was already in the file. The lookup now tries again with both paths
resolved. The first attempt is unchanged.
|
|
A review call that never gets an HTTP response is reported as api_error -1
whatever the cause, so a certificate failure, a refused connection and a
timeout look the same. Rows whose last call failed that way now carry a
count-only net_err key: the failure class, the TLS verify code, and whether
CA files, a proxy or TLS variables are in play. No behaviour change.
|
|
mhegazy/sg-stop-finding-names-unwritten
|
|
another case
On file systems that ignore case, realpath keeps the case a path was given
in, so an edit recorded as /TMP/x/REPO/app.py for a repo at /tmp/x/repo was
counted as outside the repo. Fold case (and, on macOS, normalize) the whole
path and the root before taking the relative path, not only the result.
|
|
|
|
The fixture wrote its files with write_text, which stores "\n" as "\r\n" on
Windows, so the committed text no longer equalled the string the tests compare
against. The files are now written as bytes.
|
|
The expected budget is the platform figure where that is lower than half
of what the environment leaves.
|
|
security-guidance: skip an unusable security-patterns file on its own
|
|
record of editing
The Stop review takes its files from git, so it can report a finding in a
file another session or process changed in the same checkout, or in earlier
uncommitted work when no turn-start snapshot could be taken. The finding then
read as an instruction to fix code the session did not write.
A finding in a reviewed file with no record of the session's edit tools
writing it since the prompt now carries a note naming the file: the change may
have been made another way, leave it and tell the user if it is not yours,
handle it as usual if it is. What gets reviewed is unchanged.
The note is left out when the record is known to be incomplete (state file
lost or overwritten, or more edited paths than the list keeps). Stop rows with
findings carry finding_no_edit_record: the number of such findings, or -1 when
the record was incomplete.
Refs #4524
|
|
The hooks run `git stash create` (the turn baseline) and
`git add --intent-to-add` (untracked files) on a throwaway copy of the
index. A nested repository that the index records is a gitlink entry
there. `git stash create` takes no --ignore-submodules option and
`git add` reads the gitlinks its paths cover, so both started a second
git inside that directory.
Before anything runs on the copy, remove the gitlink entry of every
nested repository from the copy, never from the real index. If that
removal fails, do not use the copy at all: the baseline falls back to
HEAD and runs no stash create, and the diff reads the real index with
--ignore-submodules=all. A gitlink whose directory has no `.git` (a
submodule that is not checked out) stays; git starts nothing there.
Run the intent-to-add `git add` with literal pathspecs, in that one
call's environment only.
The index file is scanned for a gitlink's mode bytes first, so a
repository without one starts no extra git process.
|
|
A change that comes back under a new commit (undo and re-commit, rebase
before the first push) is unknown to the reviewed-shas record, so the
commit or push review runs on it again. Nothing says how often.
Each commit and push review now notes a hash of every hunk it is sent in
.git/sg-reviewed-diffs, once when it starts and once when it has a
verdict, and reports one new metric, diff_seen:
0 some hunk was never reviewed in this clone
1 all were seen, but a review of one has no verdict (yet)
2 all had a finished review, on different repo contents
3 all had a finished review, on the same tree
-1 the record could not be read or written
Count only: no review is skipped, delayed or changed. The record is
bounded (1 MB, 7 days), is not written in portable output mode, and its
lock is never waited on for more than half a second.
|
|
secret_renamed is sent only when it is not zero.
|
|
review
The Stop review limits its diff to the changed paths. For a rename that git
already knows about (git mv, or a rename committed during the turn) that list
held only the new name, so the diff showed a new file and the parsers could
not apply the rule that leaves out a file renamed away from a secret-shaped
name. The old name now goes into the list beside the new one, as it already
did for a plain mv.
The file listings themselves are unchanged.
|
|
The inner CLI retry on main (a start refused over --strict-mcp-config) now also covers a CLI that does not know --no-session-persistence, so one helper handles either refused flag, or both on the same start.
|
|
The batched path commands now read each diff through the bounded reader
that main added, so both changes apply to get_git_diff.
|
|
Other tail metrics are now added after the two warning masks, so the
masks are no longer the last keys on the Stop row. What matters is that
the fired mask comes after the unresolved one, so a row cut at the key
cap loses the fired mask first. Test that, and say so in the comment.
|
|
|
|
|
|
security-guidance: bump version to 2.0.15
|
|
|
|
security-guidance: count secret-named data files in the Stop review set
|
|
security-guidance: read the Stop review's git diff without holding it whole
|
|
security-guidance: report how Stop reviews relate to the session's own edits
|
|
Resolves the overlap with the bootstrap working-directory change and the gateway sign-in route: the import probe keeps the state-dir working directory, and llm.py keeps both imports.
|
|
Resolves the overlap with the baseline-origin change in security_reminder_hook.py: both sets of state keys are stored beside the baseline.
|
|
|
|
security-guidance: keep Claude Code's own credential files out of reviews
|
|
security-guidance: run SDK bootstrap subprocesses from the state dir
|
|
security-guidance: do not review against a baseline from another checkout
|
|
security-guidance: run reviews on machines with a managed MCP config
|
|
Conflict in get_git_diff: main added IGNORE_SUBMODULES to the diff command on the line where this branch resets its read counters. Both are kept.
|
|
The tests' stand-ins for claude were files with a #! line, which Windows
cannot start, so the gateway sign-in tests and the inner-CLI warning test
failed there. On Windows a stand-in is now an .exe built the way pip
builds a console script, and the gateway one writes its call log as
UTF-8. Two tests that move the home directory also set USERPROFILE, and
the one test that needs the Agent SDK without saying so is skipped
without it.
|
|
security-guidance: stay out of repositories nested in the work tree
|
|
Windows file names can hold a lone surrogate, so the path the test uses as
unreadable is an ordinary file in the repo there and the Stop row carries
review_scope. Elsewhere the path cannot be encoded and the key is left out,
as before.
|
|
security-guidance: find Python releases newer than the launcher's list
|
|
A directory with its own .git inside the work tree (a submodule, a vendored
checkout, an unpacked archive) was added to the throwaway index as a submodule
entry, and git then started a second git inside it to see whether it had
changed. Nothing in such a directory is reviewed.
git status and work-tree git diff now ignore submodule entries, an untracked
nested repository is no longer listed as a changed file or added to the index
copy, and a commit that moves a submodule is always shown as its two commit ids.
|