Skip to content
BreakintelligencePublic

About

EEG (Extensive Exposure Guard) is a static and runtime AI security tool for small to mid sized companies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

25 Commits

Folders and files

EEG - Extensive Exposure Guard

EEG - Extensive Exposure Guard

Open-source security scanning for AI agents, MCP integrations, model artifacts, and runtime gateways.

CI PyPI version Python versions GitHub Marketplace Apache 2.0

Quick start • GitHub Action • Coverage • Architecture • Contributing • CLI reference

EEG gives small and growing security teams one Python-based tool for checking AI projects before release and monitoring AI traffic during operation. It can:

  • find insecure agent, prompt, MCP, gateway, dependency, and model-artifact patterns;
  • emit JSON or SARIF for CI and GitHub Code Scanning;
  • apply an optional runtime protection layer in front of an AI HTTP endpoint; and
  • run a local dashboard for investigating projects and findings.

No hosted account is required for the open-source scanner.

If EEG is useful in your workflow, star the repository and watch Releases to receive stable Action and PyPI updates.

Try it

Install from PyPI:

pip install eeg-security

Run a reproducible scan:

eeg scan . --profile code

Write a CI-ready SARIF report:

eeg scan . \
  --profile agent \
  --format sarif \
  --output eeg-results.sarif \
  --fail-on high

The examples in fixtures/ make it easy to verify the behavior:

eeg scan fixtures/vulnerable-agent --profile code --fail-on none
eeg scan fixtures/clean-agent --profile code --fail-on any

GitHub Action

Add EEG to a workflow and upload the report to GitHub Code Scanning:

name: EEG AI Security Scan

on:
  push:
  pull_request:

permissions:
  contents: read
  security-events: write

jobs:
  eeg:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Scan AI security risks
        uses: Breakintelligence/EEG@v2
        with:
          path: .
          profile: agent
          format: sarif
          output: eeg-results.sarif
          fail-on: high

      - name: Upload SARIF
        if: ${{ always() && hashFiles('eeg-results.sarif') != '' }}
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: eeg-results.sarif

v2 is the floating major-version ref for the released Action. For a fully immutable workflow, pin the exact release tag or commit SHA. See RELEASING.md for the release process.

Action inputs

Input Description Default
path Repository path to scan .
profile code, agent, full, model, or dep code
format json or sarif sarif
output Report path eeg-results.sarif
fail-on none, low, medium, high, critical, or any high
version Exact eeg-security version from PyPI; empty uses latest latest
cloud aws, azure, gcp, or any for the full profile empty
extra-args Additional CLI arguments empty

What EEG covers

Surface Examples
Agent and prompt security Unsafe agency, prompt risks, secret handling, agent configuration
MCP and A2A Client configuration, tool-response leakage, protocol surfaces
Gateway security Open-source gateway patterns and runtime policy checks
Code security Secret, configuration, serialization, and repository-level checks
Dependencies AI-focused dependency and CVE lookup paths
Cloud AI configuration AWS Bedrock, Azure OpenAI, and Google Vertex AI checks
Model artifacts Scans of supported model-related files
Runtime protection Optional prompt, jailbreak, toxicity, PII, and tool-abuse models

Choose a scan profile based on the question you are trying to answer:

Profile Focus
code Code, secrets, gateway, and forensic checks
agent Agent, MCP, memory, and gateway surfaces
full Broad static coverage; adds cloud checks when --cloud is supplied
model Model artifacts
dep AI dependency and vulnerability checks

List the current rule profiles:

eeg profiles

Runtime gateway

Place EEG in front of a compatible AI HTTP endpoint:

eeg --gateway-wrap https://api.example.com --host 127.0.0.1 --port 8787
curl http://127.0.0.1:8787/

Point local clients at http://127.0.0.1:8787. Private and loopback upstreams are blocked by default. Set EEG_ALLOW_PRIVATE_UPSTREAM=1 only for a controlled local demonstration, or use --no-private-upstream to make refusal explicit.

The optional ML runtime guard requires the packages in requirements-runtime-ml.txt. Disable it with EEG_RUNTIME_ML=0. See Runtime ML for model and policy configuration.

Runtime trace visibility

EEG runtime traces showing blocked and accepted requests

The Traces view shows each gateway decision alongside the provider, latency, model route, and risk signal. This makes it clear which requests were blocked, which were accepted, and which AI endpoint handled them.

Local dashboard

The PyPI package includes the open-source dashboard:

eeg --serve --host 127.0.0.1 --port 8000

Runtime data is stored under ~/.eeg for installed packages and under the repository root for source checkouts. Override that location with EEG_HOME.

Security controls

EEG Profile and Security Settings page

The dashboard exposes practical controls for real-time monitoring, model scanning, telemetry, and policy enforcement. Teams can save the settings they want the scanner and runtime gateway to apply.

Installation options

pip install eeg-security              # scanner, gateway, and dashboard
pip install "eeg-security[aws]"       # AWS-specific checks
pip install "eeg-security[azure]"     # Azure-specific checks
pip install "eeg-security[gcp]"       # Google Cloud-specific checks
pip install "eeg-security[all]"       # all cloud extras

From source:

git clone https://github.com/Breakintelligence/EEG.git
cd EEG
python -m pip install -e ".[dev]"

Python 3.10 or newer is required. See the CLI reference for every command and flag.

Architecture

The scanner packages are under eeg/scans/, gateway and runtime controls under eeg/gateway/ and eeg/runtime/, and rule definitions under eeg/rules/. The Django dashboard lives in apps/ and core/.

CI exit codes

Code Meaning
0 No finding met the configured --fail-on threshold
1 At least one finding met the threshold
2 Usage, path, or execution error

Scope and limitations

EEG findings should be reviewed in the context of the application. Pattern and dependency checks can produce false positives or miss newly introduced techniques. Cloud scans depend on the enabled credentials, permissions, and provider APIs. Runtime mediation only covers traffic routed through EEG, and source scanning does not prove the absence of vulnerabilities.

For private vulnerability reports, follow SECURITY.md.

Testing

python -m pip install -e ".[dev]"
python -m pytest \
  tests/test_cli.py \
  tests/test_sarif.py \
  tests/test_scan_fixtures.py \
  tests/test_catalog_loader.py

CI also scans the vulnerable benchmark fixture and preserves the generated SARIF as a workflow artifact.

Contributing

Bug reports, false-positive examples, rules, fixtures, documentation, and integration ideas are welcome. Start with CONTRIBUTING.md, then use an issue template or open a pull request.

Please follow the Code of Conduct.

Troubleshooting

  • Not a directory: pass a real project path to scan or --headless.
  • Gateway refuses a local upstream: local access is intentionally gated; use the explicit demo environment variable only in a controlled environment.
  • Django startup errors: upgrade eeg-security, then check that EEG_HOME points to a writable directory.
  • A SARIF report is missing: make sure the EEG step completed far enough to write output; scanner findings can make the step exit non-zero by design.

License

EEG is available under the Apache License 2.0.

About

EEG (Extensive Exposure Guard) is a static and runtime AI security tool for small to mid sized companies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages