16 Commits
Author SHA1 Message Date
socat-proxy-ci f1cf94b38d Bump build version to 1.1.1 [skip ci] 2026-08-26 13:59:32 +00:00
Djeex 1f0af15932 Fix flaky unit test on merge-triggered CI runs (#7)
CI / build-and-scan (push) Successful in 1m4s
- entrypoint.sh: bound the target connectivity check with `-w 2` (the only unbounded step in the startup path)
- tests/entrypoint.bats: widen wait_for_log's budget from 5s to 10s

Merge-triggered runs land on a colder runner (Docker cache evicted by other repos' scheduled jobs since the PR was last tested) than PR-check runs, and the first backgrounded entrypoint.sh in the suite was occasionally landing just past the old 5s window — always passed on rerun once warm.
2026-08-26 15:58:36 +02:00
Djeex 4acab3e3c6 CI/CD hardening: lint, secret scan, coverage gate, auto CVE-fix PRs, GHCR + GitHub mirror publishing (#6)
CI / build-and-scan (push) Failing after 1m23s
- release changelog: commits rendered as description (link), divider lines dropped
- gitleaks secret scan and hadolint on every push/PR
- ruff lint/format gate (Python repos) with a pytest --cov-fail-under gate
- scheduled CRITICAL Trivy failures attempt an apk upgrade rebuild and open a follow-up PR if it clears the finding, instead of just failing red
- images also published to ghcr.io/djeex/<repo>
- a matching GitHub Release is created on the GitHub mirror, with a notice pointing back to this repo as the source of truth
2026-08-26 15:42:38 +02:00
Djeex 11eb12cc6e Merge pull request 'Release notes: list commits instead of changed files' (#5) from dev-v1.1 into main
CI / build-and-scan (push) Successful in 1m12s
Reviewed-on: #5
2026-08-23 23:35:40 +02:00
Djeex c94da17686 Link each commit in the release changelog to its own commit page
CI / build-and-scan (pull_request) Successful in 2m11s
COMMIT_LIST only rendered the bare subject line per commit, with no
way to jump to that specific commit — only the triggering commit
(Source:) had a link. Each line now reads
"- [<short-sha>](<repo>/commit/<sha>) <subject>", matching the same
link style already used for Source.
2026-08-23 23:22:44 +02:00
Djeex 4903484aa4 Release notes: list commits instead of changed files 2026-08-23 23:22:44 +02:00
Djeex db405d24e9 Merge pull request 'Run as non-root by default via PUID/PGID' (#4) from dev-v1.1 into main
CI / build-and-scan (push) Successful in 1m11s
Reviewed-on: #4
2026-08-23 15:18:11 +02:00
Djeex fff6e49350 Run as non-root by default via PUID/PGID
CI / build-and-scan (pull_request) Successful in 1m7s
2026-08-23 15:10:17 +02:00
socat-proxy-ci ac1addca14 Bump build version to 1.0.1 [skip ci] 2026-08-22 22:13:27 +00:00
Djeex 01a863deed Merge pull request 'Update alpine Docker tag to v3.24.1' (#2) from renovate/alpine-3.x into main
CI / build-and-scan (push) Successful in 1m36s
Reviewed-on: #2
2026-08-23 00:08:24 +02:00
Djeex 769462a028 Update alpine Docker tag to v3.24.1
CI / build-and-scan (pull_request) Successful in 2m42s
2026-08-22 22:05:22 +00:00
Djeex ea467474d0 Merge pull request 'Dev ci' (#1) from dev-ci into main
CI / build-and-scan (push) Failing after 40s
Reviewed-on: #1
2026-08-23 00:04:45 +02:00
DjeexandClaude Sonnet 5 373dbfce2e Add Renovate config
CI / build-and-scan (pull_request) Failing after 40s
Same policy as adguard-cidre: patch-level Dockerfile bumps automerge,
minor/major get a labeled PR, vulnerability alerts labeled bug. No
pip_requirements rule — this repo has no Python dependencies to manage.

Still needed on the Gitea/Renovate side (manual, not done here):
uncomment socat-proxy in the shared ~/renovate/config.js repositories
array on stockeex, and create the bot/major/minor/bug labels in this
repo's Issues → Labels (Renovate silently drops labels that don't
already exist).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-23 00:02:11 +02:00
DjeexandClaude Sonnet 5 d75172dd62 Add Gitea Actions CI workflow
CI / build-and-scan (pull_request) Failing after 1m19s
Adapted from adguard-cidre's pipeline: build, syntax smoke-test, bats
unit tests, shellcheck lint, Trivy critical/high scans, then on push to
main a versioned publish (VERSION auto-bump, :latest/:X.Y/:X.Y.Z tags
retagged from the already-scanned image, and a categorized Gitea
Release). Requires the REGISTRY_TOKEN and CI_PUSH_TOKEN repo secrets
and branch protection on main (not yet configured on the Gitea side).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-22 23:50:47 +02:00
DjeexandClaude Sonnet 5 b825dec8be Multi-stage Dockerfile: pin base image, add test/lint stages
Pin alpine:latest to the full patch-level tag alpine:3.22.1 so Renovate
can classify patch/minor/major bumps on it. Add a `test` stage (bats)
and a `lint` stage (shellcheck, severity=error) that build from `base`
before ENTRYPOINT is set, so CI can run them without an --entrypoint
override. A trailing `FROM base` keeps the lean prod image as the
default `docker build .` target despite the extra stages.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-22 23:50:40 +02:00
DjeexandClaude Sonnet 5 f6b27fe51c Add bats test suite for entrypoint.sh
Covers env-var validation, socket path preparation, target connectivity
messaging, DEBUG_LEVEL to socat-flag mapping, and graceful shutdown vs.
crash detection — run against the real socat/nc binaries rather than
mocks, since UNIX-LISTEN binds without needing the TCP target reachable.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-22 23:50:32 +02:00
4 changed files with 28 additions and 32 deletions

No files matched your search

+4 -29
View File
@@ -6,8 +6,7 @@ on:
pull_request:
branches: [main]
schedule:
# Saturday 05:00 UTC: 06:00 in Paris in winter, 07:00 in summer (Gitea runs cron in UTC).
- cron: "0 5 * * 6"
- cron: "0 6 * * 1"
jobs:
build-and-scan:
@@ -19,15 +18,6 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Get shared actions
uses: actions/checkout@v7
with:
repository: labeex/cicdeex
ref: 1.0.0
token: ${{ secrets.CICDEEX_TOKEN }}
path: .cicdeex
persist-credentials: false
- name: Scan for secrets
run: |
# docker cp, not a build COPY: a repo's own .dockerignore (e.g. one that
@@ -64,7 +54,7 @@ jobs:
docker run --rm \
-e DOCKER_HOST=tcp://dockerhost:2375 \
--add-host=dockerhost:host-gateway \
aquasec/trivy:0.76.2 image --exit-code 1 --severity CRITICAL socat-proxy:ci
aquasec/trivy:0.74.0 image --exit-code 1 --severity CRITICAL socat-proxy:ci
- name: Handle CRITICAL findings
if: steps.trivy_critical.outcome == 'failure'
@@ -82,7 +72,7 @@ jobs:
if docker run --rm \
-e DOCKER_HOST=tcp://dockerhost:2375 \
--add-host=dockerhost:host-gateway \
aquasec/trivy:0.76.2 image --exit-code 1 --severity CRITICAL socat-proxy:remediated; then
aquasec/trivy:0.74.0 image --exit-code 1 --severity CRITICAL socat-proxy:remediated; then
echo "apk upgrade clears the CRITICAL finding(s) — opening a PR for review."
BRANCH="auto/cve-fix-$(date +%Y%m%d)-$(echo "${{ github.sha }}" | cut -c1-7)"
@@ -110,22 +100,7 @@ jobs:
docker run --rm \
-e DOCKER_HOST=tcp://dockerhost:2375 \
--add-host=dockerhost:host-gateway \
aquasec/trivy:0.76.2 image --exit-code 0 --severity HIGH socat-proxy:ci
# Pilot: the shared publish action in dry-run, before the real publish,
# to compare its output with what the step below really does.
- name: Publish dry-run (cicdeex pilot)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
continue-on-error: true
uses: ./.cicdeex/publish
with:
image: socat-proxy:ci
paths: '^(Dockerfile|entrypoint\.sh|VERSION)$'
push-token: ${{ secrets.CI_PUSH_TOKEN }}
registry-token: ${{ secrets.REGISTRY_TOKEN }}
github-mirror: "true"
github-token: ${{ secrets.GH_TOKEN }}
dry-run: "true"
aquasec/trivy:0.74.0 image --exit-code 0 --severity HIGH socat-proxy:ci
- name: Publish tagged image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:3.24.4@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf AS base
FROM alpine:3.24.1 AS base
RUN apk add --no-cache socat netcat-openbsd su-exec \
&& rm -rf /var/cache/apk/* /tmp/*
+1 -1
View File
@@ -1 +1 @@
1.1.5
1.1.1
+22 -1
View File
@@ -1,4 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>labeex/renovateex"]
"extends": ["config:recommended"],
"timezone": "Europe/Paris",
"labels": ["bot"],
"packageRules": [
{
"matchManagers": ["dockerfile"],
"matchUpdateTypes": ["patch"],
"automerge": true
},
{
"matchUpdateTypes": ["major"],
"addLabels": ["major"]
},
{
"matchUpdateTypes": ["minor"],
"addLabels": ["minor"]
}
],
"vulnerabilityAlerts": {
"enabled": true,
"addLabels": ["bug"]
}
}