293 Commits

Author SHA1 Message Date
Hugh Commit 70af2b12db Merge pull request 'feat: backport Opus 4.7 + adaptive thinking, remove scan tools, add --help to scripts' (#4) from far-136/backport-phase-1 into main
CI / Type-check & lint (push) Successful in 18s
CI / Build & push API image (push) Successful in 58s
CI / Build & push worker image (push) Successful in 3m35s
feat: backport Opus 4.7 + adaptive thinking, remove scan tools, add --help to scripts (#4)
2026-05-20 00:41:19 +00:00
Chris Farhood 800afbfefb feat(cli): block running with sudo or as root
CI / Type-check & lint (pull_request) Successful in 16s
CI / Build & push API image (pull_request) Has been skipped
CI / Build & push worker image (pull_request) Has been skipped
Backport upstream Shannon PR #323. Adds privilege check at CLI startup
that prevents execution via sudo or as the root user.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 00:30:58 +00:00
Chris Farhood 085624b287 feat: backport Opus 4.7 + adaptive thinking, remove scan tools, add --help to scripts
CI / Build & push API image (pull_request) Has been skipped
CI / Type-check & lint (pull_request) Successful in 18s
CI / Build & push worker image (pull_request) Has been skipped
Backport upstream Shannon PRs #325, #327, #328:

- Update large model default to claude-opus-4-7, add adaptive thinking
  configuration (auto-enabled on Opus 4.6/4.7, opt-out via
  CLAUDE_ADAPTIVE_THINKING=false), filter thinking blocks from message
  content, bump claude-agent-sdk to ^0.2.114
- Remove unused scan tools (nmap, subfinder, whatweb, schemathesis) from
  Dockerfile, prompts, and docs; remove dead 'tool' error type from
  PentestErrorType; redact URLs in preflight info logs
- Add --help flag to save-deliverable and generate-totp CLI scripts

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 00:26:25 +00:00
Chris Farhood ccb3dc6f75 Merge pull request 'chore: move .github folder to .gitea for Gitea compatibility' (#1) from far-133/move-github-to-gitea into main
CI / Type-check & lint (push) Successful in 17s
CI / Build & push API image (push) Successful in 59s
CI / Build & push worker image (push) Successful in 3m16s
Reviewed-on: #1
Reviewed-by: Chris Farhood <3+cpfarhood@noreply.git.farh.net>
2026-05-18 20:10:48 +00:00
Chris Farhood ff32ec85c5 chore: move .github folder to .gitea for Gitea compatibility
CI / Type-check & lint (pull_request) Successful in 15s
CI / Build & push worker image (pull_request) Has been skipped
CI / Build & push API image (pull_request) Has been skipped
Gitea prefers .gitea/ISSUE_TEMPLATE/ and .gitea/workflows/ over the
GitHub-convention .github/ equivalents. Moves all issue templates and
workflow files to the Gitea-native paths and updates CLAUDE.md references.

Cosign certificate identity paths in release/rollback workflows are
intentionally left unchanged — they reference the signing identity from
prior workflow runs and will need a separate update when the CI signing
infrastructure migrates.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-18 15:56:05 +00:00
Chris Farhood 48c0351be3 ci: switch back to REGISTRY_TOKEN PAT for registry auth
CI / Type-check & lint (push) Successful in 15s
CI / Build & push API image (push) Successful in 1m2s
CI / Build & push worker image (push) Successful in 3m6s
Even on Gitea 1.26 the auto-token still hits the registry with 401
in this environment. Use the gitea-admin PAT stored as REGISTRY_TOKEN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:09:46 -04:00
Chris Farhood 5c7e4d45d4 ci: revert to auto GITEA_TOKEN for registry auth
CI / Type-check & lint (push) Successful in 15s
CI / Build & push worker image (push) Failing after 8s
CI / Build & push API image (push) Failing after 8s
Gitea 1.26 (PR #36173) honors permissions.packages: write on the
auto-provided GITEA_TOKEN, so the PAT workaround is no longer needed.
You can delete the REGISTRY_TOKEN org secret.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 21:02:41 -04:00
Chris Farhood 8fe637e0e2 ci: pin registry login username to gitea-admin
CI / Type-check & lint (push) Successful in 15s
CI / Build & push worker image (push) Failing after 7s
CI / Build & push API image (push) Failing after 8s
REGISTRY_TOKEN was created under the gitea-admin user, so the
docker/helm registry username must match. Using github.actor
would fail for any other workflow-triggering user.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 20:40:28 -04:00
Chris Farhood f3d73c9160 ci: use REGISTRY_TOKEN PAT for container registry auth
CI / Type-check & lint (push) Successful in 52s
CI / Build & push worker image (push) Failing after 1m50s
CI / Build & push API image (push) Failing after 1m50s
The auto-provided GITEA_TOKEN doesn't grant write:package scope
in Gitea 1.25 even when permissions.packages: write is declared.
Switch registry logins to a dedicated PAT stored as REGISTRY_TOKEN.
Keep GITEA_TOKEN for semantic-release-gitea API calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 20:35:51 -04:00
Chris Farhood a6da45f6bf ci: trigger workflow re-run
CI / Type-check & lint (push) Successful in 1m8s
CI / Build & push worker image (push) Failing after 2m11s
CI / Build & push API image (push) Failing after 2m11s
2026-05-16 19:49:54 -04:00
Chris Farhood 547d8ae314 ci: trigger workflow re-run
CI / Build & push API image (push) Failing after 1m39s
CI / Type-check & lint (push) Successful in 1m10s
CI / Build & push worker image (push) Failing after 1m38s
2026-05-16 19:36:42 -04:00
Chris Farhood 1a874724c2 ci: trigger workflow re-run
CI / Type-check & lint (push) Successful in 1m12s
CI / Build & push API image (push) Failing after 2m15s
CI / Build & push worker image (push) Failing after 2m15s
2026-05-16 19:11:59 -04:00
Chris Farhood 262a8be326 ci: migrate from GitHub Actions to Gitea Actions
Helm Chart Release / Lint, package & push OCI (push) Failing after 12s
CI / Type-check & lint (push) Failing after 37s
CI / Build & push API image (push) Has been skipped
CI / Build & push worker image (push) Has been skipped
Move workflows to .gitea/workflows and adapt for git.farh.net:
- Push container images to git.farh.net instead of GHCR/Docker Hub
- Publish Helm chart as OCI artifact (no gh-pages, Gitea lacks Pages)
- Replace cosign keyless signing with key-based (COSIGN_PRIVATE_KEY/PASSWORD/PUBLIC_KEY)
- Swap @semantic-release/github for semantic-release-gitea
- Drop gh CLI from rollback workflow
- Use GITEA_TOKEN for registry auth and release creation
- Add Artifact Hub annotations to Chart.yaml
- Run on ubuntu-latest

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 18:55:32 -04:00
Chris Farhood 371f704fe0 Update GitHub URLs from hightower to trebuchet repos 2026-05-06 23:56:51 +00:00
Chris Farhood c548886189 Update GitHub link text from Hightower to Trebuchet in README.md 2026-05-06 23:55:34 +00:00
Chris Farhood 3be1ee5e42 Rename Hightower to Trebuchet in README.md 2026-05-06 23:51:42 +00:00
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