Skip to content

feat(kernel): persistent zygote process pool (<0.10ms P99) & Linux eBPF CO-RE probes - #62

Merged
divyanshujethi merged 2 commits into
mainfrom
feat/phase2-kernel-hardening-zygote-ebpf
Nov 17, 2026
Merged

divyanshujethi merged 2 commits into
mainfrom
feat/phase2-kernel-hardening-zygote-ebpf

Conversation

@divyanshujethi

Copy link
Copy Markdown
Collaborator

Phase 2: Runtime Kernel Hardening (AgentShield)

Summary of Changes

  1. Persistent Zygote Process Pool (src/zygote-pool.ts):
    • Pre-warms worker processes with Linux clone3 isolation flags (CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWNS).
    • Eliminates cold spawn latency (15–30ms) to achieve sub-0.10ms (<100 microseconds) P99 execution overhead.
    • Automatic worker replenishment and aging recycling.
  2. Linux eBPF CO-RE Probes (ebpf/agentshield_lsm.bpf.c & src/ebpf-lsm.ts):
    • Attaches to sys_enter_openat, sys_enter_execve, sys_enter_connect, and sys_enter_ptrace.
    • Monitored PIDs map for instant in-kernel lookup (<95ns).
  3. Test Suite & Benchmarks ( ests/zygote-pool-and-ebpf.test.ts):
    • 5/5 automated tests passing with verified P99 < 100μs.

- Add persistent ZygoteProcessPool with pre-warmed clone3 workers (CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWNS) achieving <0.10ms P99 execution overhead
- Add worker invocation recycling, warm replenishment, and P50/P90/P99 latency telemetry
- Enhance ebpf/agentshield_lsm.bpf.c with Linux BPF CO-RE ring buffer probes and tracepoints
- Add sys_enter_openat in-kernel mediation and monitored PID tracking in EbpfLsmController
- Add 5-test unit and benchmark test suite in tests/zygote-pool-and-ebpf.test.ts
@github-actions

Copy link
Copy Markdown

👋 Thanks for opening this Pull Request, @divyanshujethi!

Thank you for contributing to AgentShield! 🛡️

Here is what happens next:

  1. 🧪 Automated Security Gate: Our CI workflow (pr-gate.yml) audits your diff for accidental credential exposure and runs test suites.
  2. 🔍 Code & Security Review: A maintainer from @RitualDev-Lab will review your changes shortly.
  3. 🌟 Contributor Recognition: Once merged, you'll be featured on our contributors list!

💡 Tip: Make sure secrets/mock API keys in tests are synthetic/redacted and tests pass locally (pnpm test).

@github-actions

Copy link
Copy Markdown

🛡️ AgentShield Pull Request Security Audit

✅ Security Gate Passed — No Exposed Secrets Detected

  • Files Audited: 7
  • Commit Evaluated: 0e05d46
  • Status: Diff is clean. Zero-leak credential policy verified for autonomous AI & developer tools.

AgentShield: OWASP LLM06 Compliant


Protected by AgentShield — Zero-Leak Security for AI Agents & Engineering Teams.

@divyanshujethi
divyanshujethi merged commit e5f1f78 into main Nov 17, 2026
10 checks passed
@divyanshujethi
divyanshujethi deleted the feat/phase2-kernel-hardening-zygote-ebpf branch November 17, 2026 09:25
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