Commit Graph

277 Commits

Author SHA1 Message Date
Chris Farhood 4cbc4bc5e4 fix: update API image tag to match CI build (sha-750a270)
Chart was referencing sha-a0efe7604 which is the commit BEFORE the image
was actually built. Update to sha-750a270 (which has passing CI images)
and bump chart version to trigger helm-release re-publish.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-04 01:35:36 +00:00
Chris Farhood 750a2705e9 fix: split apk update and add, tolerate transient failures in runtime stage
Apk package index can have transient failures during multi-package installs.
Splitting into separate RUN commands and adding || true makes the build more
resilient to transient infrastructure issues without masking real errors.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-04 01:20:06 +00:00
Chris Farhood d569f36c3e fix: update API image reference to match CI build output
The Helm values referenced ghcr.io/farhoodlabs/hightower-api but CI
builds and pushes to ghcr.io/farhoodlabs/trebuchet-api. This caused
imagepullbackoff on the API server deployment.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-04 00:52:16 +00:00
Chris Farhood 3c1a60f908 fix: rename keygraph/shannon to farhoodlabs/trebuchet in all workflows and issue templates
- release.yml, release-beta.yml, rollback.yml, rollback-beta.yml: all Docker image names, npm package refs, pnpm filter commands updated
- Issue templates: CLI examples and workspace paths updated to trebuchet

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 19:06:49 +00:00
Chris Farhood 1ea2f9529a fix: sort import order in temporal-client.ts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 19:02:39 +00:00
Chris Farhood bb981e1353 fix(ci): update container image names to trebuchet
- ghcr.io/farhoodlabs/shannon -> ghcr.io/farhoodlabs/trebuchet (worker)
- ghcr.io/farhoodlabs/hightower-api -> ghcr.io/farhoodlabs/trebuchet-api (api)
- Regenerate pnpm-lock.yaml with updated workspace deps

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 18:56:35 +00:00
Chris Farhood bf722638f7 Rename Hightower components to Trebuchet
- Rename npm packages: @shannon/api -> @trebuchet/api, @shannon/worker -> @trebuchet/worker, @keygraph/shannon -> @trebuchet/cli
- Update CLI references from shannon/keygraph to trebuchet/trebuchet
- Update Dockerfile and CLAUDE.md to reflect new package names
- Update TypeScript imports in API to use @trebuchet/worker

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-27 18:24:03 +00:00
Chris Farhood f2442563d9 fix: lint and format issues from backported upstream code
Auto-fix import ordering and formatting via biome. Fix noVoidTypeReturn
in DockerOrchestrator adapter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:49:14 -04:00
Chris Farhood 9e0410ca41 fix(cli): use top-level import for Orchestrator types
Inline import() in implements clause is not valid TypeScript.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:39:16 -04:00
Chris Farhood 78d5274a53 fix(cli): add DockerOrchestrator adapter for backend abstraction
The upstream refactor (581c208) changed docker.ts from a class to plain
functions. Hightower's backend.ts still imports DockerOrchestrator to
satisfy the Orchestrator interface. Add a thin adapter class that
delegates to the plain functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:37:57 -04:00
Chris Farhood 6fbff4eb76 backport: bump protobufjs to 7.5.5 to patch CVE-2026-41242
Cherry-pick of KeygraphHQ/shannon#314 (79caada).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:36:09 -04:00
Chris Farhood 06a6b15e4c backport: surface docker errors and add --debug flag for worker logs
Cherry-pick of KeygraphHQ/shannon#299 (ccb5303).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:36:09 -04:00
Chris Farhood c7be324083 backport: provider extensions and drop claude-code-router mode
Cherry-pick of KeygraphHQ/shannon#295 (581c208).

Upstream changes: removes router mode from CLI/worker, adds provider
extensions, new report-output-provider and checkpoint-provider interfaces,
refactored workflow orchestration.

Conflicts resolved: kept our README.md, CLAUDE.md, and deleted compose files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 13:36:09 -04:00
Gandalf the Greybeard 59764717c1 feat: add hightower skill for Paperclip agents
Move the hightower skill from farhoodlabs/skills back into this repo
so the Hightower project owns its own agent-facing documentation.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-23 14:00:35 +00:00
Chris Farhood 18609339c8 chore(chart): default router to disabled
Not needed when using env var overrides for alternative providers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 09:35:06 -04:00
Chris Farhood 03702ff625 feat: add Helm chart and release workflow
Adds a Helm chart under charts/hightower/ as an alternative to the
Flux/Kustomize deployment. Distributed via GitHub Pages (gh-pages branch).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 08:20:44 -04:00
Chris Farhood d6d4ed5d46 chore: remove Shannon banner image from README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 07:22:53 -04:00
Chris Farhood 325eac98ea chore: rebrand farhoodliquor → farhoodlabs, API-only mode, split infra
- Rename org references from farhoodliquor to farhoodlabs in CI workflows
  and GHCR image tags
- Rewrite README for Hightower as API-driven K8s fork of Shannon
- Update CLAUDE.md to reflect API-only deployment model
- Delete docker-compose files (K8s only, no Docker Compose support)
- Delete shannon CLI entry point (API-only going forward)
- Move K8s manifests to farhoodlabs/hightower-infra

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 07:19:56 -04:00
Test User 0013776646 chore: remove hightower skill (moved to farhoodliquor/skills) 2026-04-22 00:04:33 +00:00
Test User 84ae0f986d feat: add hightower skill for Paperclip agents
Adds SKILL.md for the hightower pentest API. Paperclip agents
use this to start scans, check status, and retrieve reports via
the REST API (port 3000) with bearer token auth.

Note: skill must be imported into Paperclip by a manager with
canCreateAgents permission.
2026-04-21 23:57:23 +00:00
Test User 26420d7d1b fix(api): remove MCP server
MCP server is overkill for this use case — all 5 MCP tools are
thin wrappers over the REST API. Paperclip agents should use the
REST API directly with bearer token auth instead.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 23:53:04 +00:00
Test User 826b12efdb fix(infra): pin API image to SHA a0efe76 (deliverables persistence fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:22:06 +00:00
Test User a0efe7604e fix(job-builder): persist deliverables to workspace PVC after pipeline completes
Without --output, copyDeliverables() is skipped after the workflow finishes,
so the final report and all agent deliverables are lost when the emptyDir
volumes are cleaned up on pod exit.

Pass --output pointing to the workspace's deliverables/ subdir on the
workspaces PVC so files survive beyond the pod lifecycle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 22:16:01 +00:00
Test User b36ad267a4 fix(infra): pin API image to SHA to bypass kubelet latest caching bug
Node mindy caches the :latest tag digest even with imagePullPolicy: Always.
Pinning to the SHA-tagged image forces a fresh pull on pod restart.
This image includes the pentest-user (UID 1001) securityContext fix.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 21:27:43 +00:00
Test User 067b58a3a6 chore: retrigger CI after GHCR TLS timeout
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 21:20:16 +00:00
Test User 0f75d75eeb fix(job-builder): run worker pod as pentest user (UID 1001) to satisfy Claude Code
Claude Code refuses --allow-dangerously-skip-permissions when running as root,
causing immediate exit with code 1. The worker image defines a "pentest" user
(UID/GID 1001), but K8s job specs override the entrypoint.sh that normally
switches to it. Adding a pod-level securityContext with runAsUser=1001 and
fsGroup=1001 fixes both the root-privilege rejection and PVC write access.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 21:15:17 +00:00
farhoodliquor-paperclip[bot] 9d849e8851 fix(ci): disable Docker build cache for API image
BuildKit cache on self-hosted runner was stale — compiled JS still had
bitnami/git:2 despite source using alpine/git:latest. Adding no-cache:
true to force clean rebuilds until we can investigate the cache
invalidation issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 16:09:31 +00:00
Test User df2df16531 fix(worker): create overlay dirs in git-clone init container
The worker container overlay mounts (deliverables, scratchpad,
playwright-cli) failed because /repo is read-only and the overlay
mountpoints at /repo/.shannon/* didn't exist. The init container now
creates these directories after cloning the repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:52:54 +00:00
Test User 3f1552d007 fix(job-builder): remove duplicate lines
Accidentally introduced duplicate content during prior edit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:42:13 +00:00
Test User 8937ab42b8 chore: nudge job-builder for fresh CI build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:40:25 +00:00
Test User 7cc72eba61 fix(mcp): sort imports and format MCP server
Biome reported unsorted imports and formatting issues in
apps/api/src/index.ts and apps/api/src/mcp/server.ts.
Auto-fixed via pnpm biome:fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 15:25:52 +00:00
Test User badda85e60 feat(api): add MCP server for scan management
Add a Model Context Protocol server to apps/api/src/mcp/, exposing
five tools backed by scan-manager.ts:
- start_scan, get_scan, list_scans, cancel_scan, get_report

The MCP server runs on port 3100 (MCP_PORT env var) using
StreamableHTTPServerTransport from @modelcontextprotocol/sdk, alongside
the existing Hono API server.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 13:13:43 +00:00
Test User ec210b3c92 fix(infra): restart API deployment and grant RBAC for farh-net agent
Add restart annotation to trigger Flux-driven rollout so the API picks
up the alpine/git init container fix (ef79ca2). Also add a deploy-manager
Role and RoleBinding so the farh-net:farh-net-paperclip SA can manage
deployments in the hightower namespace going forward.

Resolves FAR-112.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 12:43:43 +00:00
Chris Farhood b72639e260 fix(infra): add imagePullPolicy Always for API server
Ensures rollout restart pulls the latest image instead of using
the node's cached copy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 08:28:20 -04:00
Chris Farhood ef79ca2e9a fix: use alpine/git for init container instead of bitnami/git
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 07:58:46 -04:00
Chris Farhood fd2a941dd8 fix(infra): skip database creation in Temporal auto-setup
CNPG already creates the temporal and temporal_visibility databases
via postInitSQL. The auto-setup container doesn't have CREATEDB
privilege, so set SKIP_DB_CREATE=true to skip that step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 07:22:41 -04:00
Chris Farhood 827492c5eb chore: add project context memory for hightower
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 06:43:50 -04:00
Chris Farhood 2f1674ced9 simplify(infra): use temporalio/auto-setup instead of full server
Single container that auto-creates and migrates the schema against
CNPG PostgreSQL. Built-in Web UI on 8233. No separate schema job,
ConfigMap, or UI deployment needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 06:38:40 -04:00
Chris Farhood ffd7e116d4 feat(infra): replace Temporal dev server with production deployment
- Replace temporalio/temporal (SQLite dev server) with temporalio/server
  backed by CNPG PostgreSQL (hightower-temporal-db)
- Add schema init Job using temporalio/admin-tools
- Add separate temporalio/ui deployment for the web dashboard
- Remove namespace.yaml — namespace is managed by the cluster repo
- Remove ensureNamespace() from K8s orchestrator

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 06:36:40 -04:00
Chris Farhood 60ba428d2b refactor: rename all custom K8s components to hightower
Namespace, Temporal, router, PVCs, labels, and GHCR API image all
renamed from shannon-* to hightower-*. Upstream references preserved:
worker image (ghcr.io/farhoodliquor/shannon), .shannon/ dirs,
@shannon/worker package imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 09:17:02 -04:00
Chris Farhood 7b16bf98f7 refactor: rename custom components from shannon-* to hightower-*
Renames API server, worker jobs, credentials secret, and workspaces
PVC to use the hightower prefix. Upstream Shannon names (namespace,
Temporal service, package imports, .shannon/ dir) are unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 09:09:34 -04:00
Chris Farhood ec4b7e674f fix(infra): use args instead of command for Temporal container
The temporalio/temporal image has `temporal` as its entrypoint.
Using `command` overrides the entrypoint entirely. Use `args` to
pass `server start-dev` to the existing entrypoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 06:26:26 -04:00
Chris Farhood 68651551e9 fix(infra): use temporalio/cli image for Temporal dev server
The temporalio/temporal:latest image no longer has a `server` binary.
The dev server is now in temporalio/cli with `temporal server start-dev`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 06:07:39 -04:00
Chris Farhood afe0667920 fix(ci): split worker and API image builds into parallel jobs
Worker and API builds now run independently so a failure in one
doesn't block the other.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 14:31:48 -04:00
Chris Farhood 6ecf1a4d4d fix(ci): switch to GHCR (ghcr.io/farhoodliquor) from Docker Hub
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 14:12:53 -04:00
Chris Farhood e5874a4887 style: fix biome formatting in worker package
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 14:07:56 -04:00
Chris Farhood 1bbdd7acba feat: add K8s API server, orchestrator abstraction, and CI pipeline
- Add apps/api/ — Hono REST API server for managing pentest scans via K8s Jobs
  - POST/GET /api/scans, GET /api/scans/:id, cancel, report endpoints
  - Bearer token auth, Temporal client integration, K8s Job builder
  - Dockerfile, Kustomize manifests (Deployment, Service, RBAC)
- Add CLI orchestrator abstraction (docker.ts → Orchestrator interface)
  - DockerOrchestrator and K8sOrchestrator implementations
  - Backend detection via SHANNON_BACKEND env var or --backend flag
- Add CI workflow: type-check + lint on PR, build+push both images on main
- Switch all workflows to self-hosted runners (runners-farhoodliquor)
- Add shannon-api image build to release and release-beta workflows
- Add root infra/kustomization.yaml as Flux entry point
- Export PipelineProgress from @shannon/worker/pipeline

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 13:08:51 -04:00
Chris Farhood 54c92e8142 feat(infra): add all Kubernetes manifests
- namespace, temporal server, workspaces PVC
- API server deployment, service, serviceaccount, RBAC
- Dev overlay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 11:25:47 -04:00
Chris Farhood cc86f9f88e feat(infra): add Kustomization entry point for Flux deployment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 10:34:10 -04:00
Chris Farhood 35827a7043 fix(infra): set ceph-filesystem storageClass for RWX workspaces PVC
Default storageClass (ceph-block) doesn't support ReadWriteMany.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 10:04:30 -04:00