Repository navigation
fix: decode Git roots as file names and keep PowerShell prefix findings (#312 review) - #320
Merged
Merged
Conversation
Git prints the repository root as raw file-name bytes, so resolve_git_root, find_git_repo_root and git_root_for now decode it with os.fsdecode instead of UTF-8 or the locale code page. This keeps non-ASCII roots correct on Windows and on Linux hosts with a non-UTF-8 locale; remote URLs and branch names stay UTF-8. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
A PowerShell if condition is now broad when either its PowerShell or its Bash reading is, so prefixes every shell runs, such as PowerShell(sudo *) and PowerShell(env *), keep their HIGH auto-approve finding. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
November 2, 2026 19:34
rng1995
enabled auto-merge (squash)
November 2, 2026 19:34
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
* docs(changelog): move entries released in 0.7.0-0.7.2 out of Unreleased 0.7.0 (#314) and 0.7.1 (#327) never cut their sections on main, and 0.7.2 (#335) added its section below the whole Unreleased block, so Unreleased still listed work that had already shipped. Place each Unreleased entry under the release that shipped the PR that added it: - 0.7.0: the published section from the 0.7.0 tag, verbatim. It already holds the six entries that main had filed under 0.6.0, so 0.6.0 again matches the v0.6.0 tag, including the original run_config.json entry. - 0.7.1: #264 #271 #274 #281 #284 #289 #293 #299 #316 #317 #318 #323 #324 #326 #327, plus the #320 wording of the Windows Git-root entry, since #320 changed that 0.7.0 fix in 0.7.1. - 0.7.2: #263 #265 #269 #270 #276 #279 #287 #290 #296 #309 #328 #330 merged with the existing #335 entries. Only post-v0.7.2 entries stay under Unreleased, with one heading per subsection. Entry text is unchanged, apart from the published tag wording in 0.7.0 and 0.6.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): prepare v0.8.0 Set the package, fallback, lock, citation and developer-guide versions to 0.8.0 and move every entry merged since v0.7.2 under '## 0.8.0 - 2026-11-05', leaving Unreleased empty. The refusal-fallback documentation test now reads the release section that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, requires it to be 0.8.0, and requires exactly one entry there to name the switch. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): pin the verified 0.8.0 Tier 1 image and add its CI bundle Pin onboarding to the Tier 1 image published by the reviewed main revision 55d2d04 in "Build and publish Tier 1 image" run 42158955180: ghcr.io/nvidia/skillevaluator-tier1@sha256:9d5483243918937be4f2178f74cf7c622a531dee41e3176906994d52fa14950a (config sha256:d17d6f5105ec5f1bf0cbe4dff0d693aae4ecf01e9c1c6a6ddb7830518acace33). The workflow and publisher refs both move to 55d2d04. ci/bundles/0.8.0 mirrors the 0.7.2 bundle. The templates, README and release.json are the run's github-actions-onboarding artifact and match ci/render_templates.py output for these pins byte for byte. The scanner inventory and verification receipt come from the build's runtime-stage version step, the five-case smoke receipt, the onboarding job's anonymous pull, and the public manifest, whose config digest equals the smoke-tested image ID. The ZIP uses the 0.7.2 layout (sorted members, inner checksums, 1980 timestamps, 0644, deflate level 9) and rebuilds to identical bytes. Point the current-bundle links at 0.8.0 and list 0.7.2 as historical. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A pre-merge review of #312 found four P3 issues; #312 merged before the fixes were pushed. Three are code fixes, in this PR. The fourth was the wording in the #312 description, which cannot be fixed by code.
utils/helpers.py)git rev-parse --show-toplevelas UTF-8. Git prints the root as raw file-name bytes, and on Linux CPython encodes paths with the locale's file-name encoding. Under a locale such asen_US.ISO-8859-1, a repository in a non-ASCII folder resolved to a path that does not exist, or to a spelling that no longer matched the paths Python builds. Source links then lost their/tree/<branch>/<path>part, SARIF artifact URIs became absolute, andresolve_repository_identitylost the origin slug with a reason that cannot be encoded as UTF-8. This worked before #312.resolve_git_rootdecodes the root withos.fsdecode, the codec Python uses for file names. That is UTF-8 on Windows and macOS, and the locale's file-name encoding withsurrogateescapeon Linux. Remote URLs and branch names still decode as UTF-8 witherrors="replace", and the_git_outputdocstring now says only that.utils/path_security.py,tier3/results_location.py)find_git_repo_root(Tier 3 repository-context staging) andgit_root_for(results.gitignoreentry) still decoded the root with the locale code page. On a cp1252 Windows host they returned a path that does not exist for a repository in a non-ASCII folder, so the CHANGELOG entry from #312 overstated the fix.os.fsdecode, likeresolve_git_root. The CHANGELOG entry now says the repository path is decoded as a file name.plugin_component_risk.py)ifcondition was read only as a PowerShell rule. Prefixes that every shell runs, such asPowerShell(sudo *)andPowerShell(env *), lost the HIGH auto-approve finding they had before.iexstay HIGH, and so dosudoandenv.The fourth item: the #312 description says "Bash-only cases are unchanged" for inert allowed-tools grants. In fact, Codex-only inert findings for a scoped Bash grant such as
Bash(python3:*)now quote the grant, and they carryshell_grantandshell_toolmetadata. A plainBashgrant keeps its old wording, and severities are unchanged.Testing
find_git_repo_rootandgit_root_forunder a cp1252 locale, andPowerShell(sudo *)andPowerShell(env *)hook conditions.en_US.ISO-8859-1andC.UTF-8,resolve_git_rootreturns the real root,resolve_git_remote_urlreturns the full/tree/main/skills/demolink, SARIF URIs are repository-relative, andresolve_repository_identityreturns the origin slug.path_securityorresults_locationruff checkandruff format --checkon changed files🤖 Generated with Claude Code