Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .agents/skills/echo-guard/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Use when wiring guard-core-go security into a Go Echo service, or w

# echo-guard

Echo middleware adapter for [guard-core-go](https://github.com/rennf93/guard-core-go). Translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses (status, headers, body, then stop the chain). Contains no security logic itself. Module: `github.com/rennf93/echo-guard`, Go `1.25.0`, released at `v1.1.0`.
Echo middleware adapter for [guard-core-go](https://github.com/Guard-Core/guard-core-go). Translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses (status, headers, body, then stop the chain). Contains no security logic itself. Module: `github.com/rennf93/echo-guard`, Go `1.25.0`, released at `v1.1.0`.

## Quick Reference

Expand Down Expand Up @@ -111,6 +111,6 @@ func WithRouteID(ctx context.Context, routeID string) context.Context

## Related Projects

- [guard-core-go](https://github.com/rennf93/guard-core-go): the engine this adapter wraps. All detection, rate limiting, bans, configuration, and Redis integration live there; import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/rennf93/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/rennf93/gin-guard): the sibling Gin adapter with the same surface and behavior contract.
- [guard-core-go](https://github.com/Guard-Core/guard-core-go): the engine this adapter wraps. All detection, rate limiting, bans, configuration, and Redis integration live there; import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/Guard-Core/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/Guard-Core/gin-guard): the sibling Gin adapter with the same surface and behavior contract.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @rennf93
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: rennf93
github: Guard-Core
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: Echo Guard Documentation
url: https://rennf93.github.io/echo-guard/
url: https://guard-core.github.io/echo-guard/
about: Check the documentation for usage information and tutorials
- name: Usage Questions
url: https://github.com/rennf93/echo-guard/discussions
url: https://github.com/Guard-Core/echo-guard/discussions
about: Please ask and answer questions in GitHub Discussions
- name: Discord
url: https://discord.gg/ZW7ZJbjMkK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: Tag and push to GHCR
run: |
IMAGE="ghcr.io/${{ github.repository_owner }}/echo-guard-example"
IMAGE="ghcr.io/guard-core/echo-guard-example"
docker tag echo-guard-advanced-app:local "${IMAGE}:latest"
docker push "${IMAGE}:latest"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- Redis configuration if relevant (the engine uses Redis for distributed bans, rate limiting, and cloud IP ranges)

A few pointers:
- Scan [README.md](../blob/master/README.md) for usage guidance, and [guard-core-go](https://github.com/rennf93/guard-core-go) for engine behavior and configuration.
- Scan [README.md](../blob/master/README.md) for usage guidance, and [guard-core-go](https://github.com/Guard-Core/guard-core-go) for engine behavior and configuration.
- **Security vulnerability?** Do **not** open a public issue - please use GitHub's private vulnerability reporting.

Thanks again - a maintainer will be with you soon.
Expand All @@ -40,7 +40,7 @@ jobs:
- [ ] `go build ./...` compiles the adapter and the example apps
- [ ] `govulncheck ./...` is clean
- [ ] No `nolint` / unchecked-error shortcuts; pre-existing violations in touched files are fixed
- [ ] If you changed adapter behavior, it stays aligned with [gin-guard](https://github.com/rennf93/gin-guard) and [nethttp-guard](https://github.com/rennf93/nethttp-guard) and the README reflects it
- [ ] If you changed adapter behavior, it stays aligned with [gin-guard](https://github.com/Guard-Core/gin-guard) and [nethttp-guard](https://github.com/Guard-Core/nethttp-guard) and the README reflects it

See [README.md](../blob/master/README.md) for the adapter contract and [AGENTS.md](../blob/master/AGENTS.md) for the boundary rules.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Checkout guard-core-go@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: rennf93/guard-core-go
repository: Guard-Core/guard-core-go
ref: master
path: guard-core-go-upstream

Expand Down
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Guidance for AI agents (including Claude Code) working in this repository.

## Project Overview

echo-guard is an Echo middleware adapter for [guard-core-go](https://github.com/rennf93/guard-core-go). It translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses. It contains NO security logic of its own.
echo-guard is an Echo middleware adapter for [guard-core-go](https://github.com/Guard-Core/guard-core-go). It translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses. It contains NO security logic of its own.

- Module: `github.com/rennf93/echo-guard`, Go directive `go 1.25.0`, MIT license.
- Single Go package `echo` at the repo root. Source files: `middleware.go`, `request.go`. Tests: `middleware_test.go`, `integration_test.go`. There are no subpackage directories.
Expand Down Expand Up @@ -32,7 +32,7 @@ This repo is the ADAPTER layer of the guard-core ecosystem:
## Quick Start

```sh
git clone https://github.com/rennf93/echo-guard
git clone https://github.com/Guard-Core/echo-guard
cd echo-guard
go build ./...
go test ./...
Expand Down Expand Up @@ -164,6 +164,6 @@ CI runs the test job on a Go matrix of `1.25.x` and `1.26.x` (fail-fast disabled

## Related Projects

- [guard-core-go](https://github.com/rennf93/guard-core-go): the engine this adapter wraps. All security logic, configuration, verdicts, and Redis integration live there. Import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/rennf93/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/rennf93/gin-guard): the sibling Gin adapter with the same surface and behavior contract; keep the adapters behaviorally aligned.
- [guard-core-go](https://github.com/Guard-Core/guard-core-go): the engine this adapter wraps. All security logic, configuration, verdicts, and Redis integration live there. Import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/Guard-Core/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/Guard-Core/gin-guard): the sibling Gin adapter with the same surface and behavior contract; keep the adapters behaviorally aligned.
10 changes: 5 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Guidance for AI agents (including Claude Code) working in this repository.

## Project Overview

echo-guard is an Echo middleware adapter for [guard-core-go](https://github.com/rennf93/guard-core-go). It translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses. It contains NO security logic of its own.
echo-guard is an Echo middleware adapter for [guard-core-go](https://github.com/Guard-Core/guard-core-go). It translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses. It contains NO security logic of its own.

- Module: `github.com/rennf93/echo-guard`, Go directive `go 1.25.0`, MIT license.
- Single Go package `echo` at the repo root. Source files: `middleware.go`, `request.go`. Tests: `middleware_test.go`, `integration_test.go`. There are no subpackage directories.
Expand Down Expand Up @@ -32,7 +32,7 @@ This repo is the ADAPTER layer of the guard-core ecosystem:
## Quick Start

```sh
git clone https://github.com/rennf93/echo-guard
git clone https://github.com/Guard-Core/echo-guard
cd echo-guard
go build ./...
go test ./...
Expand Down Expand Up @@ -145,6 +145,6 @@ CI runs the test job on a Go matrix of `1.25.x` and `1.26.x` (fail-fast disabled

## Related Projects

- [guard-core-go](https://github.com/rennf93/guard-core-go): the engine this adapter wraps. All security logic, configuration, verdicts, and Redis integration live there. Import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/rennf93/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/rennf93/gin-guard): the sibling Gin adapter with the same surface and behavior contract; keep the adapters behaviorally aligned.
- [guard-core-go](https://github.com/Guard-Core/guard-core-go): the engine this adapter wraps. All security logic, configuration, verdicts, and Redis integration live there. Import it as `guardcore "github.com/rennf93/guard-core-go/v4/guardcore"`.
- [nethttp-guard](https://github.com/Guard-Core/nethttp-guard): the sibling net/http adapter with the same surface and behavior contract.
- [gin-guard](https://github.com/Guard-Core/gin-guard): the sibling Gin adapter with the same surface and behavior contract; keep the adapters behaviorally aligned.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
@rennf93.
contact@guard-core.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# echo-guard

Echo middleware adapter for [guard-core-go](https://github.com/rennf93/guard-core-go). Translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses (status, headers, body, then stop the chain). Works with any `echo.Echo` or `echo.Group` chain via `e.Use`.
Echo middleware adapter for [guard-core-go](https://github.com/Guard-Core/guard-core-go). Translates `echo.Context` into the guardcore request surface, runs the engine, and translates verdicts to exact Echo responses (status, headers, body, then stop the chain). Works with any `echo.Echo` or `echo.Group` chain via `e.Use`.

Docs: <https://rennf93.github.io/echo-guard/>
Docs: <https://guard-core.github.io/echo-guard/>

## Install

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ We take the security of Echo Guard seriously. If you believe you've found a secu

1. **Do not disclose the vulnerability publicly** until it has been addressed by the maintainers.
2. **Report the vulnerability through GitHub's security advisory feature**:
- Go to the [Security tab](https://github.com/rennf93/echo-guard/security/advisories) of the Echo Guard repository
- Go to the [Security tab](https://github.com/Guard-Core/echo-guard/security/advisories) of the Echo Guard repository
- Click on "New draft security advisory"
- Fill in the details of the vulnerability
- Submit the advisory

Alternatively, you can report vulnerabilities through [GitHub's private vulnerability reporting feature](https://github.com/rennf93/echo-guard/security/advisories/new).
Alternatively, you can report vulnerabilities through [GitHub's private vulnerability reporting feature](https://github.com/Guard-Core/echo-guard/security/advisories/new).

3. Include the following information in your report:
- A description of the vulnerability and its potential impact
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The adapter has exactly two options (`WithMaxBodyBytes`, `WithLogger`); all
security tuning is engine configuration. See the
[guard-core-go configuration reference](https://rennf93.github.io/guard-core-go/configuration/)
[guard-core-go configuration reference](https://guard-core.github.io/guard-core-go/configuration/)
for the full `SecurityConfig` surface.

## Minimal tuned setup
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# echo-guard

`echo-guard` is the official Echo adapter for
[guard-core-go](https://github.com/rennf93/guard-core-go), the Go port of the
[guard-core-go](https://github.com/Guard-Core/guard-core-go), the Go port of the
guard-core security engine. It wraps any `echo.Echo` or `echo.Group` with the
full engine pipeline: penetration detection, rate limiting, IP banning, and
verdict responses.
Expand Down Expand Up @@ -76,5 +76,5 @@ func main() {
- Fail-closed: engine panics become `500` with a fixed, non-leaky message

See [Configuration](configuration.md) for engine tuning and the
[examples](https://github.com/rennf93/echo-guard/tree/master/examples) for
[examples](https://github.com/Guard-Core/echo-guard/tree/master/examples) for
runnable apps.
6 changes: 3 additions & 3 deletions examples/advanced_app/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# echo-guard advanced example

A production-style Echo service guarded by the
[echo-guard](https://github.com/rennf93/echo-guard) adapter over the
[guard-core-go](https://github.com/rennf93/guard-core-go) engine: multi-stage
[echo-guard](https://github.com/Guard-Core/echo-guard) adapter over the
[guard-core-go](https://github.com/Guard-Core/guard-core-go) engine: multi-stage
Docker build, non-root runtime, Redis for shared bans and rate limits, the
engine's route registry for per-route config, echo route groups, and admin
routes that drive the ban manager.
Expand Down Expand Up @@ -109,7 +109,7 @@ curl -s -X POST http://localhost:8080/admin/unban -H 'X-Admin-Token: admin-token
`/admin/*`)
- Cloud provider blocking (`BlockCloudProviders`, off by default)
- `OnBlock` hook: the telemetry seam for
[guard-agent-go](https://github.com/rennf93/guard-agent-go) wiring
[guard-agent-go](https://github.com/Guard-Core/guard-agent-go) wiring
(comment-level guidance in `internal/config/config.go`; `EnableAgent` is
fail-closed in this port, so the hook is the integration point)

Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_app/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func New() (*guardcore.SecurityConfig, error) {

// Agent wiring (comment-level): guard-core-go's only telemetry seam
// is OnBlock. The Go agent (guard-agent-go,
// https://github.com/rennf93/guard-agent-go) mirrors the Python
// https://github.com/Guard-Core/guard-agent-go) mirrors the Python
// guard-agent's API: once its engine-event pipeline accepts these
// payloads, replace the log line below with the agent client call
// and set AGENT_ENDPOINT/AGENT_PROJECT_ID here. EnableAgent stays
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_app/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# echo-guard simple app

A minimal guarded Echo server in a single `main.go`, wired to the
[guard-core-go](https://github.com/rennf93/guard-core-go) engine through the
[echo-guard](https://github.com/rennf93/echo-guard) adapter middleware. It
[guard-core-go](https://github.com/Guard-Core/guard-core-go) engine through the
[echo-guard](https://github.com/Guard-Core/echo-guard) adapter middleware. It
shows the canonical wiring and what the adapter does for you: request
translation, bounded body scanning with body replay, exact verdict
translation (status, headers, body, then the chain stops), and fail-closed
Expand Down Expand Up @@ -78,7 +78,7 @@ Inline comments in `main.go` walk through every knob used:
- Redis via `REDIS_URL` / `REDIS_PREFIX` (compose wires Redis in; without it
the managers fall back to in-process state)
- The `OnBlock` hook: the telemetry seam for wiring
[guard-agent-go](https://github.com/rennf93/guard-agent-go) (comment-level
[guard-agent-go](https://github.com/Guard-Core/guard-agent-go) (comment-level
guidance in `main.go`; agent integration is not implemented in the engine
port yet, and `EnableAgent` fails config validation)

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func main() {
// integration is not implemented in guard-core-go yet (setting
// EnableAgent fails config validation), so wire the agent from
// here: forward these payloads to guard-agent-go
// (https://github.com/rennf93/guard-agent-go) once its event
// (https://github.com/Guard-Core/guard-agent-go) once its event
// pipeline accepts engine events. The payload carries check_name,
// reason, trigger_info, passive_mode, client_ip, path, method, and
// status_code.
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
site_name: echo-guard
site_description: guard-core-go security middleware for Echo
site_author: Renn F
repo_url: https://github.com/rennf93/echo-guard
repo_name: rennf93/echo-guard
repo_url: https://github.com/Guard-Core/echo-guard
repo_name: Guard-Core/echo-guard

theme:
name: material
Expand Down
Loading