Skip to content

fix: address review findings from #249 and #250 - #260

Merged
rng1995 merged 53 commits into
mainfrom
naren/fix-249-250-review-findings
Oct 30, 2026
Merged

rng1995 merged 53 commits into
mainfrom
naren/fix-249-250-review-findings

Conversation

@rng1995

@rng1995 rng1995 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #249 and #250, which are merged. A review of their pre-merge heads found 61 defects (26 P2, 35 P3). Each one was reproduced by one agent and challenged by a second, with a third agent deciding when the two disagreed. This PR rechecks every one on current main:

  • 59 fixed. Each fix has a regression test that fails without it.
  • 2 already fixed on main: R35 in c8f0d44, R38 in 088b645.

The #250 code is private and not yet called from the public CLI, so most of these fix the analysis before it is turned on. Three changes reach existing public paths:

  • The standalone Harbor verifier honours HTTP-date Retry-After headers on Python 3.9 and 3.10. It imported datetime.UTC, which only exists from Python 3.11.
  • The bounded YAML reader in unique-key mode now accepts YAML merge overrides. Plugin deduplication uses that reader. Malformed tagged scalars and integers too large to format now raise the reader's own errors.
  • The Python 3.9 CI smoke now runs the packaged verifier's main() on a sample trajectory and pins the reward files. Before, it only imported the verifier.
Area Findings Fixed Already fixed on main
#249: bounded readers, client profiles, verifier 7 (0 P2) 7 0
#250: URL policy and secret shapes 6 (4 P2) 6 0
#250: MCP static checks 13 (7 P2) 13 0
#250: hook and component risk 8 (7 P2) 8 0
#250: MCP declarations, config risk, permissions 8 (1 P2) 8 0
#250: manifests, dependencies, references 9 (2 P2) 8 1
#250: discovery, member paths, frontmatter 7 (5 P2) 6 1
#250: secure filesystem walks 3 (0 P2) 3 0
#249: bounded readers, client profiles, verifier
ID Sev Finding Outcome Commits
R01 P3 Verifier still needs Python 3.11 to honour an HTTP-date Retry-After On Python 3.9 and 3.10, _parse_retry_after in templates/eval.py imports datetime.UTC, which only exists from 3.11, so it ignored HTTP-date Retry-After values. This branch adds a deterministic 3.9 smoke assertion and corrects the #249 CHANGELOG entry, but the one-line eval.py fix is listed under cross_area because no area owns that file; until it lands, the 3.9 smoke on this branch fails at that assertion. 1508eea, 74d38cc
R02 P3 Python 3.9 smoke never runs the verifier's main() path The Python 3.9 smoke only imported eval.py and called a few checks. It now runs the staged eval.py the way test.sh does (python -I, no judge credentials) on a small ATIF trajectory and pins reward.json, reward.txt and skill_evaluator_reward.json. A 3.10-only construct added to extract_tool_calls_as_dicts now fails the smoke on 3.9. 74d38cc
R03 P3 Exact $schema match accepts a trailing newline agent_plugins_schema_version used re.match with a $ anchor, so a single trailing newline was accepted. It now uses fullmatch, so any padding makes the value invalid. 97377cf
R04 P3 Unique-key YAML mode rejects valid merge-key overrides as duplicates Unique-key YAML mode checked keys after merge flattening, so an explicit override of a merged key, or two merge sources sharing a key, was rejected as a duplicate. The check now runs on a mapping's own keys before its first flattening (this also covers a node flattened as another mapping's merge source), and the base constructor applies YAML merge precedence. 7b91f3f, c17185b
R05 P3 YAML-only types escape the graph bounds (!!set size, non-decimal ints) Hexadecimal, binary, octal and sexagesimal YAML ints bypassed int()'s digit limit, so formatting them later raised a plain ValueError. _validate_graph now rejects ints over 14,000 bits as a limit error. The !!set size part was already fixed by 098fa48, whose composed-node preflight bounds every mapping node, and a test now pins it. 7b91f3f
R06 P3 Explicit YAML tags escape load_bounded_yaml as IndexError, KeyError or AttributeError Invalid tagged scalars such as !!int "", !!bool nope and !!timestamp later escaped load_bounded_yaml as IndexError, KeyError or AttributeError. They now become StructuredDataSyntaxError in both duplicate-key modes. 7b91f3f
R07 P3 Adapter tests do not detect dropped or misbound verifier options The adapter tests used inputs where forwarded options could not change the result. New cases use Skill tool names, group workspace mode, workspace skill names, acceptable alternates (including target_skill_used_before in check_security) and fuzzy matching, and pin each verdict. A scratch mutation run of 9 single-option adapter edits showed every one is now caught. 305a88e
#250: URL policy and secret shapes
ID Sev Finding Outcome Commits
R54 P2 An Authorization header with a non-Bearer/Basic credential is not flagged An Authorization or Proxy-Authorization header with a scheme other than Bearer/Basic (Token, ApiKey, Bot, a raw value) got no inline-secret finding; both names now count as credential names in header/query mode, while a scheme word followed only by references ('ApiKey ${KEY}', 'Bot ${TOKEN}') is still allowed, and as an env or flag name the value must still look like key material. 06ff77f, 8ee9e3c
R55 P2 Current OpenAI and Anthropic API keys have no secret shape The 'sk-' secret shape required 16 alphanumerics right after 'sk-', so current sk-proj-/sk-svcacct-/sk-admin-/sk-ant-api03-/sk-ant-admin01- keys had no secret shape; the pattern now also accepts those typed prefixes before a 20+ character body, keeping the left word boundary and the legacy form. 2cc6134
R56 P2 Nested '${A:-...}' defaults overflow the stack in looks_like_inline_secret looks_like_inline_secret recursed once per nested '${A:-...}' layer and raised RecursionError at about 1,000 layers; it now unwraps at most eight layers in a loop and judges whatever is left as a literal, so deeper nesting gets flagged rather than crashing the analysis. 0f179c0
R57 P3 report_text and redact_secrets keep userinfo written with fewer than two slashes report_text removed URL userinfo only after '//' and redact_secrets missed exactly one '/' or '' after a special scheme, so 'http:/user:pw@host'-style passwords stayed in hook targets and MCP command findings; _SLASHLESS_USERINFO_RE now accepts any run of '/' or '' after the scheme and report_text runs it too. 9e3d89f
R58 P2 safe_url shows the password of a malformed URL written without '//' safe_url stripped userinfo only after a literal '//', so a malformed one-slash URL fell back to its raw text and showed the password; the R57 change already covered the reported forms through report_text, but 'https:/ops:pw@host:bad/x' still leaked, so safe_url now writes the slash run after a special scheme as '//' before removing the raw userinfo (instead of the suggested whatwg_url-in-fallback, which would not cover a backslash before '@'). 6b25389
R61 P3 The MCP/hook credential parity test was dropped, leaving an empty section The MCP/hook credential parity section had no test; the 14-URL parity test is restored on analyze_plugin, plus a test for the documented exception that reference-only userinfo is a credential for a hook URL only. 883d186
#250: MCP static checks
ID Sev Finding Outcome Commits
R41 P3 A token-shaped path segment in an MCP URL is not reported A token-shaped segment in an MCP URL path was never checked; _check_url_inline_secrets now runs has_secret_shape over the percent-decoded path segments of the URL as the client builds it (defaults expanded) and reports CRITICAL mcp_url_inline_secret without echoing the token. 85830bd
R42 P2 PowerShell -EncodedCommand and abbreviated -Command forms pass with no finding PowerShell switches were matched only exactly, so -EncodedCommand/-e/-ec/-enc and prefixes such as -Comm passed; PowerShell switches are now matched by prefix (for the command-line parser and unwrapping), and -EncodedCommand is reported as CRITICAL mcp_command_dangerous_form, also behind cmd /c. c74e399
R43 P2 URLs passed in args are not checked for inline credentials URLs in MCP command/args were not checked for userinfo or query credentials; each URL inside a command word (args, --url=..., or a one-string command) now goes through url_credentials(userinfo_rule="secret") and reports mcp_command_inline_secret with the value withheld. a1bbca2
R44 P2 npx -c, npm exec --call and pnpm dlx --shell-mode run a shell line without a finding npx -c/--call, npm exec/x -c/--call and pnpm dlx -c/--shell-mode ran a shell line without a finding; the line is now read as an inline shell program, reported as CRITICAL mcp_command_dangerous_form, and checked for shell metacharacters. c74e399
R45 P2 A ${VAR} in the URL host skips the scheme checks A ${VAR} without a default in the URL host or port skipped the scheme checks; a literal scheme is now still checked (http/ws HIGH unless the written host is loopback, dangerous schemes CRITICAL, others not allowed), and a Codex URL whose reference is outside the authority keeps the full endpoint checks. 85830bd
R46 P3 A '[' in the userinfo skips the MCP credential and endpoint checks An unbalanced '[' in the userinfo made urllib raise, so only mcp_url_malformed_authority was reported; the credential check now still runs on the raw text and the host after the last '@' is classified for metadata/private endpoints. 85830bd
R47 P2 Authorization values are only caught when they start with Bearer or Basic Authorization values were caught only under Bearer/Basic; Authorization and Proxy-Authorization headers now count a literal credential after any scheme (Token, token, Bot) while reference-only values pass, and 'Authorization: ' in command words (--header, --header=, one-string command) is reported as mcp_command_inline_secret. a1bbca2
R48 P3 transport value and an invalid server name are echoed unredacted and unbounded An invalid transport and an invalid server name were echoed unredacted and unbounded; the transport is shown through _shown (or by type name when not a string) and the server name in mcp_name_invalid and in every finding prefix is redacted and bounded to 64 characters. 02c1958, d3dfbe7, d3aa184
R49 P3 Container options missing from _DOCKER_VALUE_FLAGS make their value the image Container value options missing from _DOCKER_VALUE_FLAGS made their value the image; added the hidden Docker aliases (--dns-opt, --net-alias, --umask), podman run value options (--pod, --arch, --os, --creds, --authfile and others) and nerdctl verification options, and --creds user:password is now an inline credential (password part judged, references allowed). a1bbca2
R50 P3 A bash -c program behind a launcher outside _WRAPPERS is not reported A bash -c program behind a launcher outside _WRAPPERS (uv run, wsl, taskset, su -c) was not reported; _check_command now finds any shell word followed by its -c option in the launched argv, and su's -c/--command line, and reports mcp_command_dangerous_form plus the metacharacter check (unwrap_launch_command itself is unchanged so pinning stays as before). c74e399
R51 P2 An IPv4 part written as bare '0x' hides loopback and private hosts _parse_legacy_ipv4 rejected an IPv4 part written as bare '0x', which WHATWG clients read as 0, so hosts like 0x7f.0x.0x.1 looked public; a bare 0x part now parses as 0 and non-hex digits after the prefix are rejected. 393a470
R52 P2 Permission-flag scan is quadratic in the number of option hits in one string The permission-flag scan rejoined continuations and rescanned command breaks and the command word for every option hit (quadratic); a per-string _ShellCommands object now computes break ends once and caches the first command word per segment, answering each hit with a bisect lookup (equal results to the old code on 20,000 fuzzed strings; 65,536 chars in 0.04 s). 9525c2d
R53 P3 A plaintext registry or index URL leaves a pinned package unreported A plaintext http registry or index URL left a pinned package unreported; package runner options --registry, --index-url, --index (including name=url), --default-index, --extra-index-url, -i, --find-links and -f with an http URL (non-loopback) now give HIGH mcp_command_insecure_registry, and their credentials are covered by the R43 URL rule. c74e399
#250: hook and component risk
ID Sev Finding Outcome Commits
R08 P2 Auto-approval is detected only when 'allow' is a literal next to the key Approval hooks that compute the allow value (variable, helper argument, ternary, constant, jq --arg, shell assignment plus printf) got no auto_approve flag; the analyzer now reports any hook whose code sets a decision key and also holds an allow value as a string literal, assignment or jq argument, and the message says the decision may be computed. 5a0e3c6
R09 P2 | sudo -u root bash and similar wrapper forms are not remote code A fetch piped into 'sudo -u root bash', 'nice -n 10 bash', 'env -u HISTFILE bash' or 'doas -u root sh' was not remote code; a stage that starts with a launch wrapper the interpreter regex cannot read is now unwrapped with mcp_static.unwrap_launch_command before its interpreter is checked (09f1d5fd adds a cheap anchored wrapper precheck so padded scripts stay fast). e469c2d, f5a45ea
R10 P2 A pipe at the end of a line does not join the next line A newline after a trailing '|' split the pipeline, and a '| ' continuation left a backslash-newline in front of the next stage, so 'curl ... |' with 'bash' on the next line was missed; command splitting now keeps the pipeline together across that newline, and stage parsing skips line continuations. d4d6612
R11 P2 A curl | sh pipeline inside a Python or JavaScript string is missed In os.system("curl ... | bash") or execSync('curl ... | sh', {...}), the call syntax after the closing quote was read as the interpreter's script path; an unquoted ')', ',' or backtick at the start of a word now ends a stage's arguments, as it ends the enclosing string, subshell or substitution. 61fc58f
R12 P2 A subshell or cd -- before the plugin script hides it on non-approval hooks '(cd "${CLAUDE_PLUGIN_ROOT}" && ./hooks/s.sh)', 'cd -- ...' and a ';' attached to a word hid the plugin script and gave a wrong outside-root finding; command words now drop attached '(' ')' ';' '&' and cd options are skipped, so the script is read on every event (the approval-only 'names the root but no script read' fallback was deliberately not widened, because every non-approval hook such as 'cd ${CLAUDE_PLUGIN_ROOT} && npm start' would then get a HIGH finding). 94699fb
R13 P2 Scripts a second-level hook script runs are dropped without a finding Scripts that a second-level hook script ran were never read or reported; script references are now followed breadth first to any depth within the existing MAX_SCRIPT_READS budget (cycles read once), and notes from every level count as unanalyzed. b6a6fe3
R14 P2 Command hooks only report credentials that sit in a URL Command hooks and monitors reported only credentials in a URL; hook command words now also go through mcp_static._inline_credentials (credential-named flags, token-shaped words, inline Bearer values) plus credential-named NAME=literal assignments (references and command substitutions excluded), and an http hook URL with a token-shaped path segment is reported too. fbcb83c, 86a10c0
R15 P3 HTTP hook findings name the wrong host for a backslash URL For an ambiguous backslash URL such as 'https://169.254.169.254\@hooks.example.com/x', the http hook messages and target named the host after the backslash; as in the MCP endpoint check, the target now uses the WHATWG client reading when neither reading's userinfo carries a credential, so a token in the userinfo stays hidden. e605d39
#250: MCP declarations, config risk, permissions
ID Sev Finding Outcome Commits
R16 P3 LSP cmd /c and powershell -Command operator chains drop from CRITICAL to LOW LSP servers launched through cmd /c or PowerShell -Command (in args or written in command) had their shell-metacharacter finding downgraded to LOW with a wrong 'reach the server literally' message; the downgrade now applies only when _parses_shell_operators is false, so these chains keep the MCP CRITICAL while plain-argv and sh -c cases stay LOW. 1f31ee4
R17 P3 plugin_settings_broad_allow quotes allow rules unbounded and unredacted plugin_settings_broad_allow quoted the raw list repr of allow rules, so long rules made huge messages and credentials in a rule were copied verbatim; each quoted rule now goes through report_text(rule, 60) like --allowedTools rules. 1f31ee4
R18 P3 Codex profiles past the first 64 are skipped without a finding analyze_codex_settings read only the first 64 [profiles.*] tables, so a later risky profile got no finding; every profile is now checked (the file is byte-bounded), up to 64 bypass settings are listed individually, and one extra HIGH finding counts the rest. 1f31ee4
R30 P3 An invalid later MCP server in a config file replaces the valid one as effective A later config-file MCP server with no usable command or url string ("oops", {"command": 5}, {"command": ""}) replaced an earlier valid same-name server as effective and triggered a misleading duplicate-name finding; McpCollection.effective and _flag_duplicate_names now share a _replaces rule that keeps the earlier server for such file-sourced entries while inline maps still always replace. dee82d3
R31 P3 Backslash after ${CLAUDE_PLUGIN_ROOT} hides server code in unscanned folders _rooted_launch_paths required '/' right after a plugin-root variable, so ${CLAUDE_PLUGIN_ROOT}\node_modules... (and mixed or --flag= forms) hid server code in unscanned folders; backslashes are now read as '/' before matching, as _launch_cwd already did. dee82d3
R32 P3 Credentials in non-http(s) mcpServers references reach findings unredacted Non-http(s) mcpServers references (ws/wss/ftp URLs, one-slash or backslash https, //user:pw@host, ./servers.json?token=...) were quoted raw in findings, metadata and broken-source rows; _collect_path_ref now reports them through a new _reported_ref (safe_url for any scheme, redact_secrets plus report_text otherwise) consistently in findings, plugin_component_ref, broken sources and bundles, leaving credential-free refs unchanged. dee82d3
R36 P3 Config walk skips whole subtrees under user-chosen keys named like help or notes _ConfigWalk skipped the whole subtree under any documentation-named key, so a Codex server named notes/help/comment/title was never checked for bypass or --allowedTools flags; the walk now skips only prose (a string or list of strings) under those keys and walks tables. 811bfe9
R37 P2 PowerShell allow rules are never treated as broad shell grants bash_rule_risk ignored PowerShell rules, so PowerShell, PowerShell(*), PowerShell(iex *) and similar grants were never flagged; it now classifies PowerShell rules like Claude Code does (shared interpreter prefixes plus pwsh, powershell, cmd, wsl, iex, invoke-expression, start-process and the other launchers, each also as .exe), which flows to is_broad_allow_rule, allowed_tools_flag_issues and the skill/command/agent callers. 811bfe9
#250: manifests, dependencies, references
ID Sev Finding Outcome Commits
R19 P3 SCP-style origin on an SSH host alias is reported as a local path The hosted-origin check accepted the SCP form only with a user or a dotted host, so an SSH config alias origin such as gh:owner/repo was reported as a local path and every same-repository ref became unresolved; it now follows git's rule (a colon before the first slash or backslash means SSH) and still refuses a single-letter drive prefix. f2a83a1
R20 P3 Origin URL decoded with the locale code page; UnicodeDecodeError escapes on Windows origin_remote_url decoded git's UTF-8 output with the locale code page (cp1252 on Windows), so some non-ASCII origins raised out of identity resolution and others became mojibake slugs; it now decodes as UTF-8 with errors='replace' and also treats ValueError as 'no origin'. a7f625e
R21 P3 The 512-character ref label cap does not bound reasons or findings Only the ref label was capped at 512 characters, so reasons and unverified-dependency findings still repeated the full repo, kind, path or probe detail; a shared _clip helper now caps every ref-derived part of a reason (row paths of resolved refs are unchanged). 57259a2
R22 P2 Repo-root plugins can declare .git/config as a provided rule The content-root guard ran only for targets outside the plugin root, so a repository-root plugin could declare .git/config as a provided rule; a ref whose kind or name passes through any SCAN_EXCLUDED_DIRS folder (.git, node_modules, .venv, ...; case-insensitive) is now unresolved with cause unsafe, wherever it points. f5307d4
R23 P3 A NUL in one ref aborts classification and hides missing refs The bundle-ref half was already fixed on main (classify_ref rejects a NUL as an unsafe path, covered by test_nul_dependency_paths_are_unresolved_instead_of_raising); the remaining marketplace half, where a NUL in a marketplace source raised ValueError out of classify_claude_dependency, now gives unresolved/unsafe, and _lstat also catches ValueError. 17d197b
R26 P2 Manifest lookup fails on any link or wide tree in the top two levels locate_plugin_manifest walked every entry in the top two levels, so an unrelated link (AGENTS.md -> CLAUDE.md, docs/alias.md) or a folder of more than 4,096 files failed the lookup and dropped all component findings; it now probes only the root manifest names and vendor manifest folders, and still fails closed on a linked, hard-linked or non-regular manifest or a linked vendor folder. 9440ea4
R27 P3 Linked marketplace source is classified missing; helpers untested A marketplace source folder reached through a link, or one that could not be inspected, was classified missing (blocking); it is now unresolved with cause link or error like bundle refs, and find_claude_marketplace/classify_claude_dependency have tests for lookup, the cross-marketplace allow list and each state. 17d197b
R38 P3 Selector and string refs normalize a mixed-case .git suffix differently Both normalize_ref branches and slug_from_remote_url already lowercase before removing .git (commit 088b645), and the reviewer's repro now gives one canonical id and one duplicate group for Org/Repo.GIT in both forms.
R39 P3 String and selector refs normalize the same dependency differently The .GIT half was already fixed by 088b645, but string refs still kept empty name segments (shared/, t//shared) that the selector form dropped, so refs to one folder got separate rows and were counted twice; string refs now drop empty name segments too. 936f88a
#250: discovery, member paths, frontmatter
ID Sev Finding Outcome Commits
R24 P2 Declared skills folders silently skip hidden and dotted artifact child folders A declared skills folder for Claude and Cursor skipped every dot-named child, so skills such as .hidden/, .evals/ and .versions/ were never listed and their hooks were missed. _child_skill_manifests now skips only dependency, VCS and cache folders, which matches how the default skills/ folder is handled. e8d2ba7
R25 P3 Codex inventories a commands map it drops For Codex, a commands object map still produced effective declared command rows, even though Codex drops the map and loads commands/ instead. The map branch is now skipped for profiles with codex_path_rules, so the map gets the same MEDIUM plugin_component_path_invalid as any other wrong-type value. 9dfe8b8
R28 P3 Lenient frontmatter retry and over-limit frontmatter_error have no tests Nothing tested the lenient frontmatter retry or the over-limit frontmatter_error. New tests check that description: Deploy: runs the script plus allowed-tools: Bash still raises the skill and command unrestricted-Bash HIGH findings, and that a 70,000-character value sets frontmatter_error and a HIGH plugin_component_unreadable. b7d9b45
R29 P2 Frontmatter closed by '----' or '--- # end' hides grants and hooks that Claude Code loads parse_markdown ended frontmatter only at a line that was exactly ---, so closers such as ----, --- # end or ---end hid the grants and hooks that Claude Code loads. It now removes a leading BOM and ends the block at the first --- after the opening line, the same way Claude Code splits it. b7d9b45, 0feeebe
R33 P2 Unscanned-skill walk stops at its budget without marking discovery incomplete find_unscanned_plugin_skill_manifests stopped silently when it hit its entry budget or the depth limit, so discovery reported nothing and stayed complete. It now returns (found, complete), and _declared_skill_tree adds a LOW plugin_skill_scan_incomplete finding when the walk is cut short. ae50597
R34 P2 Case variants of pruned folder names hide skills with no finding Discovery prunes differently cased folder names such as EVALS, Results and Node_Modules on case-insensitive filesystems, but the checks that report pruned skills and agents compared exact names, so those items were hidden with no finding. A new scan_excluded_name helper (built on matches_filesystem_name) is now used by the unscanned-skill walk, the dependency-folder walk and its finding text, and _unscanned_folder when it is given the plugin root. ae50597, 9784b0d
R35 P2 Declared paths are stripped, so discovery reads a different file than the client normalize_declared_path no longer strips the declared value, so discovery resolves the literal whitespace-suffixed path that Codex loads; the repro now lists custom /evil. The existing whitespace test covers this.
#250: secure filesystem walks
ID Sev Finding Outcome Commits
R40 P3 Windows walker reports a linked directory at the path budget differently from the POSIX walker The Windows walker refused a junction or directory symlink before counting it against max_paths, so a link at the budget edge raised unsafe_path on Windows but path_count_limit on POSIX; admit_directory now counts the link before refusing it, matching the POSIX walker. 083346c
R59 P3 Windows CI never runs the discovery alias, exclusion, depth or budget paths with real handles The selection and budget parity tests were skipped on native Windows, so the real-handle walker never ran the CLAUDE.md alias, excluded-directory and case-alias pruning, or budget errors in Windows CI; they now run discover_secure_files natively on every platform against fixed expectations (a junction for the directory link, a skip only if file symlinks are unavailable) and compare with the stand-in walker off Windows. 083346c
R60 P3 "Never opened outside" assertion cannot fail The redirect test's 'never opened outside' assertion compared lexical handle paths with a sibling directory and could not fail; it now asserts that no handle was opened below any of the redirect entries (linked, guide.md, CLAUDE.md). 083346c, bded91e

Behaviour changes worth a look

These changes flag more configurations, on purpose:

  • R42: PowerShell switches are matched by prefix (-e, -ec, -enc for -EncodedCommand) on every argument, including script arguments after -File.
  • R50: any shell word followed by -c in a launched command line is reported, whatever launcher comes first.
  • R47, R54: an Authorization or Proxy-Authorization value with any scheme counts as a credential. Prose such as authorization: <two words> in a command word can also be flagged.
  • R13: hook script references are followed to any depth inside the existing file budget.

Also fixed while integrating

  • MCP launch paths inside case-variant pruned folders (Node_Modules/, EVALS/) are now reported, matching the R34 member-path fix.
  • LSP findings no longer print both an lspServers[...] and an mcpServers[...] prefix for long or unusual server names. R48 made the MCP prefix bounded and redacted, and the LSP rewording now strips that same prefix.

Optimizations

  • R52 (mcp_static.py): the permission-flag scan rescanned the whole string for every option it found, which was quadratic. Each string is now lexed once.
  • f5a45ea (plugin_component_risk.py): only pipeline stages that start with a launch wrapper are unwrapped, instead of every stage.

The optimization review kept 5 of 14 proposals after measuring and challenging each. Two are applied above. The other three are not in this PR:

  • Removing the verifier template's second copy of the log-redaction rules saves no time; it only removes duplicated code.
  • Most of the "unused helper" removals in plugin_manifest.py and plugin_dependencies.py no longer apply, because Compose private inventory, audits and catalog checks #257 now calls those helpers.

Not in this PR

These were noticed while fixing and left for separate changes:

  • Component-path findings for skills, commands, agents and hooks still quote the declared path as written, so a URL with credentials in one of those fields reaches the message. MCP references are redacted here (R32).
  • utils/helpers.resolve_git_root decodes git output with the locale code page on Windows, like R20 did.
  • PowerShell rules in hook if conditions are still read as Bash rules.
  • Finding.metadata["mcp_server"] keeps the raw server name for inventory attribution.
  • The remaining duplicate-code cleanups: the verifier template's copy of the log-redaction rules, and the dead plugin_paths.py pruned-folder walk.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

The diff is 35 files, +3,499/-340: about +1,280/-300 in src and scripts, and about +2,220 in tests.

What was run instead of the three unchecked targets:

  • Tests: 88 test files that cover every touched module (-n 4): 10,678 passed, 13 skipped. 15 tests failed and one collection error occurred, all identical on unchanged main in this environment: test_judge_failure_artifacts, test_harbor_secure_docker_environment and timing-sensitive test_retry cases under heavy load. The full suite and the platform matrix run in CI.
  • Lint: ruff check is clean on every touched Python file. ruff format --check is clean on every touched file except the verifier template, which has the same 12 pre-existing lines as main.
  • Python 3.9: scripts/ci/smoke_harbor_verifier.py --python passes with Python 3.9.6 and 3.13 task interpreters after merging current main, including main() and the HTTP-date Retry-After case. Main now omits judge-scored reward dimensions when no judge runs, so the smoke expects only the deterministic dimensions.
  • After merging main (Share trace evidence, applicable scores and security checks #258, fix(tier3): retain scores after verified timeout recovery #222, ci: run main test jobs in parallel (-n auto) #261): 1,114 tests in the touched areas pass.
  • Gitleaks: the CI image in full-history git mode reports no leaks.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

The existing #249 entry is corrected: the 3.9 verifier now also honours HTTP-date Retry-After, and CI scores a sample trajectory on Python 3.9. The other fixes are in private analysis code that is not yet turned on, or are covered by that entry.

🤖 Generated with Claude Code

Placeholder commit that opens the follow-up pull request. The fixes land
in later commits on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 marked this pull request as ready for review October 30, 2026 07:45
@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks
rng1995 and others added 22 commits October 30, 2026 08:43
looks_like_inline_secret called itself once per nested '${A:-...}' layer, so about 1,000 layers in one .mcp.json or hooks.json value raised RecursionError and stopped the analysis. It now unwraps at most eight layers in a loop and judges what is left as a literal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…dential

Only Bearer and Basic payloads counted, so 'Authorization: Token <hex>', 'ApiKey <base64>' or a raw value in an MCP server or HTTP hook header got no inline-secret finding. Authorization and Proxy-Authorization now name a credential as header names, and a scheme word followed by references ('ApiKey ${KEY}') is still allowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The 'sk-' shape needed 16 letters or digits right after the prefix, so 'sk-proj-', 'sk-svcacct-', 'sk-admin-', 'sk-ant-api03-' and 'sk-ant-admin01-' keys had no secret shape and went unflagged in MCP args, header values and URL queries. Those typed prefixes are now accepted before the key body.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
WHATWG clients read 'http:/user:pw@host', 'http:\user:pw@host' and 'http:user:pw@host' as userinfo, but report_text only removed it after '//' and redact_secrets missed the one-slash forms, so hook targets and MCP command findings kept the password. Both now remove userinfo after a special scheme followed by any run of '/' or '\'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
safe_url removed userinfo only after a literal '//', so a malformed URL such as 'https:/ops:pw\@host:bad/x' fell back to its raw text and showed the password in MCP and hook findings. safe_url now writes the run of '/' and '\' after a special scheme as '//' first, the way WHATWG clients read it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The section 'One credential rule for MCP server URLs and HTTP hook URLs' had lost its test. It is ported to analyze_plugin and checks that 14 URLs get the same verdict on both surfaces, plus the documented exception that reference-only userinfo counts for a hook URL only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…n header

Treating Authorization as a credential name made reference-only values such as 'Basic ${USER}:${PASS}' or 'Bearer ${A}.${B}' an inline secret for MCP headers, because the ':' or '.' left between the references counted as a literal. A scheme word followed only by separators is now allowed, as the HTTP hook header check already does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…puted

An allow value held apart from permissionDecision, decision or behavior (a variable, a helper argument, a ternary, a jq --arg or a shell assignment) gave no auto_approve flag. The analyzer now reports these too and says the decision may be computed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
… value

A fetch piped into 'sudo -u root bash', 'nice -n 10 bash' or 'env -u HISTFILE bash' was not remote code, because the interpreter pattern reads wrapper options only as one word. A stage the pattern does not match is now unwrapped with the MCP launch-command unwrapper before its interpreter is checked.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
A newline after a trailing '|' ended the shell command, and a '| \' line continuation left a backslash and newline in front of the next stage, so 'curl ... |' followed by 'bash' on the next line was not remote code. Command splitting now keeps the pipeline together, and stage parsing skips line continuations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…ipt strings

In os.system("curl ... | bash") or execSync('curl ... | sh', {...}), the call syntax after the closing quote read as the interpreter's script path, so the stage did not count as running the download. An unquoted ')', ',' or backtick at the start of a word now ends the stage's arguments, as it ends the string, subshell or substitution that holds the command.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…ched ';'

'(cd "${CLAUDE_PLUGIN_ROOT}" && ./hooks/s.sh)', 'cd -- ...' and a ';' attached to a word hid the plugin script, so non-approval hooks got no remote-code finding and a wrong outside-root one. Command words now drop attached '(', ')', ';' and '&', and cd options are skipped before the target directory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…apper

The wrapper fallback for '| sudo -u root bash' ran on every stage after a fetch, which slowed scans of padded scripts. A cheap anchored check now limits it to stages that start with a wrapper such as sudo, doas, env, nice or timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
A script that a second-level hook script runs was never read and never reported, so remote code or an auto-approval three scripts deep went unflagged. Script references are now followed breadth first within the existing read budget, and notes from every level count as unanalyzed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Command hooks and monitors reported only credentials in a URL, so 'Authorization: Bearer ...', '--api-key ...', 'GITHUB_TOKEN=... tool' or a bare token gave no plugin_hook_inline_secret. Hook command words now go through the MCP command-argument credential rule plus credential-named assignments, and an http hook URL with a token-shaped path segment is reported too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
For 'https://169.254.169.254\@hooks.example.com/x' the http hook findings and target named hooks.example.com, although Claude Code posts to the text before the backslash. As in the MCP endpoint check, an ambiguous URL whose userinfo carries no credential is now shown the way the client reads it; a token in the userinfo stays hidden.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
A hook command that reads its credential at run time, such as --token "$(gh auth token)", was reported as a CRITICAL inline secret, and so was a reference with a ';' attached. Command substitutions now read as references and attached shell punctuation is dropped before the credential checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
An LSP server launched through cmd /c or PowerShell -Command keeps the CRITICAL shell-metacharacter finding, because those wrappers do chain programs. Broad allow rules are quoted bounded and redacted, and every Codex profile is checked, with one HIGH finding counting bypasses past the listed 64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
A config-file MCP server with no usable command or url no longer replaces an earlier server of the same name, as Claude Code drops it before merging. A backslash after a plugin-root variable now names a plugin path, and mcpServers references are reported without URL userinfo, queries or credentials.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
PowerShell allow rules are classified like Bash rules, with Claude Code's PowerShell launcher prefixes, so a broad PowerShell grant is flagged. The config walk now skips only prose under documentation keys, so a server named notes or help is still inspected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…dget

The Windows walker refused a junction or directory symlink before counting it, so a link that crossed max_paths raised unsafe_path there but path_count_limit on POSIX; admit_directory now counts the link first. The walker parity tests also run natively on Windows with real handles (exact CLAUDE.md alias, excluded and case-alias pruning, budget errors), and the redirect test now checks that no handle was opened below a link.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The redirect parity test was the only touched walker test still writing its fixtures with the platform default encoding.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A string ref kept empty name segments (shared/, t//shared) while the selector form dropped them, so refs to one folder got separate rows and were counted twice. Both forms now share one canonical id.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995 and others added 22 commits October 30, 2026 08:44
A declared skills folder skipped every child whose name starts with a dot, so `.hidden/`, `.evals/` and `.versions/` skills got no row and no hook record, although clients load them and the default `skills/` folder lists them. Only dependency, VCS and cache folders are skipped now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Codex accepts only `./` paths for `commands`, drops an object value and loads `commands/` instead, but discovery still turned each map entry into an effective declared command. The map is now reported like any other wrong-type value (MEDIUM `plugin_component_path_invalid`) and only the default folder is inventoried.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…te walks

The searches for skills that discovery prunes compared exact folder names, so `EVALS/`, `Results/` or `Node_Modules/` folders, which discovery prunes on a case-insensitive filesystem, hid skills and agents with no finding. They now match the spellings discovery prunes, and the unscanned-skill walk returns whether it finished and adds a LOW `plugin_skill_scan_incomplete` when its entry budget or depth limit stops it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…e Code

Frontmatter ended only at a line that is exactly `---`, so a `----`, `--- # end` or `---end` closer turned the whole file into body and hid `allowed-tools` and frontmatter `hooks` that Claude Code still loads. The block now ends at the first `---` after the opening line, after a BOM, as Claude Code splits it; tests also cover the lenient retry and the over-limit `frontmatter_error` that fails closed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The Claude Code-style frontmatter split kept carriage returns in the block, so the lenient retry quoted a flow list such as [Bash, Read] as a string and hid an unrestricted Bash grant. The block's CRLF line endings now become LF, as they did before the split changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The standalone verifier imported datetime.UTC, which only exists from
Python 3.11, so on 3.9 and 3.10 task images an HTTP-date Retry-After
header fell back to the default delay. It now uses timezone.utc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
MCP launch paths were checked against pruned folder names without the
plugin root, so a server under Node_Modules/ or EVALS/ was not reported
on case-insensitive filesystems, where whole-tree scans prune that
spelling too. Both call sites now pass the plugin root.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The 3.9 smoke now runs the staged eval.py the way test.sh does and checks
the reward files, and asserts that HTTP-date Retry-After values parse on
the task interpreter. The changelog entry now describes what CI covers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Adapter cases now use inputs where Skill tool names, group workspace mode,
workspace skill names, acceptable alternates and fuzzy matching each change
the verdict, and pin those verdicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The exact $schema match used re.match with a $ anchor, which also accepts
one final newline. It now uses fullmatch, so any padding makes the value
invalid, as the docstring says.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Unique-key YAML now checks only a mapping's own keys, so a key that
overrides a merged one is no longer a duplicate. Integers too large to
format are a limit error, and invalid tagged scalars such as !!int "" are
syntax errors instead of escaping as IndexError, KeyError or AttributeError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The own-key duplicate check ran before flatten_mapping turned a plain = key into a string, so strict mode rejected documents such as '=: 1' that loaded before. The check now applies the same conversion first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
The URL Standard parses an IPv4 part written as bare "0x" as 0, so clients connect to hosts such as 0x7f.0x.0x.1 as 127.0.0.1. The endpoint classifier now does the same and rejects non-hex digits after the prefix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…e host

A literal scheme is now checked when a ${VAR} without a default decides the host or port, and a Codex URL whose reference sits outside the authority keeps its endpoint checks. A '[' in the userinfo no longer skips the credential and host checks, and a token-shaped path segment is reported as an inline secret.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…ders and --creds

A URL in command or args now goes through the shared URL credential rule, and an Authorization or Proxy-Authorization header is an inline credential under any scheme, in headers and in command words such as --header. Container runs read podman, nerdctl and hidden Docker value options so their values are not taken as the image, and --creds user:password is an inline credential.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…s and other launchers

PowerShell switches are matched by prefix and -EncodedCommand is a dangerous form, npx/npm exec -c/--call and pnpm dlx --shell-mode lines are read as shell programs, and a shell with -c behind any launcher (uv run, wsl, taskset, su -c) is reported. A package runner's plaintext http registry or index URL is now a HIGH mcp_command_insecure_registry finding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…n findings

An invalid transport is shown through the shared report redaction (or by its type when it is not a string), and the server name in mcp_name_invalid and in every finding prefix is redacted and bounded to 64 characters, so a token or a very long name is not echoed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Each permission option hit rejoined line continuations and rescanned command breaks from the start of the string, so a string with many hits took quadratic time. The command breaks and the first command word of each command are now computed once per string and each hit is answered with a bisect lookup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Server names in finding messages are now redacted and bounded, so a caller that strips the raw
mcpServers['<name>']: prefix (the LSP rewording) no longer matches it for long or unusual names.
mcp_message_prefix gives the exact prefix mcp_finding writes, for those callers to strip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
MCP finding messages now show a bounded, redacted server name, so the
LSP rewording no longer matched the raw-name prefix and printed both
prefixes for long or unusual names. It now strips the prefix that the
MCP checks write and shows the same bounded name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
…iew-findings

Signed-off-by: Narendran Raghavan <[email protected]>

# Conflicts:
#	CHANGELOG.md
Main now omits judge-scored reward dimensions when no judge runs, so the
verifier smoke pins the three deterministic dimensions and the overall
score instead of all six.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 merged commit bd4684c into main Oct 30, 2026
20 checks passed
@rng1995
rng1995 deleted the naren/fix-249-250-review-findings branch October 30, 2026 19:48
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* chore: start follow-up fixes for the #249 and #250 review
* fix(security): unwrap nested env defaults without recursion
* fix(security): treat an Authorization header with any scheme as a credential
* fix(security): recognise current OpenAI and Anthropic API key shapes
* fix(security): drop URL userinfo written with one slash from report text
* fix(security): keep userinfo out of safe_url for one-slash URLs
* test: restore the MCP and hook URL credential parity test
* fix(security): allow separators between references in an Authorization header
* fix(plugin): report hook auto-approval when the allow decision is computed
* fix(plugin): see the interpreter behind a wrapper option that takes a value
* fix(plugin): continue a hook pipeline after a trailing pipe
* fix(plugin): find curl-into-shell pipelines inside Python and JavaScript strings
* fix(plugin): read the hook script after a subshell, cd option or attached ';'
* perf(plugin): unwrap only pipeline stages that start with a launch wrapper
* fix(plugin): follow hook script references past the second level
* fix(security): report inline credentials anywhere in a hook command
* fix(plugin): name the host Claude Code posts to for a backslash hook URL
* fix(security): ignore command substitutions in hook inline-secret checks
* fix(plugin): keep LSP parser chains critical and bound settings checks
* fix(plugin): match MCP merge, Windows root paths and ref redaction
* fix(plugin): classify PowerShell rules and walk tables under doc keys
* fix(security): count directory links against the Windows discovery budget
* test: write the redirect test fixtures as UTF-8
* fix(plugin): drop empty name segments in string dependency refs
* fix(plugin): treat an SSH host alias origin as a hosted remote
* fix(plugin): decode the origin remote URL as UTF-8
* fix(security): refuse dependency refs through .git and other never-content folders
* fix(plugin): cap ref-derived text in dependency reasons
* fix(plugin): keep linked or unreadable marketplace sources advisory
* fix(plugin): probe only the supported manifest paths when locating a plugin
* fix(plugin): list hidden and dotted children of a declared skills folder
* fix(plugin): stop inventorying a Codex commands map
* fix(plugin): report pruned-folder skills in any spelling and incomplete walks
* fix(plugin): split frontmatter at the first closing dashes like Claude Code
* fix(plugin): keep CRLF frontmatter values whole in the lenient retry
* fix(tier3): honour HTTP-date Retry-After in the verifier on Python 3.9
* fix(plugin): report MCP server code in case-variant pruned folders
* test(ci): score a trajectory with the Python 3.9 Harbor verifier
* test(tier3): cover verifier adapter options that change results
* fix(plugin): reject a trailing newline in Agent Plugins schema URLs
* fix(security): keep YAML merges, huge ints and bad tags in bounds
* fix(security): keep a plain = YAML key loading in unique-key mode
* fix(plugin): read a bare 0x IPv4 part as zero in MCP host checks
* fix(plugin): keep MCP URL checks when a reference or bracket hides the host
* fix(plugin): catch MCP command credentials in URLs, Authorization headers and --creds
* fix(plugin): report MCP shell lines behind PowerShell, package runners and other launchers
* fix(plugin): redact and bound MCP transport values and server names in findings
* fix(plugin): scan permission flags in linear time per string
* refactor(plugin): expose the MCP finding message prefix
* fix(plugin): strip the bounded MCP prefix when rewording LSP findings
* test(ci): expect only applicable reward dimensions in the 3.9 smoke

Signed-off-by: Narendran Raghavan <[email protected]>
rng1995 added a commit that referenced this pull request Nov 2, 2026
…ier redaction (#260 follow-ups) (#312)

* fix(utils): decode git output in helpers as UTF-8

resolve_git_root and resolve_git_remote_url decoded git's UTF-8 output with
the locale code page, so on a cp1252 Windows host a repository under a
non-ASCII folder resolved to a garbled path or raised an uncaught
UnicodeDecodeError. All git calls now decode as UTF-8, keeping path bytes
losslessly with surrogateescape and replacing bad bytes in URLs and refs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* fix(plugin): read PowerShell hook conditions as PowerShell rules

A hook 'if' condition such as PowerShell(iex *) was rewritten to a Bash rule, so its launcher looked narrow and an auto-approve hook went unreported; the condition now keeps its own tool. Skill, command, and subagent findings for a flagged PowerShell grant now suggest a scoped PowerShell rule, and a subagent's PowerShell grant is no longer hidden by disallowedTools: Bash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* fix(plugin): name the granted shell tool in inert allowed-tools findings

A skill or command that only Codex loads had its shell grant reworded as unrestricted 'Bash' with "it has no Bash tool", even for a PowerShell(iex *) grant. The finding now keeps the grant and tool the component analysis named.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* refactor(tier3): reuse shared log redaction in the Harbor verifier

The verifier template kept its own copy of the LOG_* patterns and
redact_secrets_in_log_line although _copy_verifier stages secret_redaction.py
beside it and checks.py already imports that function. The template now
aliases the shared function, and the drift-guard tests become one identity test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

* test: guard the shared verifier redaction and note the Git decoding fix

The Python 3.9 verifier smoke now asserts that the staged verifier uses the shared secret_redaction function. The JWT redaction test no longer runs every case twice against the same function, and the CHANGELOG notes the Windows Git output decoding fix.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant