Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c6d4cad
chore: update GOLANG_IMAGE digest for security compliance
Wikid82 Nov 16, 2026
92ea163
chore: update @typescript-eslint packages to version 8.73.0
Wikid82 Nov 16, 2026
1ac94e8
chore: update @typescript/native to version 7.1.0-dev.20261116.1
Wikid82 Nov 16, 2026
6beba27
chore: update github.com/Wikid82/Hermes to version 0.3.9
Wikid82 Nov 16, 2026
6fba273
chore: update react-i18next to version 18.0.2
Wikid82 Nov 16, 2026
aa98b0c
chore(docker): refresh bundled proxy toolchain image
Wikid82 Nov 16, 2026
cdb237a
chore(docker): refresh bundled proxy toolchain image (#1993)
Wikid82 Nov 16, 2026
7572ac1
chore: propagate changes from main into development (#1992)
Wikid82 Nov 16, 2026
647bd38
chore: update dependency anchore/grype to v0.122.0
renovate[bot] Nov 16, 2026
015bcef
chore: update dependency anchore/grype to v0.122.0 (#1997)
Wikid82 Nov 17, 2026
2d3aa40
chore: update dependency anchore/syft to v1.57.2
renovate[bot] Nov 17, 2026
91d3743
chore: update dependency anchore/syft to v1.57.2 (#1996)
Wikid82 Nov 17, 2026
e0f954d
chore: update CADDY_SECURITY_VERSION to 1.7.0
Wikid82 Nov 17, 2026
f5dce88
fix: accept 0.0.0.0 as a forward target on ports Charon does not use
Wikid82 Nov 17, 2026
d4b1023
chore(docker): refresh bundled proxy toolchain image
Wikid82 Nov 17, 2026
615beb4
chore(docker): refresh bundled proxy toolchain image (#2001)
Wikid82 Nov 17, 2026
0a982f4
fix: accept 0.0.0.0 as a forward target on ports Charon does not use …
Wikid82 Nov 17, 2026
436d087
chore(docker): refresh bundled proxy toolchain image
Wikid82 Nov 17, 2026
6e32880
chore(docker): refresh bundled proxy toolchain image (#2002)
Wikid82 Nov 17, 2026
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
6 changes: 3 additions & 3 deletions .github/skills/security-scan-docker-image-scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi
# Check Grype
if ! command -v grype >/dev/null 2>&1; then
log_error "Grype not found - install from: https://github.com/anchore/grype"
log_error "Installation: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin v0.121.3"
log_error "Installation: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin v0.122.0"
error_exit "Grype is required for vulnerability scanning" 2
fi

Expand All @@ -50,8 +50,8 @@ SYFT_INSTALLED_VERSION=$(syft version | grep -oP 'Version:\s*\Kv?[0-9]+\.[0-9]+\
GRYPE_INSTALLED_VERSION=$(grype version | grep -oP 'Version:\s*\Kv?[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")

# Set defaults matching CI workflow
set_default_env "SYFT_VERSION" "v1.57.1"
set_default_env "GRYPE_VERSION" "v0.121.3"
set_default_env "SYFT_VERSION" "v1.57.2"
set_default_env "GRYPE_VERSION" "v0.122.0"
set_default_env "IMAGE_TAG" "charon:local"
set_default_env "FAIL_ON_SEVERITY" "Critical,High"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ permissions:
contents: read

env:
SYFT_VERSION: 'v1.57.1'
SYFT_VERSION: 'v1.57.2'
GHCR_REGISTRY: ghcr.io
DOCKERHUB_REGISTRY: docker.io
IMAGE_NAME: wikid82/charon
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
env:
NODE_VERSION: '26.13.1'
GOTOOLCHAIN: auto
SYFT_VERSION: 'v1.57.1'
SYFT_VERSION: 'v1.57.2'
GHCR_REGISTRY: ghcr.io
DOCKERHUB_REGISTRY: docker.io
IMAGE_NAME: wikid82/charon
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supply-chain-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:
cancel-in-progress: true

env:
SYFT_VERSION: 'v1.57.1'
SYFT_VERSION: 'v1.57.2'

# The scan job runs on PR code with read scopes only. Comment and SARIF writes live in
# the publish-results job, which consumes the scan artifact and never checks out PR code.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supply-chain-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- prereleased

env:
SYFT_VERSION: 'v1.57.1'
SYFT_VERSION: 'v1.57.2'

permissions:
contents: read
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ ARG CHARON_TOOLCHAIN_IMAGE=ghcr.io/wikid82/charon-toolchain
# NOT Renovate-tracked (a content-hash tag has no series to follow, N7) β€” the
# toolchain-image.yml bot owns these two lines. DIGEST is the arch-independent
# manifest-list (OCI index) digest, so one pin covers linux/amd64 + linux/arm64.
ARG CHARON_TOOLCHAIN_TAG=caddy-crowdsec-66f7e58dee5020e1
ARG CHARON_TOOLCHAIN_DIGEST=sha256:f2226d32c370679de33e9a0ea6172e5ba25859f6f5b346719896bdd974497195
ARG CHARON_TOOLCHAIN_TAG=caddy-crowdsec-c62f18665cd67ce1
ARG CHARON_TOOLCHAIN_DIGEST=sha256:24224cf39ff2ec2f6dd6ba46f3bb505181ff449784b10f4db55af4d066b5ed59

# Stage selector β€” default consumes the prebuilt toolchain image (no compile).
# Fork PRs / bootstrap / offline builds pass
Expand All @@ -31,7 +31,7 @@ ARG CROWDSEC_BUILDER_SRC=toolchain-prebuilt

# ---- Pinned Toolchain Versions ----
# renovate: datasource=docker depName=golang versioning=docker
ARG GOLANG_IMAGE=golang:1.27.4-alpine@sha256:0a5f7fe796599ff487605987432e7619ae45beeb2fba4c2ce0b907879932aebf
ARG GOLANG_IMAGE=golang:1.27.4-alpine@sha256:70bd7ddea8b6cbe5d6943cde279d6b67feb10cc924fb9100d1d8757c1575b280

# renovate: datasource=docker depName=alpine versioning=docker
ARG ALPINE_IMAGE=alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf
Expand Down Expand Up @@ -93,7 +93,7 @@ ARG NPM_VERSION=12.2.2
ARG CADDY_VERSION=2.11.9
ARG CADDY_PATCH_SCENARIO=B
# renovate: datasource=go depName=github.com/greenpau/caddy-security
ARG CADDY_SECURITY_VERSION=1.6.2
ARG CADDY_SECURITY_VERSION=1.7.0
# renovate: datasource=go depName=github.com/corazawaf/coraza-caddy/v2
ARG CORAZA_CADDY_VERSION=2.6.2
# coraza WAF override: coraza-caddy v2.6.1 requires coraza v3.7.0, which carries a CVE
Expand Down
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.27.4

require (
filippo.io/age v1.3.2
github.com/Wikid82/Hermes v0.3.7
github.com/Wikid82/Hermes v0.3.9
github.com/coder/websocket v1.8.15
github.com/distribution/reference v0.6.0
github.com/gin-contrib/gzip v1.2.10
Expand Down
4 changes: 2 additions & 2 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ filippo.io/hpke v0.4.0 h1:p575VVQ6ted4pL+it6M00V/f2qTZITO0zgmdKCkd5+A=
filippo.io/hpke v0.4.0/go.mod h1:EmAN849/P3qdeK+PCMkDpDm83vRHM5cDipBJ8xbQLVY=
github.com/Microsoft/go-winio v0.6.4 h1:kJF2pamtYCWXf0xAT8sAkwKC0pMl2HYBrRPHAqyUc+g=
github.com/Microsoft/go-winio v0.6.4/go.mod h1:1xl5JXG4ze/m74GH6Dc4Mwxfc3VL5siRVQjIAlHH07U=
github.com/Wikid82/Hermes v0.3.7 h1:nII7fOlqCSX65hikR94JeufWH3IgR3nMJal/+9BRneM=
github.com/Wikid82/Hermes v0.3.7/go.mod h1:e9uc3QuQBDq4vof/8NvtJ/kjwVhLP/T3qjszcqzovoM=
github.com/Wikid82/Hermes v0.3.9 h1:aA8QAgbCEww6xB8vlJ8GrpIl/d6sQ5n0WhSonxjZ8RA=
github.com/Wikid82/Hermes v0.3.9/go.mod h1:/GvZXttfInstdOEHqM3p+TV/G2PLQHblG39wlC0ZSaI=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bytedance/gopkg v0.1.4 h1:oZnQwnX82KAIWb7033bEwtxvTqXcYMxDBaQxo5JJHWM=
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/services/forward_preflight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestRefuseForwardTarget_LiteralPolicyForEveryClass(t *testing.T) {
"fd00:ec2::254": true,
"100.100.100.200": true,
"168.63.129.16": true,
"0.0.0.0": true,
"0.0.0.0": false, // loopback-equivalent on an ordinary port (see forwardLiteralBlocked)
"10.20.30.40": false,
"192.168.1.10": false,
"100.64.0.5": false,
Expand Down
19 changes: 17 additions & 2 deletions backend/internal/services/forward_target_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/Wikid82/charon/backend/internal/caddy"
"github.com/Wikid82/charon/backend/internal/models"
"github.com/Wikid82/charon/backend/internal/network"
"github.com/Wikid82/charon/backend/internal/orthrus"
)

Expand Down Expand Up @@ -295,7 +296,7 @@ func refuseForwardTarget(tx *gorm.DB, forwardHost string, port int, v forwardVer
}
literal := parseIPOrLegacy(host)
if literal != nil {
if v.policy.Blocked(literal) {
if forwardLiteralBlocked(v.policy, literal) {
return ErrForwardTargetAddress
}
} else if nv, ok := v.names[host]; ok && nv.err == nil {
Expand Down Expand Up @@ -351,7 +352,21 @@ func addrIP(a netip.Addr) net.IP {
func literalRefusedByPolicy(forwardHost string) bool {
host := normalizeForwardName(forwardTargetHost(forwardHost))
ip := parseIPOrLegacy(host)
return ip != nil && probePolicy().Blocked(ip)
return ip != nil && forwardLiteralBlocked(probePolicy(), ip)
}

// forwardLiteralBlocked reports whether a forward target literal is refused by
// the policy. The IPv4 unspecified address 0.0.0.0 (also in its legacy spellings)
// is judged as 127.0.0.1. On Linux a connection to it reaches this machine's
// loopback listeners, so it is accepted wherever loopback is. The policy itself
// is unchanged, so probes and dials still refuse 0.0.0.0. The IPv6 unspecified
// address `::` is not covered: the reported case is IPv4, and `::` stays refused.
// Only the forward-target paths use this helper.
func forwardLiteralBlocked(policy network.AddressPolicy, ip net.IP) bool {
if ip.Equal(net.IPv4zero) {
ip = net.IPv4(127, 0, 0, 1)
}
return policy.Blocked(ip)
}

// parseIPOrLegacy returns the address a host names when it is an IP literal in
Expand Down
54 changes: 54 additions & 0 deletions backend/internal/services/forward_target_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,57 @@ func requireForwardRefused(t *testing.T, err error) {
assert.True(t, errors.Is(err, ErrOrthrusListenerTarget) || errors.Is(err, ErrForwardTargetAddress),
"unexpected refusal %v", err)
}

// The IPv4 unspecified literal reaches this machine's loopback listeners on Linux,
// so an ordinary port on 0.0.0.0 is accepted as a loopback target. The reserved
// port rule still applies to it, and the other blocked ranges stay refused.
func TestForwardTarget_UnspecifiedIPv4OnOrdinaryPortIsAccepted(t *testing.T) {
db := setupListenerPolicyDB(t)
seedAgentPort(t, db, "a", 2375)
useListenerSource(t, fakeListenerSource{})
noLookup(t)

for _, host := range []string{"0.0.0.0", "0", "0x0", "0.0", "::ffff:0.0.0.0"} {
t.Run(host, func(t *testing.T) {
refused, err := NewListenerTargetGuard(db).RefusesForwardTarget(host, 8080)
require.NoError(t, err)
assert.False(t, refused, "config generation keeps the host")

require.NoError(t, refuseForwardTarget(db, host, 8080, verdictsFor(t)), "save accepts the host")
})
}
}

func TestForwardTarget_UnspecifiedIPv4OnReservedPortIsRefused(t *testing.T) {
db := setupListenerPolicyDB(t)
seedAgentPort(t, db, "a", 2375)
useListenerSource(t, fakeListenerSource{})
noLookup(t)

for _, host := range []string{"0.0.0.0", "0", "0x0"} {
t.Run(host, func(t *testing.T) {
refused, err := NewListenerTargetGuard(db).RefusesForwardTarget(host, 2375)
require.NoError(t, err)
assert.True(t, refused, "config generation drops the host")

require.ErrorIs(t, refuseForwardTarget(db, host, 2375, verdictsFor(t)), ErrOrthrusListenerTarget)
})
}
}

func TestForwardTarget_BlockedRangesStayRefusedOnOrdinaryPort(t *testing.T) {
db := setupListenerPolicyDB(t)
useListenerSource(t, fakeListenerSource{})
noLookup(t)

// The unspecified IPv6 address is not part of the exception: it stays refused.
for _, host := range []string{"169.254.169.254", "169.254.1.1", "fe80::1", "::"} {
t.Run(host, func(t *testing.T) {
refused, err := NewListenerTargetGuard(db).RefusesForwardTarget(host, 8080)
require.NoError(t, err)
assert.True(t, refused, "config generation drops the host")

requireForwardRefused(t, refuseForwardTarget(db, host, 8080, verdictsFor(t)))
})
}
}
4 changes: 2 additions & 2 deletions docs/features/orthrus.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ The registry check needs a note. Read-only means the proxy can't change anything

When you save a proxy host or a location, Charon checks its forward target. It refuses the save if the target is:

- A link-local address (`169.254.0.0/16` or `fe80::/10`), a cloud instance service address such as `169.254.169.254`, or another reserved address such as `0.0.0.0`, multicast or broadcast
- A link-local address (`169.254.0.0/16` or `fe80::/10`), a cloud instance service address such as `169.254.169.254`, or another reserved address such as multicast or broadcast
- This machine on a port Charon uses for itself: the agent proxy ports and the internal ports opened for connected agents, the internal admin port (2019), the bundled CrowdSec port (8085), and the emergency server port while that server is turned on. This applies to `localhost`, `127.0.0.1`, the machine's own addresses, and the Docker and Podman host names (`host.docker.internal`, `host.containers.internal`, `gateway.docker.internal`).
- The agent-name form (`orthrus:<agent>`). It is not accepted as a forward target at all.

Everything else is allowed, including private network addresses, loopback on ports Charon does not use, Tailscale-style addresses (`100.64.0.0/10`), IPv6 private addresses, and the fake-IP range `198.18.0.0/15`.
Everything else is allowed, including private network addresses, loopback on ports Charon does not use, Tailscale-style addresses (`100.64.0.0/10`), IPv6 private addresses, and the fake-IP range `198.18.0.0/15`. The IPv4 address `0.0.0.0` counts as loopback: it is allowed on ports Charon does not use and refused on the ports above, like `127.0.0.1`.

The refusal message is the same for every reason: "This forward target is not allowed." It does not say which rule applied, so compare the address with the list above.

Expand Down
Loading
Loading