Repository navigation
fix(dotnet): add forbidden-arg checker — block MSBuild Custom*Targets / runsettings RCE - #128
Merged
Merged
Conversation
Third independent review pass — security core, command filters, analytics/discovery, runtime-data mining. 5 top-tier findings (2 P0 operational, 3 security CRITICAL), 13 important, plus data-grounded feature ideas. Measured blended savings 53.4%; 33 startup crashes in 7 days. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… / runsettings RCE (SEC-C1) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
noogalabs
pushed a commit
to noogalabs/contextcrawler
that referenced
this pull request
Jun 4, 2026
* feat(gain): add per-project token savings with -p flag Record project_path (cwd) in tracking database and add filtered query methods. `rtk gain -p` shows savings scoped to the current project directory instead of global aggregates. - tracking.rs: Add project_path column with auto-migration, index, and filtered variants for all query methods (summary, daily, weekly, monthly, recent) - gain.rs: Add resolve_project_scope(), shorten_path(), scope-aware header, pass project filter to all queries and exports - main.rs: Add --project/-p flag to Gain command Backward-compatible: existing rows get empty project_path, unfiltered queries delegate to filtered(None) which returns all data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(tracking): use GLOB instead of LIKE for project path filtering Address reviewer feedback on PR thehoff#128: 1. Replace SQL LIKE with GLOB in all project-scoped queries to prevent `_` and `%` characters in path names from being interpreted as wildcards (e.g., `my_project` matching `myXproject`). GLOB uses `*` for wildcard matching which is safer for file system paths. 2. Guard the startup `UPDATE commands SET project_path = ''` migration with an `EXISTS` check so it only runs when NULL rows actually exist, avoiding a no-op UPDATE on every startup after the first migration. 3. Add `DEFAULT ''` to the ALTER TABLE migration so new installs never create NULL project_path values. 4. Add 3 new unit tests for project_filter_params GLOB behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
Fixes E2E review SEC-C1 (CRITICAL).
dotnetwas the one ecosystem with env-strip but no argv deny-list checker — MSBuild exposes RCE-grade CLI flags env-stripping doesn't touch.check_forbidden_dotnet_args(insrc/core/utils.rs, following thecheck_forbidden_go_args#111 pattern) now rejects, wired into all 3 dotnet run paths, failing closed:CustomBefore*/CustomAfter*targets/props (injects an attacker.targetswith<Exec>→ RCE) — via-p://p:/--property:/-property:.dotnet test --runsettings/-s(RunSettings can load attacker assemblies).Review found and closed two bypasses in the first cut:
-p:Configuration=Release;CustomBeforeMicrosoftCommonTargets=evil— now every;-pair is checked.-P:,--PROPERTY:) — MSBuild folds case; checker now does too.@response-fileargs rejected (they expand to arbitrary MSBuild flags).Test Plan
Part of the 2026-05-22 E2E review remediation.
🤖 Generated with Claude Code