Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

fix(release): verify the GHCR image pulls anonymously

BaaRaib247c7a9d977
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b0c3f78..0260778 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -201,3 +201,21 @@ jobs:
sbom: true
cache-from: type=gha
cache-to: type=gha,mode=max
+
+ # A brand-new GHCR package starts private: the push succeeds, but an
+ # anonymous pull is denied until the package visibility is set to Public.
+ # Use an empty Docker config so the registry login above cannot mask it.
+ - name: Verify the image pulls anonymously
+ if: github.event_name == 'push'
+ run: |
+ repo="${GITHUB_REPOSITORY,,}"
+ tag="${GITHUB_REF_NAME}"
+ cfg="$(mktemp -d)"
+ for attempt in 1 2 3; do
+ if DOCKER_CONFIG="$cfg" docker manifest inspect "ghcr.io/${repo}:${tag}" >/dev/null; then
+ exit 0
+ fi
+ sleep 10
+ done
+ echo "anonymous pull of ghcr.io/${repo}:${tag} is denied; set the package visibility to Public" >&2
+ exit 1
diff --git a/README.md b/README.md
index 492701f..43a7889 100644
--- a/README.md
+++ b/README.md
@@ -58,8 +58,9 @@ docker compose logs artex | grep "Setup token"
```
> Multi-arch release images (`linux/amd64`, `linux/arm64`) are published to GitHub Container
-> Registry at `ghcr.io/baarai/artex`. For pulling the prebuilt image and all other installation
-> paths (script, binaries, source, release archives), see [Installation](#installation).
+> Registry at `ghcr.io/baarai/artex` from the next tagged release; v0.7.0 predates the publish
+> step. For pulling the prebuilt image and all other installation paths (script, binaries,
+> source, release archives), see [Installation](#installation).
---
@@ -344,13 +345,16 @@ docker compose up -d --build
# → http://localhost:8787
```
-Each `v*` release publishes a multi-arch image (`linux/amd64`, `linux/arm64`) to GitHub
-Container Registry with tags `:latest`, `:v<version>`, and `:<version>`. GHCR packages start
-private. After the first release, maintainers should check that the `artex` package visibility
-is set to Public and verify the pull below on a machine without GHCR credentials before
-announcing anonymous installation.
+The release workflow publishes a multi-arch image (`linux/amd64`, `linux/arm64`) to GitHub
+Container Registry on each `v*` tag, with tags `:latest`, `:v<version>`, and `:<version>`.
+v0.7.0 predates that step, so there is no `artex` package yet: until the next tagged release,
+use the checkout build above, and `docker-compose.ghcr.yml` and the `docker pull` below will
+fail with `denied`. GHCR packages start private; after the first publish the package visibility
+must be set to Public, and the release workflow verifies that the image pulls anonymously and
+fails the job otherwise.
-The standalone container requires an existing PostgreSQL database reachable from the container.
+Once the image is published, the standalone container requires an existing PostgreSQL database
+reachable from the container.
Set the `ARTEX_PG_*` variables below. The example uses Docker Desktop's
`host.docker.internal` to reach PostgreSQL on the host. On native Linux Docker Engine, add
`--add-host=host.docker.internal:host-gateway` to `docker run` for a host database, or use
@@ -390,7 +394,9 @@ built-in skills are used.
#### Compose stack from the prebuilt image
`docker-compose.ghcr.yml` runs the same ARTEX + PostgreSQL stack from the released image, with no
-checkout build. Download it and `.env.example` once:
+checkout build. The image is not published yet: v0.7.0 predates the GHCR publish step, so use the
+checkout build above until the next tagged release. Once the first image is published, download
+the file and `.env.example` once:
```bash
curl -fsSLO https://raw.githubusercontent.com/BaaRai/ARTEX/main/docker-compose.ghcr.yml
diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml
index e5e7657..8ae32ee 100644
--- a/docker-compose.ghcr.yml
+++ b/docker-compose.ghcr.yml
@@ -4,6 +4,10 @@
# docker compose -f docker-compose.ghcr.yml pull
# docker compose -f docker-compose.ghcr.yml up -d
#
+# The image is published from the next tagged release: v0.7.0 predates the
+# GHCR publish step, so the pull above fails with "denied" until then. Use
+# `docker compose up -d --build` with docker-compose.yml in the meantime.
+#
# Set POSTGRES_PASSWORD in .env. Pin the image with ARTEX_IMAGE_TAG=v0.7.1 in
# .env; unset uses latest. The image carries the built-in /app/skills; this file
# does not mount a host skills/ directory. To use custom skills, copy them into a