EGC is a local-first AI memory and orchestration runtime. It has no network services, no authentication surface, and no multi-user access model. The attack surface is limited to:
- The npm package and its dependencies
- The MCP servers running as local stdio processes
- The GitHub Actions CI/CD pipeline
- Session hooks that process transcript data
| Actor | Trust Level | Description |
|---|---|---|
| Local user | Fully trusted | Runs EGC on their own machine |
| Contributor | Partially trusted | Submits PRs; cannot merge without review |
| Dependency author | Untrusted | Third-party npm packages |
| AI tool (Claude Code, etc.) | Trusted at runtime | Calls MCP tools; runs in same user context |
| GitHub Actions runner | Trusted | Ephemeral sandboxed environment |
| PR author (fork) | Untrusted | Code from forks does not access secrets |
Threat: A malicious or compromised npm package is introduced.
Mitigations:
- All dependencies are locked via
package-lock.json - Dependabot monitors for vulnerability alerts
dependency-review.ymlblocks PRs that introduce high-severity dependencies- CI runs
npm auditon every push
Threat: A malicious AI-generated MCP call attempts to execute arbitrary shell commands.
Mitigations:
egc-guardianvalidates all tool calls before execution viavalidate_command- Shell commands are constructed from whitelisted patterns, not raw string interpolation
- The guardian returns a block decision before any dangerous command runs
Threat: Sensitive values (API keys, session tokens) appear in session transcript files.
Mitigations:
- Session hook sanitizes transcript content before writing to disk
- Environment variable names (
GEMINI_TRANSCRIPT_PATH,EGC_SESSION_ID) are replaced with placeholders in log output - State files at
~/.egc/state/contain only structured metadata, not raw transcripts
Threat: A malicious PR triggers a workflow that accesses secrets or modifies the release.
Mitigations:
pull_requestevents from forks do not have access to repository secretspull_request_targetis not used in any workflow (avoids the common privilege escalation pattern)- Workflows use minimal permissions (
permissions: contents: readby default) - Release workflow only triggers on version tags pushed by the maintainer
- All third-party actions are pinned to specific commit SHAs
Threat: Branch names, commit messages, or PR metadata are interpolated unsafely in shell commands.
Mitigations:
- All GitHub context variables that are used in
run:steps are passed throughenv:and not directly interpolated in shell strings - The release workflow validates the tag format with a regex before using it
workflow_dispatchdoes not accept external user inputs
| Path | Risk | Protection |
|---|---|---|
scripts/egc-guardian/src/validate_command.ts |
High: gates all shell execution | Reviewed on every change; blocked by branch protection |
install.sh / install.ps1 |
Medium: modifies global AI tool configs | Verified in CI across Linux, macOS, Windows |
scripts/hooks/session-end.js |
Medium: reads transcript, writes to disk | Bounded stdin (1MB cap); structured error handling |
mcp/servers/egc-memory/ |
Low: reads/writes state files only | No shell execution; pure file I/O |
EGC is a developer tool that runs with full local-user permissions by design. A compromised host machine, compromised AI tool, or compromised npm package could affect EGC. These risks are outside EGC's control and mitigated by the host environment.
2026-06-04: Felipe Marzochi