Skip to content

Commit 9f3b702

Browse files
SecAI-Hubclaude
andcommitted
Extract registry to standalone repo (SecAI-Hub/ai-model-registry)
Update build-services.sh to clone from the standalone ai-model-registry repo with graceful fallback, remove registry from Go build matrix and securectl CI job (both have their own CI now). The standalone repo includes P0 security hardening per the split-out preservation plan: fail-closed auth, explicit artifact states (trusted/ revoked), revoke endpoint, and path guard for revoked artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 687393e commit 9f3b702

2 files changed

Lines changed: 17 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
contents: read
2727
strategy:
2828
matrix:
29-
service: [registry, airlock]
29+
service: [airlock]
3030
steps:
3131
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
@@ -46,22 +46,6 @@ jobs:
4646
working-directory: services/${{ matrix.service }}
4747
run: go vet ./...
4848

49-
go-securectl:
50-
name: Build securectl CLI
51-
runs-on: ubuntu-latest
52-
permissions:
53-
contents: read
54-
steps:
55-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
57-
with:
58-
go-version: "1.23"
59-
cache-dependency-path: services/registry/go.sum
60-
61-
- name: Build securectl
62-
working-directory: services/registry
63-
run: CGO_ENABLED=0 go build -ldflags="-s -w" -o /dev/null ./cmd/securectl/
64-
6549
python-test:
6650
name: Python Test & Lint
6751
runs-on: ubuntu-latest

files/scripts/build-services.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,29 @@ dnf install -y golang python3 python3-pip cmake gcc gcc-c++ 2>/dev/null || true
1616
mkdir -p "$INSTALL_DIR" "$SRC_DIR"
1717

1818
# --- Go services (built from monorepo) ---
19-
for svc in registry airlock; do
19+
for svc in airlock; do
2020
echo "Building: $svc"
2121
cp -r /tmp/services/${svc} "${SRC_DIR}/${svc}"
2222
cd "${SRC_DIR}/${svc}"
2323
CGO_ENABLED=0 go build -ldflags="-s -w" -o "${INSTALL_DIR}/${svc}" .
2424
echo " -> ${INSTALL_DIR}/${svc}"
2525
done
2626

27-
# Build securectl CLI
28-
echo "Building: securectl"
29-
cd "${SRC_DIR}/registry"
30-
CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/securectl ./cmd/securectl/
31-
echo " -> /usr/local/bin/securectl"
27+
# --- ai-model-registry (standalone: security-first artifact registry) ---
28+
echo "Building: ai-model-registry"
29+
if [ -d "/tmp/ai-model-registry" ]; then
30+
cp -r /tmp/ai-model-registry "${SRC_DIR}/ai-model-registry"
31+
else
32+
git clone --depth 1 https://github.com/SecAI-Hub/ai-model-registry.git "${SRC_DIR}/ai-model-registry" 2>/dev/null || \
33+
echo "WARNING: ai-model-registry clone failed — registry will not be available"
34+
fi
35+
if [ -d "${SRC_DIR}/ai-model-registry" ]; then
36+
cd "${SRC_DIR}/ai-model-registry"
37+
CGO_ENABLED=0 go build -ldflags="-s -w" -o "${INSTALL_DIR}/registry" .
38+
CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/securectl ./cmd/securectl/
39+
echo " -> ${INSTALL_DIR}/registry"
40+
echo " -> /usr/local/bin/securectl"
41+
fi
3242

3343
# --- agent-tool-firewall (standalone: policy gateway for LLM tool calls) ---
3444
echo "Building: agent-tool-firewall"

0 commit comments

Comments
 (0)