convez.ai
MCP ServerSegurançaAvançado
contexa-security

CONTEXA - Plano de Controle de Runtime Nativo em IA

contexa-security/contexa

Zero-trust runtime control para Spring Boot com decisões IA-nativas

Ver no GitHub
BomPluginScore · de 0 a 100

Plataforma zero-trust de código aberto que avalia comportamento autenticado em tempo de execução para aplicações Spring Boot. Implementa controle dinâmico pós-autenticação com 5 ações (ALLOW, CHALLENGE, BLOCK, ESCALATE, PENDING), reduzindo janelas de exploit e aplicando compensating controls em produção.

Instalação

$npx convez-ai contexa-security/contexa

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
0
Acompanhando
0
Saúde
87%
Último commit
há 1 dia
Versão
v0.1.1
Issues abertas
0
Contribuidores
1

Casos de uso

  • Aplicar políticas zero-trust pós-autenticação em aplicações Spring Boot
  • Reduzir janelas de exploit enquanto remedições estão em andamento
  • Controlar acesso de usuários autenticados, workloads e agentes delegados
  • Gerar provas e benchmarks de segurança verificáveis para compliance

Veredito

CONTEXA preenche um gap crítico entre autenticação e execução, trazendo decisões zero-trust para dentro do runtime da aplicação. Solução madura e bem arquitetada para organizações que precisam de controle granular e verificável pós-login.

README

A tradução para o português deste README ainda está na fila.

Security does not end at login. CONTEXA continuously evaluates authenticated runtime behavior and applies zero-trust controls inside the application.


What CONTEXA Is

CONTEXA is an open-source AI-native Post-Authentication Runtime Control Plane.

It is built for what happens after authentication succeeds:

  • request-time runtime zero trust
  • authenticated human access decisions
  • workload and service-client continuity
  • delegated agent execution governance
  • exploit-window compensating controls
  • verification-backed benchmark and proof generation

What CONTEXA Is Not

CONTEXA is not:

  • a vulnerability scanner
  • a binary analysis engine
  • a penetration testing framework
  • a SIEM replacement
  • a generic IAM admin SaaS product

CONTEXA complements upstream security discovery by constraining authenticated runtime behavior after risk is discovered.

Why CONTEXA

Most material security failures occur after successful authentication.

At that point, the attacker may already hold one or more of the following:

  • a valid session
  • a valid token
  • a valid workload credential
  • an approved tool path
  • an authenticated delegated agent

Traditional security often concentrates on login, network edges, and endpoint state. CONTEXA starts where those layers leave off: inside the application runtime, at request time, with zero-trust decisions that can challenge, block, contain, or escalate.

DimensionTraditional SecurityWith CONTEXA
Decision pointLogin or coarse policy checkpointsEvery protected request
ScopeNetwork, endpoint, perimeterInside the application runtime
SubjectMostly users and devicesHumans, workloads, service clients, delegated agents
ResponseAllow or denyALLOW, CHALLENGE, BLOCK, ESCALATE, PENDING_ANALYSIS
ProofLogs and dashboardsVerification, benchmark, publication-ready proof

Glasswing Relevance

Glasswing discovers. CONTEXA constrains.

Anthropic Project Glasswing represents upstream AI-driven defensive discovery. CONTEXA addresses the downstream runtime problem that remains after discovery:

  • how to reduce exploit windows before remediation is complete
  • how to constrain authenticated humans, workloads, and delegated agents
  • how to apply compensating controls in production
  • how to prove those controls with verification and benchmark artifacts

This repository contains the open-source runtime control engine for that downstream layer.

Project Status

  • Current public OSS version: 0.1.0
  • Repository stage: initial public open-source release
  • Core focus: post-authentication runtime control inside Spring Boot 3.x applications (Spring Boot 4.x is NOT supported)

CONTEXA should be reviewed as early-stage security infrastructure with material category relevance. Its public scale is still developing, but the category it addresses is already operationally important: constraining authenticated runtime behavior after risk is discovered and before remediation is complete.

Why Review CONTEXA at an Early OSS Stage

CONTEXA does not yet claim mature open-source scale. It should instead be assessed on structural security relevance:

  • it addresses the post-authentication runtime problem that remains after upstream discovery
  • it operates at the application layer, where authenticated requests are actually executed
  • it provides public documentation, benchmark surfaces, and a security contact path
  • it is built as an open-source runtime control engine rather than a marketing-only concept
  • it is relevant to downstream exploit-window reduction for authenticated humans, workloads, service clients, and delegated agents

Runtime Decision Path

flowchart LR
    A[Authenticated Request\nPost-auth subject request] --> B[contexa-identity\nAuth flows, MFA, adaptive challenge]
    B --> C[contexa-iam\nPolicy, resource protection, method protection]
    C --> D[contexa-core\nContext, analysis, RAG, LLM adjudication]
    D --> E{Runtime Decision\nRequest-time control decision}
    E --> F[ALLOW\nPermit request]
    E --> G[CHALLENGE\nRequire extra verification]
    E --> H[BLOCK\nDeny immediately]
    E --> I[ESCALATE\nStronger control or review]
    E --> J[PENDING_ANALYSIS\nWait for analysis]

Open-source Core and Enterprise Surfaces

This repository contains the open-source core platform:

  • contexa-core
  • contexa-identity
  • contexa-iam
  • contexa-common
  • contexa-autoconfigure
  • spring-boot-starter-contexa

Commercial and enterprise operational surfaces exist separately. Those surfaces include multi-tenant operations, publication workflows, advanced review planes, and commercial runtime delivery features.

The open-source core remains a meaningful platform on its own. It provides the runtime decision, control, and integration foundation.

Current Public Release

Quick Start

[!WARNING] Spring Boot 4.x is NOT supported. Contexa requires Spring Boot 3.x and will block startup immediately with an IllegalStateException in Spring Boot 4.x when @EnableAISecurity is enabled.

1. Add the dependency

dependencies {
    implementation "ai.ctxa:spring-boot-starter-contexa:0.1.0"
}

2. Enable AI security

@SpringBootApplication
@EnableAISecurity
public class MyApplication {
}

3. Protect resources

@Protectable
@PostMapping("/api/users/{id}/disable")
public void disableUser(@PathVariable Long id) {
    service.disable(id);
}

4. Start infrastructure

docker compose up -d postgres ollama
docker exec contexa-ollama ollama pull qwen2.5:7b
docker exec contexa-ollama ollama pull mxbai-embed-large

5. Run

./gradlew bootRun

For full setup, configuration, and architecture guidance, use the documentation site at https://docs.ctxa.ai.

Recommended Examples

To help you get started quickly and understand Contexa's core capabilities, we provide 18+ examples in the contexa-examples repository. We recommend exploring the following 4 core scenarios first:

  1. Quickstart Example:
    • Learn the basics of wiring dependencies, setting up basic properties, and running Contexa in Shadow Mode.
  2. AI Pipeline Example:
    • Deep dive into the Security Decision Prompt Pipeline and see how RAG and LLM models make real-time access decisions.
  3. Identity & MFA Example:
    • Learn how to integrate modern Passkeys, OTP, and adaptive Step-up Authentication inside Spring Security.
  4. Legacy System Integration:
    • See how to incrementally inject the Contexa security layer using the Contexa Bridge without disrupting your legacy database or sessions.

For a detailed walkthrough, setup guides, and analysis of these examples, please refer to the official Examples Guide.

Runtime Zero Trust Actions

Every protected request receives a runtime decision.

ActionHTTPMeaning
ALLOW200Behavior is within acceptable bounds
CHALLENGE401Additional verification is required
BLOCK403Active risk requires immediate denial
ESCALATE423Human review or higher-friction handling is required
PENDING_ANALYSIS503Runtime analysis has not completed yet

How It Works

Request (Human / Workload / Service Client / Delegated Agent)
  |
  +-- contexa-identity
  |     Authentication flows, MFA, adaptive challenges
  |
  +-- contexa-iam
  |     URL, method, and resource policy evaluation
  |     @Protectable method protection
  |
  +-- contexa-core
        Context collection
        Behavioral analysis
        RAG and LLM reasoning
        Runtime zero-trust decision
        Control action application

Modules

ModuleResponsibility
contexa-coreAI pipeline, LLM orchestration, RAG, autonomous security processing, runtime zero-trust state
contexa-identityAuthentication flows, MFA, passkey, adaptive zero-trust access control
contexa-iamDynamic authorization, policy evaluation, resource scanning, policy workflows
contexa-commonShared annotations, DTOs, enums, contracts
contexa-autoconfigureSpring Boot auto-configuration
spring-boot-starter-contexaStarter entry point for community adoption

Key Capabilities

Runtime Behavioral Security

CONTEXA compares each request against runtime context, history, and policy signals to detect behavior that static rules miss.

Dynamic Authorization

CONTEXA evaluates URL, method, and resource-level access decisions and supports method-level protection through @Protectable.

AI-native Control Decisions

CONTEXA can challenge, block, escalate, or defer based on runtime analysis instead of relying only on static roles and ACLs.

Proof-backed Security

CONTEXA is designed to support verification, replay, benchmarking, and publication-ready reporting rather than simple vendor claims.

Operating Modes

ModeInfrastructureUse Case
standalonePostgreSQL + OllamaDevelopment and smaller deployments
distributedPostgreSQL + Redis + KafkaProduction and multi-instance deployments
contexa:
  infrastructure:
    mode: standalone

Trust and Public References

License

Apache License 2.0. See LICENSE for details.

Ver o original no GitHub

Bom para

Relacionados