Skip to content

Remove CLI loader injection and scan agent surfaces#16

Merged
chrystyan96 merged 2 commits into
masterfrom
codex/scan-agent-mcp-surfaces
May 20, 2026
Merged

Remove CLI loader injection and scan agent surfaces#16
chrystyan96 merged 2 commits into
masterfrom
codex/scan-agent-mcp-surfaces

Conversation

@chrystyan96
Copy link
Copy Markdown
Owner

@chrystyan96 chrystyan96 commented May 13, 2026

Summary

  • remove the obfuscated global.i='1-22-*' loader line from lib/cli.js that is present on the current release base
  • extend execfence scan to audit committed MCP/tool configs with the existing Agent/MCP rules
  • block explicit agent instruction attempts to skip, ignore, disable, or bypass ExecFence/security scans while keeping normal AGENTS.md shell wording low-noise

Priority / release readiness

This is a Thursday stabilization PR for release readiness. The release-blocking part is the lib/cli.js cleanup; the guardrail improvement is intentionally small and reviewable.

Documentation impact

  • README.md: not changed; the command table already describes scan/agent-report at the required level, and this PR does not add a new command or setup path.
  • GitHub Pages/docs: updated docs/detection.md, which is part of the published docs surface, because guardrail behavior changed.
  • docs/detection.md: updated to distinguish committed scan coverage from broader changed-file agent-report review.
  • npm package metadata: not changed; package description, keywords, and package files already cover agents, guardrails, docs, and supply-chain detection.
  • CHANGELOG.md / release notes: updated Unreleased with the CLI cleanup and scanner detection improvement.

Verification

  • GitHub CI: all PR Remove CLI loader injection and scan agent surfaces #16 jobs passed across Ubuntu, Windows, macOS, Node 20/22, and helper smoke.
  • node bin/execfence.js config validate --strict --format json
  • node bin/execfence.js run -- npm run pr:check
  • npm pack --dry-run --json
  • node bin/execfence.js run -- npm run release:weekly-check

Release 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.

@chrystyan96 chrystyan96 added enhancement New feature or request documentation Improvements or additions to documentation labels May 13, 2026
@chrystyan96 chrystyan96 force-pushed the codex/scan-agent-mcp-surfaces branch 2 times, most recently from e1cfd4f to c7da188 Compare May 20, 2026 17:51
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
@chrystyan96 chrystyan96 force-pushed the codex/scan-agent-mcp-surfaces branch from c7da188 to 92b7eaa Compare May 20, 2026 17:58
@chrystyan96 chrystyan96 changed the title Scan committed agent and MCP guardrail surfaces Remove CLI loader injection and scan agent surfaces May 20, 2026
@chrystyan96 chrystyan96 added the bug Something isn't working label May 20, 2026
@chrystyan96 chrystyan96 merged commit 14cdd22 into master May 20, 2026
8 checks passed
@chrystyan96 chrystyan96 deleted the codex/scan-agent-mcp-surfaces branch May 20, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant