Skip to content

security: redact kernel-capture daemon, MCP gateway, OPA backend, content safety#27

Merged
gnanirahulnutakki merged 9 commits into
devfrom
security-redaction-apply-20260602
Jun 3, 2026
Merged

security: redact kernel-capture daemon, MCP gateway, OPA backend, content safety#27
gnanirahulnutakki merged 9 commits into
devfrom
security-redaction-apply-20260602

Conversation

@gnanirahulnutakki
Copy link
Copy Markdown
Contributor

Summary

Security redaction pass removing provider-specific runtime modules, hardcoded version pins, and internal fixture helpers.

Removed (32 files)

  • Kernel capture daemon — go/pkg/kernelcapture/* (protocol handler, session registry, tests)
  • MCP gateway — python/vibap/mcp_gateway.py (stdio proxy with policy enforcement)
  • OPA backend — python/vibap/backends/opa.py (stateless OPA evaluator)
  • Content safety scanner — python/vibap/content_safety.py (PII/credential detection)
  • Adversarial scoreboard — scripts/{generate_adversarial_scoreboard,run_continuous_adversarial_harness}.py
  • Internal helpers — _fixture_core.py, _hashing.py (merged into stdlib hashlib/datetime)
  • Documentation — content-safety, kernel-capture, mcp-gateway, opa-backend, nist-ai-rmf-mapping (docs + Hugo site)
  • .gitleaksignore — no longer needed after redaction

Retained (cleaned up)

  • claude_code_hook.py — rewired to stdlib hashlib/datetime, removed AskUserQuestion context, subagent telemetry
  • gemini_cli_hook.py — removed hardcoded v0.44.1 pin, BeforeTool contract, MCP context, reduced mapped tools
  • proxy.py — removed kernel capture client, session registration
  • cli.py — removed mcp-gateway subcommand

Verification

  • 0 straggler imports (no _fixture_core, _hashing, kernel_capture, mcp_gateway, backends.opa references)
  • Claude/Gemini hooks compile cleanly with stdlib-only dependencies
  • check-local.sh passes except known knowledge-graph script (never in repo)

Note

This replaces the stale local dev branch which was diverged from origin/dev. This branch is a clean application on top of current origin/dev (ac36d56).

…tent safety, hardcoded provider versions

Remove kernel-capture daemon (Go), MCP gateway, OPA backend, content-safety
scanner, adversarial scoreboard scripts, and internal fixture/hashing helpers.
Strip hardcoded version pins, provider-specific hook contracts, MCP context
collection, and internal telemetry from Claude/Gemini hook modules. Remove
related documentation, Hugo site content, and site source pages.

Deleted files (32):
- go/pkg/kernelcapture/{daemon_protocol_handler,daemon_session_registry}*.go
- go/pkg/util/guard.go
- python/vibap/{_fixture_core,_hashing,content_safety,kernel_capture_client,mcp_gateway}.py
- python/vibap/backends/opa.py
- python/tests/test_{content_safety,kernel_capture,mcp_gateway,opa_backend}.py
- python/tests/test_claude_code_telemetry.py
- scripts/{generate_adversarial_scoreboard,run_continuous_adversarial_harness}.py
- docs/compliance/{README,nist-ai-rmf-mapping}.md
- docs/guides/{content-safety,kernel-capture,mcp-gateway}.md
- docs/reference/opa-backend.md
- site/content/source/docs/{compliance,guides,reference}/*.md
- site/content/source/reports/_index.md
- .gitleaksignore

Heavily modified: claude_code_hook.py, gemini_cli_hook.py, proxy.py, cli.py
- Remove kernel_capture_client import, session registration, and metrics
- Replace _fixture_core imports with stdlib hashlib/datetime
- Strip AskUserQuestion context collection, subagent telemetry
- Remove mcp-gateway CLI subcommand
- Drop hardcoded Gemini CLI version pin (0.44.1) and BeforeTool contract
- Simplify hook output shape to common-denominator {status,block,message}
- Reduce mapped tool set to core tools
- Gracefully skip knowledge-graph script when not present (not yet implemented)
- Exclude test fixtures from model-name scan (adversarial suite, e2e, examples)
- Exclude test-results/ and .pytest_cache/ from scans
- Redact hardcoded Ollama API key from test_e2e_showcase.py
- Remove stale adversarial test-results directory (model names in generated output)
… CHANGELOG

- .pre-commit-config.yaml: trailing-whitespace, end-of-file-fixer, YAML/JSON/TOML
  checks, private-key detection, ruff linting + formatting for Python, gitleaks
- .dockerignore: exclude venv, build artifacts, agent state, test results
- docs/conductor-bootstrap.md: fix missing reference from conductor-bootstrap.sh
- CHANGELOG.md: track v0.1.0 release and unreleased security/feature changes
- test_proxy.py: 12 tests covering session lifecycle, passport verification,
  kill-switch activation/deactivation, check_and_record with permit/deny
  and tool-call exhaustion. All pass against real GovernanceProxy.
- .golangci.yml: golangci-lint v2 config with errcheck, staticcheck,
  gofmt, goimports, govet, unused linters.
- .github/workflows/tests.yml: bump go-version 1.25.9 → 1.26.0 to match go.mod
- site/data/claims.json: fix 3 broken source_path references (go/pkg/governance → go/pkg/policy, PHASE2_EBPF_MVP → LINEAGE_BUDGET)
- .gitleaksignore: restore from origin/dev (needed for historical false positive suppression)
@gnanirahulnutakki gnanirahulnutakki merged commit 61884c3 into dev Jun 3, 2026
23 checks passed
@gnanirahulnutakki gnanirahulnutakki deleted the security-redaction-apply-20260602 branch June 3, 2026 01:30
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