Remove CLI loader injection and scan agent surfaces#16
Merged
Conversation
e1cfd4f to
c7da188
Compare
The detection docs already described scanner coverage for agent and MCP surfaces, but only agent-report audited those files directly. This change reuses the Agent/MCP audit logic from scan so committed tool configs and explicit guardrail-bypass instructions are caught before execution. Constraint: Keep Tuesday detection work small and reviewable. Rejected: Scan all agent instruction shell wording as broad shell access | too noisy for ordinary AGENTS.md operational guidance. Confidence: high Scope-risk: narrow Directive: Keep scanner instruction-file checks focused on explicit bypass language unless false-positive evidence supports broader blocking. Tested: node --test test\\scanner.test.js test\\v3.test.js Tested: npm run pr:check Not-tested: Full release:weekly-check
The branch had to be rebased onto GitHub's current master before PR #16 could merge. That base contained a critical obfuscated JavaScript loader line in the CLI, which made ExecFence block its own scan and prevented the guarded PR check from completing. Remove only the injected line so the detection PR remains reviewable and the scanner can pass on the current base. Constraint: GitHub origin/master currently contains the injected loader residue and PR #16 must be mergeable against that base. Rejected: Baseline the scan finding | would normalize a critical code-execution finding in the CLI. Confidence: high Scope-risk: narrow Directive: Do not reintroduce long obfuscated loader lines in executable source; scan must stay clean before build/test. Tested: node bin/execfence.js scan . Tested: node --test test\\scanner.test.js test\\v3.test.js Tested: node bin/execfence.js run -- npm run pr:check
c7da188 to
92b7eaa
Compare
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
global.i='1-22-*'loader line fromlib/cli.jsthat is present on the current release baseexecfence scanto audit committed MCP/tool configs with the existing Agent/MCP rulesPriority / release readiness
This is a Thursday stabilization PR for release readiness. The release-blocking part is the
lib/cli.jscleanup; the guardrail improvement is intentionally small and reviewable.Documentation impact
scan/agent-reportat the required level, and this PR does not add a new command or setup path.docs/detection.md, which is part of the published docs surface, because guardrail behavior changed.scancoverage from broader changed-fileagent-reportreview.filesalready cover agents, guardrails, docs, and supply-chain detection.Unreleasedwith the CLI cleanup and scanner detection improvement.Verification
node bin/execfence.js config validate --strict --format jsonnode bin/execfence.js run -- npm run pr:checknpm pack --dry-run --jsonnode bin/execfence.js run -- npm run release:weekly-checkRelease impact
Likely patch if treated as release-blocker cleanup; minor only if the expanded default scanner blocking is considered a user-visible detection feature.
Risk
Low to moderate. The highest-risk line is removed from the CLI. The MCP/tool scan path reuses existing Agent/MCP audit logic, and instruction-file blocking is limited to explicit bypass language to avoid noisy operational false positives.