@phenixstar/talon 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +72 -0
- package/Dockerfile +161 -0
- package/Dockerfile.router +16 -0
- package/LICENSE +661 -0
- package/README.md +709 -0
- package/bin/talon.js +96 -0
- package/bin/talon.mjs +96 -0
- package/configs/config-schema.json +160 -0
- package/configs/example-config.yaml +50 -0
- package/configs/mcp-allowlist.json +47 -0
- package/configs/model-routing.yaml +39 -0
- package/configs/router-config.json +73 -0
- package/configs/talon-seccomp.json +89 -0
- package/dist/cli/dependency-checker.d.ts +25 -0
- package/dist/cli/dependency-checker.d.ts.map +1 -0
- package/dist/cli/dependency-checker.js +165 -0
- package/dist/cli/dependency-checker.js.map +1 -0
- package/dist/cli/doctor.d.ts +2 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +127 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/env-configurator.d.ts +27 -0
- package/dist/cli/env-configurator.d.ts.map +1 -0
- package/dist/cli/env-configurator.js +115 -0
- package/dist/cli/env-configurator.js.map +1 -0
- package/dist/cli/setup-renderer.d.ts +23 -0
- package/dist/cli/setup-renderer.d.ts.map +1 -0
- package/dist/cli/setup-renderer.js +71 -0
- package/dist/cli/setup-renderer.js.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +302 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/types/activity-logger.d.ts +10 -0
- package/dist/types/activity-logger.d.ts.map +1 -0
- package/dist/types/activity-logger.js +7 -0
- package/dist/types/activity-logger.js.map +1 -0
- package/dist/types/agents.d.ts +39 -0
- package/dist/types/agents.d.ts.map +1 -0
- package/dist/types/agents.js +28 -0
- package/dist/types/agents.js.map +1 -0
- package/dist/types/audit.d.ts +28 -0
- package/dist/types/audit.d.ts.map +1 -0
- package/dist/types/audit.js +7 -0
- package/dist/types/audit.js.map +1 -0
- package/dist/types/backtesting.d.ts +45 -0
- package/dist/types/backtesting.d.ts.map +1 -0
- package/dist/types/backtesting.js +3 -0
- package/dist/types/backtesting.js.map +1 -0
- package/dist/types/config.d.ts +48 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +55 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +41 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/evolution.d.ts +36 -0
- package/dist/types/evolution.d.ts.map +1 -0
- package/dist/types/evolution.js +14 -0
- package/dist/types/evolution.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/metrics.d.ts +13 -0
- package/dist/types/metrics.d.ts.map +1 -0
- package/dist/types/metrics.js +7 -0
- package/dist/types/metrics.js.map +1 -0
- package/dist/types/resilience.d.ts +30 -0
- package/dist/types/resilience.d.ts.map +1 -0
- package/dist/types/resilience.js +7 -0
- package/dist/types/resilience.js.map +1 -0
- package/dist/types/result.d.ts +42 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/result.js +30 -0
- package/dist/types/result.js.map +1 -0
- package/docker-compose.yml +91 -0
- package/package.json +75 -0
- package/prompts/exploit-auth.txt +423 -0
- package/prompts/exploit-authz.txt +425 -0
- package/prompts/exploit-injection.txt +452 -0
- package/prompts/exploit-ssrf.txt +502 -0
- package/prompts/exploit-xss.txt +442 -0
- package/prompts/pipeline-testing/exploit-auth.txt +31 -0
- package/prompts/pipeline-testing/exploit-authz.txt +31 -0
- package/prompts/pipeline-testing/exploit-injection.txt +31 -0
- package/prompts/pipeline-testing/exploit-ssrf.txt +31 -0
- package/prompts/pipeline-testing/exploit-xss.txt +31 -0
- package/prompts/pipeline-testing/pre-recon-code.txt +1 -0
- package/prompts/pipeline-testing/recon.txt +1 -0
- package/prompts/pipeline-testing/report-executive.txt +1 -0
- package/prompts/pipeline-testing/vuln-auth.txt +13 -0
- package/prompts/pipeline-testing/vuln-authz.txt +13 -0
- package/prompts/pipeline-testing/vuln-injection.txt +13 -0
- package/prompts/pipeline-testing/vuln-ssrf.txt +13 -0
- package/prompts/pipeline-testing/vuln-xss.txt +13 -0
- package/prompts/pre-recon-code.txt +403 -0
- package/prompts/recon.txt +382 -0
- package/prompts/report-executive.txt +126 -0
- package/prompts/shared/_exploit-scope.txt +14 -0
- package/prompts/shared/_rules.txt +2 -0
- package/prompts/shared/_target.txt +1 -0
- package/prompts/shared/_vuln-scope.txt +1 -0
- package/prompts/shared/login-instructions.txt +82 -0
- package/prompts/vuln-auth.txt +268 -0
- package/prompts/vuln-authz.txt +373 -0
- package/prompts/vuln-injection.txt +380 -0
- package/prompts/vuln-ssrf.txt +315 -0
- package/prompts/vuln-xss.txt +304 -0
- package/talon +459 -0
- package/talon.ps1 +348 -0
package/.env.example
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Talon Environment Configuration
|
|
2
|
+
# Copy this file to .env and fill in your credentials
|
|
3
|
+
|
|
4
|
+
# Recommended output token configuration for larger tool outputs
|
|
5
|
+
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
|
|
6
|
+
|
|
7
|
+
# =============================================================================
|
|
8
|
+
# OPTION 1: Direct Anthropic (default, no router)
|
|
9
|
+
# =============================================================================
|
|
10
|
+
ANTHROPIC_API_KEY=your-api-key-here
|
|
11
|
+
|
|
12
|
+
# OR use OAuth token instead
|
|
13
|
+
# CLAUDE_CODE_OAUTH_TOKEN=your-oauth-token-here
|
|
14
|
+
|
|
15
|
+
# =============================================================================
|
|
16
|
+
# OPTION 2: Router Mode (use alternative providers)
|
|
17
|
+
# =============================================================================
|
|
18
|
+
# Enable router mode by running: ./talon start ... ROUTER=true
|
|
19
|
+
# Then configure ONE of the providers below:
|
|
20
|
+
|
|
21
|
+
# --- OpenAI ---
|
|
22
|
+
# OPENAI_API_KEY=sk-your-openai-key
|
|
23
|
+
# ROUTER_DEFAULT=openai,gpt-5.2
|
|
24
|
+
|
|
25
|
+
# --- OpenRouter (access Gemini 3 models via single API) ---
|
|
26
|
+
# OPENROUTER_API_KEY=sk-or-your-openrouter-key
|
|
27
|
+
# ROUTER_DEFAULT=openrouter,google/gemini-3-flash-preview
|
|
28
|
+
|
|
29
|
+
# =============================================================================
|
|
30
|
+
# Model Tier Overrides (Anthropic API / OAuth / Bedrock)
|
|
31
|
+
# =============================================================================
|
|
32
|
+
# Override which model is used for each tier. Defaults are used if not set.
|
|
33
|
+
# ANTHROPIC_SMALL_MODEL=... # Small tier (default: claude-haiku-4-5-20251001)
|
|
34
|
+
# ANTHROPIC_MEDIUM_MODEL=... # Medium tier (default: claude-sonnet-4-6)
|
|
35
|
+
# ANTHROPIC_LARGE_MODEL=... # Large tier (default: claude-opus-4-6)
|
|
36
|
+
|
|
37
|
+
# =============================================================================
|
|
38
|
+
# OPTION 3: AWS Bedrock
|
|
39
|
+
# =============================================================================
|
|
40
|
+
# https://aws.amazon.com/blogs/machine-learning/accelerate-ai-development-with-amazon-bedrock-api-keys/
|
|
41
|
+
# Requires the model tier overrides above to be set with Bedrock-specific model IDs.
|
|
42
|
+
# Example Bedrock model IDs for us-east-1:
|
|
43
|
+
# ANTHROPIC_SMALL_MODEL=us.anthropic.claude-haiku-4-5-20251001-v1:0
|
|
44
|
+
# ANTHROPIC_MEDIUM_MODEL=us.anthropic.claude-sonnet-4-6
|
|
45
|
+
# ANTHROPIC_LARGE_MODEL=us.anthropic.claude-opus-4-6
|
|
46
|
+
|
|
47
|
+
# CLAUDE_CODE_USE_BEDROCK=1
|
|
48
|
+
# AWS_REGION=us-east-1
|
|
49
|
+
# AWS_BEARER_TOKEN_BEDROCK=your-bearer-token
|
|
50
|
+
|
|
51
|
+
# =============================================================================
|
|
52
|
+
# OPTION 4: Google Vertex AI
|
|
53
|
+
# =============================================================================
|
|
54
|
+
# https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models
|
|
55
|
+
# Requires a GCP service account with roles/aiplatform.user.
|
|
56
|
+
# Download the SA key JSON from GCP Console (IAM > Service Accounts > Keys).
|
|
57
|
+
# Requires the model tier overrides above to be set with Vertex AI model IDs.
|
|
58
|
+
# Example Vertex AI model IDs:
|
|
59
|
+
# ANTHROPIC_SMALL_MODEL=claude-haiku-4-5@20251001
|
|
60
|
+
# ANTHROPIC_MEDIUM_MODEL=claude-sonnet-4-6
|
|
61
|
+
# ANTHROPIC_LARGE_MODEL=claude-opus-4-6
|
|
62
|
+
|
|
63
|
+
# CLAUDE_CODE_USE_VERTEX=1
|
|
64
|
+
# CLOUD_ML_REGION=us-east5
|
|
65
|
+
# ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project-id
|
|
66
|
+
# GOOGLE_APPLICATION_CREDENTIALS=./credentials/gcp-sa-key.json
|
|
67
|
+
|
|
68
|
+
# =============================================================================
|
|
69
|
+
# Available Models
|
|
70
|
+
# =============================================================================
|
|
71
|
+
# OpenAI: gpt-5.2, gpt-5-mini
|
|
72
|
+
# OpenRouter: google/gemini-3-flash-preview
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Multi-stage Dockerfile for Pentest Agent
|
|
3
|
+
# Uses Chainguard Wolfi for minimal attack surface and supply chain security
|
|
4
|
+
|
|
5
|
+
# Builder stage - Install tools and dependencies
|
|
6
|
+
FROM cgr.dev/chainguard/wolfi-base:latest AS builder
|
|
7
|
+
|
|
8
|
+
# Install system dependencies available in Wolfi
|
|
9
|
+
RUN apk update && apk add --no-cache \
|
|
10
|
+
# Core build tools
|
|
11
|
+
build-base \
|
|
12
|
+
git \
|
|
13
|
+
curl \
|
|
14
|
+
wget \
|
|
15
|
+
ca-certificates \
|
|
16
|
+
# Network libraries for Go tools
|
|
17
|
+
libpcap-dev \
|
|
18
|
+
linux-headers \
|
|
19
|
+
# Language runtimes
|
|
20
|
+
go \
|
|
21
|
+
nodejs-22 \
|
|
22
|
+
npm \
|
|
23
|
+
python3 \
|
|
24
|
+
py3-pip \
|
|
25
|
+
ruby \
|
|
26
|
+
ruby-dev \
|
|
27
|
+
# Security tools available in Wolfi
|
|
28
|
+
nmap \
|
|
29
|
+
# Additional utilities
|
|
30
|
+
bash
|
|
31
|
+
|
|
32
|
+
# Set environment variables for Go
|
|
33
|
+
ENV GOPATH=/go
|
|
34
|
+
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
|
35
|
+
ENV CGO_ENABLED=1
|
|
36
|
+
|
|
37
|
+
# Create directories
|
|
38
|
+
RUN mkdir -p $GOPATH/bin
|
|
39
|
+
|
|
40
|
+
# Install Go-based security tools
|
|
41
|
+
RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
|
|
42
|
+
# Install WhatWeb from GitHub (Ruby-based tool)
|
|
43
|
+
RUN git clone --depth 1 https://github.com/urbanadventurer/WhatWeb.git /opt/whatweb && \
|
|
44
|
+
chmod +x /opt/whatweb/whatweb && \
|
|
45
|
+
gem install addressable && \
|
|
46
|
+
echo '#!/bin/bash' > /usr/local/bin/whatweb && \
|
|
47
|
+
echo 'cd /opt/whatweb && exec ./whatweb "$@"' >> /usr/local/bin/whatweb && \
|
|
48
|
+
chmod +x /usr/local/bin/whatweb
|
|
49
|
+
|
|
50
|
+
# Install Python-based tools
|
|
51
|
+
RUN pip3 install --no-cache-dir schemathesis
|
|
52
|
+
|
|
53
|
+
# Runtime stage - Minimal production image
|
|
54
|
+
FROM cgr.dev/chainguard/wolfi-base:latest AS runtime
|
|
55
|
+
|
|
56
|
+
# Install only runtime dependencies
|
|
57
|
+
USER root
|
|
58
|
+
RUN apk update && apk add --no-cache \
|
|
59
|
+
# Core utilities
|
|
60
|
+
git \
|
|
61
|
+
bash \
|
|
62
|
+
curl \
|
|
63
|
+
ca-certificates \
|
|
64
|
+
# Network libraries (runtime)
|
|
65
|
+
libpcap \
|
|
66
|
+
# Security tools
|
|
67
|
+
nmap \
|
|
68
|
+
# Language runtimes (minimal)
|
|
69
|
+
nodejs-22 \
|
|
70
|
+
npm \
|
|
71
|
+
python3 \
|
|
72
|
+
ruby \
|
|
73
|
+
# Chromium browser and dependencies for Playwright
|
|
74
|
+
chromium \
|
|
75
|
+
# Additional libraries Chromium needs
|
|
76
|
+
nss \
|
|
77
|
+
freetype \
|
|
78
|
+
harfbuzz \
|
|
79
|
+
# X11 libraries for headless browser
|
|
80
|
+
libx11 \
|
|
81
|
+
libxcomposite \
|
|
82
|
+
libxdamage \
|
|
83
|
+
libxext \
|
|
84
|
+
libxfixes \
|
|
85
|
+
libxrandr \
|
|
86
|
+
mesa-gbm \
|
|
87
|
+
# Font rendering
|
|
88
|
+
fontconfig
|
|
89
|
+
|
|
90
|
+
# Copy Go binaries from builder
|
|
91
|
+
COPY --from=builder /go/bin/subfinder /usr/local/bin/
|
|
92
|
+
|
|
93
|
+
# Copy WhatWeb from builder
|
|
94
|
+
COPY --from=builder /opt/whatweb /opt/whatweb
|
|
95
|
+
COPY --from=builder /usr/local/bin/whatweb /usr/local/bin/whatweb
|
|
96
|
+
|
|
97
|
+
# Install WhatWeb Ruby dependencies in runtime stage
|
|
98
|
+
RUN gem install addressable
|
|
99
|
+
|
|
100
|
+
# Copy Python packages from builder
|
|
101
|
+
COPY --from=builder /usr/lib/python3.*/site-packages /usr/lib/python3.12/site-packages
|
|
102
|
+
COPY --from=builder /usr/bin/schemathesis /usr/bin/
|
|
103
|
+
|
|
104
|
+
# Create non-root user for security
|
|
105
|
+
RUN addgroup -g 1001 pentest && \
|
|
106
|
+
adduser -u 1001 -G pentest -s /bin/bash -D pentest
|
|
107
|
+
|
|
108
|
+
# Set working directory
|
|
109
|
+
WORKDIR /app
|
|
110
|
+
|
|
111
|
+
# Copy package files first for better caching
|
|
112
|
+
COPY package*.json ./
|
|
113
|
+
COPY mcp-server/package*.json ./mcp-server/
|
|
114
|
+
|
|
115
|
+
# Install Node.js dependencies (including devDependencies for TypeScript build)
|
|
116
|
+
RUN npm ci && \
|
|
117
|
+
cd mcp-server && npm ci && cd .. && \
|
|
118
|
+
npm cache clean --force
|
|
119
|
+
|
|
120
|
+
# Copy application source code
|
|
121
|
+
COPY . .
|
|
122
|
+
|
|
123
|
+
# Build TypeScript (mcp-server first, then main project)
|
|
124
|
+
RUN cd mcp-server && npm run build && cd .. && npm run build
|
|
125
|
+
|
|
126
|
+
# Remove devDependencies after build to reduce image size
|
|
127
|
+
RUN npm prune --production && \
|
|
128
|
+
cd mcp-server && npm prune --production
|
|
129
|
+
|
|
130
|
+
RUN npm install -g @anthropic-ai/claude-code
|
|
131
|
+
|
|
132
|
+
# Create directories for session data and ensure proper permissions
|
|
133
|
+
RUN mkdir -p /app/sessions /app/deliverables /app/repos /app/configs /app/audit-logs && \
|
|
134
|
+
mkdir -p /tmp/.cache /tmp/.config /tmp/.npm && \
|
|
135
|
+
chown -R pentest:pentest /app && \
|
|
136
|
+
chmod 755 /app && \
|
|
137
|
+
chmod 770 /app/sessions /app/deliverables /app/repos /app/audit-logs && \
|
|
138
|
+
chmod 777 /tmp/.cache /tmp/.config /tmp/.npm
|
|
139
|
+
|
|
140
|
+
# Switch to non-root user
|
|
141
|
+
USER pentest
|
|
142
|
+
|
|
143
|
+
# Set environment variables
|
|
144
|
+
ENV NODE_ENV=production
|
|
145
|
+
ENV PATH="/usr/local/bin:$PATH"
|
|
146
|
+
ENV TALON_DOCKER=true
|
|
147
|
+
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
148
|
+
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
149
|
+
ENV npm_config_cache=/tmp/.npm
|
|
150
|
+
ENV HOME=/tmp
|
|
151
|
+
ENV XDG_CACHE_HOME=/tmp/.cache
|
|
152
|
+
ENV XDG_CONFIG_HOME=/tmp/.config
|
|
153
|
+
|
|
154
|
+
# Configure Git identity and trust only known directories (not '*' — CVE-2022-24765)
|
|
155
|
+
RUN git config --global user.email "agent@localhost" && \
|
|
156
|
+
git config --global user.name "Pentest Agent" && \
|
|
157
|
+
git config --global --add safe.directory /repos && \
|
|
158
|
+
git config --global --add safe.directory /app
|
|
159
|
+
|
|
160
|
+
# Set entrypoint
|
|
161
|
+
ENTRYPOINT ["node", "dist/talon.js"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
FROM node:20-slim
|
|
2
|
+
|
|
3
|
+
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base \
|
|
4
|
+
&& rm -rf /var/lib/apt/lists/* \
|
|
5
|
+
&& npm install -g @musistudio/claude-code-router \
|
|
6
|
+
&& npm cache clean --force
|
|
7
|
+
|
|
8
|
+
RUN groupadd -r router && useradd -r -g router -m router
|
|
9
|
+
RUN mkdir -p /home/router/.claude-code-router && chown router:router /home/router/.claude-code-router
|
|
10
|
+
|
|
11
|
+
USER router
|
|
12
|
+
WORKDIR /home/router
|
|
13
|
+
|
|
14
|
+
COPY --chown=router:router entrypoint-router.sh /entrypoint.sh
|
|
15
|
+
|
|
16
|
+
ENTRYPOINT ["/entrypoint.sh"]
|