fix: resolve Docker build failure and clarify env var configuration

- Remove .env file with incorrect CLAUDE_CODE_MAX_TOKENS variable
- Remove .env copy from Dockerfile that was causing build to fail
- Update README to distinguish local (export) vs Docker (-e) env var usage
- Add CLAUDE_CODE_MAX_OUTPUT_TOKENS to all Docker run examples

The correct variable is CLAUDE_CODE_MAX_OUTPUT_TOKENS (not CLAUDE_CODE_MAX_TOKENS)
and should be passed at runtime via -e flag for Docker or export for local runs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ajmallesh
2025-11-19 10:28:44 -08:00
parent d2519322d2
commit 5bbd757b45
3 changed files with 9 additions and 9 deletions

5
.env
View File

@@ -1,5 +0,0 @@
# CLAUDE_CODE_MAX_TOKENS controls the maximum token limit for Claude Code sessions
# This is used by the Claude Agent SDK to set the context window size for AI analysis
# Higher values allow for more comprehensive code analysis but consume more tokens
# Default: 64000 tokens (sufficient for most penetration testing tasks)
CLAUDE_CODE_MAX_TOKENS=64000

View File

@@ -109,7 +109,6 @@ WORKDIR /app
# Copy package.json and package-lock.json first for better caching
COPY package*.json ./
COPY .env ./.env
# Install Node.js dependencies as root
RUN npm ci --only=production && \

View File

@@ -107,15 +107,19 @@ Shannon is available in two editions:
You need either a **Claude Code OAuth token** or an **Anthropic API key** to run Shannon. Get your token from the [Anthropic Console](https://console.anthropic.com) and pass it to Docker via the `-e` flag.
### Environment Configuration (Optional)
### Environment Configuration (Recommended)
To prevent Claude Code from hitting token limits during long report generation, set the max output tokens before running Shannon:
To prevent Claude Code from hitting token limits during long report generation, set the max output tokens environment variable:
**For local runs:**
```bash
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
```
This is especially useful for extensive penetration testing reports or when analyzing large codebases.
**For Docker runs:**
```bash
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
```
### Quick Start with Docker
@@ -164,6 +168,7 @@ docker run --rm -it \
--cap-add=NET_RAW \
--cap-add=NET_ADMIN \
-e CLAUDE_CODE_OAUTH_TOKEN="$CLAUDE_CODE_OAUTH_TOKEN" \
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 \
-v "$(pwd)/repos:/app/repos" \
-v "$(pwd)/configs:/app/configs" \
shannon:latest \
@@ -180,6 +185,7 @@ docker run --rm -it \
--cap-add=NET_RAW \
--cap-add=NET_ADMIN \
-e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 \
-v "$(pwd)/repos:/app/repos" \
-v "$(pwd)/configs:/app/configs" \
shannon:latest \