Skip to content

Commit 37e1a8c

Browse files
committed
Initial import – clean copy (no history)
0 parents  commit 37e1a8c

File tree

118 files changed

+31326
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+31326
-0
lines changed

.env.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# USPTO API Key (required)
2+
# Get your key at: https://developer.uspto.gov/api-catalog
3+
USPTO_API_KEY=your_uspto_api_key_here
4+
5+
# Mistral API Key (required for OCR document content extraction)
6+
# Get your key at: https://console.mistral.ai/
7+
MISTRAL_API_KEY=your_mistral_api_key_here
8+
9+
# Proxy Configuration
10+
# Local proxy port (PTAB proxy runs on this port)
11+
PTAB_PROXY_PORT=8083
12+
PROXY_PORT=8083
13+
14+
# Centralized proxy port (set to "none" for standalone mode)
15+
# When using PFW centralized proxy, set to 8080
16+
CENTRALIZED_PROXY_PORT=none
17+
18+
# Internal authentication secret (shared across PFW/FPD/PTAB/Citations MCPs)
19+
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
20+
INTERNAL_AUTH_SECRET=your_shared_secret_here
21+
22+
# Enable always-on proxy (start proxy server automatically on MCP startup)
23+
ENABLE_ALWAYS_ON_PROXY=true
24+
25+
# Logging configuration
26+
LOG_LEVEL=INFO
27+
STRUCTURED_LOGGING=true

.gitignore

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Virtual environments
25+
.env
26+
.venv
27+
env/
28+
venv/
29+
ENV/
30+
env.bak/
31+
venv.bak/
32+
33+
# IDE
34+
.vscode/
35+
.idea/
36+
*.swp
37+
*.swo
38+
*~
39+
40+
# OS
41+
.DS_Store
42+
.DS_Store?
43+
._*
44+
.Spotlight-V100
45+
.Trashes
46+
ehthumbs.db
47+
Thumbs.db
48+
49+
# API Keys and Secrets (IMPORTANT!)
50+
*api_key*
51+
*API_KEY*
52+
# Exception for API key management scripts (no actual keys)
53+
!*manage_api_keys*
54+
# Exception for API key documentation (no actual keys)
55+
!API_KEY_GUIDE.md
56+
*.key
57+
secrets.json
58+
.env.local
59+
.env.production
60+
.env.*
61+
# Exception for .env.example (template file, no actual keys)
62+
!.env.example
63+
64+
# Local Claude Desktop configs with real API keys
65+
claude_desktop_config_local.json
66+
config_with_keys.json
67+
68+
# Test files with API keys
69+
test_with_real_keys.py
70+
71+
# Backup files that might contain sensitive data
72+
*_backup.json
73+
*_backup.txt
74+
api_key_backup.txt
75+
76+
# Logs that might contain API keys
77+
*.log
78+
logs/
79+
80+
# Temporary files
81+
*.tmp
82+
*.temp
83+
.cache/
84+
*_clean_temp.py
85+
*_backup_*.py
86+
tmpclaude-*
87+
88+
# Claude Code integration
89+
.claude/
90+
.mcp.json
91+
92+
# Additional security patterns
93+
*local*.json
94+
*_with_keys*
95+
*_secrets*
96+
config_real.json
97+
98+
# Project specific files to exclude (per user request)
99+
patent-data-schema.json
100+
CLAUDE.md
101+
102+
# Session history and planning documents
103+
Claude_Documents/
104+
105+
# Test artifacts and archives
106+
tests/archive/
107+
test_download.pdf
108+
109+
# Debug and development scripts output
110+
scripts/debug/__pycache__/
111+
scripts/__pycache__/
112+
113+
# Runtime generated databases and encryption keys
114+
proxy_link_cache.db
115+
.proxy_encryption_key
116+
*.db-journal
117+
*.db-wal
118+
fpd_documents.db
119+
test_fpd_documents.db
120+
ptab_documents.db
121+
test_ptab_documents.db
122+
123+
# Audit reports (generated during development)
124+
audits/
125+
126+
# Testing
127+
.tox/
128+
.coverage
129+
.coverage.*
130+
nosetests.xml
131+
coverage.xml
132+
*.cover
133+
.hypothesis/
134+
.pytest_cache/
135+
136+
# Security
137+
.security/__pycache__/
138+
139+
# uv lock file (can be regenerated)
140+
uv.lock

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Pre-commit hooks for PTAB MCP
2+
# Install: pip install pre-commit && pre-commit install
3+
# Run manually: pre-commit run --all-files
4+
5+
repos:
6+
- repo: https://github.com/Yelp/detect-secrets
7+
rev: v1.5.0
8+
hooks:
9+
- id: detect-secrets
10+
args:
11+
- '--baseline'
12+
- '.secrets.baseline'
13+
- '--exclude-files'
14+
- 'configs/.*\.json'
15+
- '--exclude-files'
16+
- '\.md$'
17+
- '--exclude-files'
18+
- 'package-lock\.json'
19+
exclude: ^\.secrets\.baseline$
20+
21+
- repo: https://github.com/pre-commit/pre-commit-hooks
22+
rev: v4.5.0
23+
hooks:
24+
- id: trailing-whitespace
25+
exclude: ^\.secrets\.baseline$
26+
- id: end-of-file-fixer
27+
exclude: ^\.secrets\.baseline$
28+
- id: check-yaml
29+
- id: check-added-large-files
30+
args: ['--maxkb=1000']
31+
- id: check-json
32+
exclude: ^configs/.*\.json$ # Allow placeholder keys in example configs
33+
- id: check-merge-conflict
34+
- id: detect-private-key
35+
36+
- repo: local
37+
hooks:
38+
- id: prompt-injection-check
39+
name: Check for prompt injection patterns
40+
entry: uv run python .security/check_prompt_injections.py
41+
language: system
42+
files: \.(py|txt|md|yml|yaml|json|js|ts|html|xml|csv)$
43+
exclude: \.security/.*_detector\.py$

.prompt_injections.baseline

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.secrets.baseline

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"version": "1.5.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "GitLabTokenDetector"
31+
},
32+
{
33+
"name": "HexHighEntropyString",
34+
"limit": 3.0
35+
},
36+
{
37+
"name": "IbmCloudIamDetector"
38+
},
39+
{
40+
"name": "IbmCosHmacDetector"
41+
},
42+
{
43+
"name": "IPPublicDetector"
44+
},
45+
{
46+
"name": "JwtTokenDetector"
47+
},
48+
{
49+
"name": "KeywordDetector",
50+
"keyword_exclude": ""
51+
},
52+
{
53+
"name": "MailchimpDetector"
54+
},
55+
{
56+
"name": "NpmDetector"
57+
},
58+
{
59+
"name": "OpenAIDetector"
60+
},
61+
{
62+
"name": "PrivateKeyDetector"
63+
},
64+
{
65+
"name": "PypiTokenDetector"
66+
},
67+
{
68+
"name": "SendGridDetector"
69+
},
70+
{
71+
"name": "SlackDetector"
72+
},
73+
{
74+
"name": "SoftlayerDetector"
75+
},
76+
{
77+
"name": "SquareOAuthDetector"
78+
},
79+
{
80+
"name": "StripeDetector"
81+
},
82+
{
83+
"name": "TelegramBotTokenDetector"
84+
},
85+
{
86+
"name": "TwilioKeyDetector"
87+
}
88+
],
89+
"filters_used": [
90+
{
91+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92+
},
93+
{
94+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95+
"min_level": 2
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_lock_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108+
},
109+
{
110+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
111+
},
112+
{
113+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114+
},
115+
{
116+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
117+
},
118+
{
119+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
120+
},
121+
{
122+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123+
},
124+
{
125+
"path": "detect_secrets.filters.regex.should_exclude_file",
126+
"pattern": [
127+
"\\.secrets\\.baseline"
128+
]
129+
}
130+
],
131+
"results": {
132+
"tests\\test_deployment.py": [
133+
{
134+
"type": "Base64 High Entropy String",
135+
"filename": "tests\\test_deployment.py",
136+
"hashed_secret": "e4b7bc9d337f4b83fbc9df8bb89a391a2546d1a3",
137+
"is_verified": false,
138+
"line_number": 39
139+
}
140+
],
141+
"tests\\test_proxy_integration.py": [
142+
{
143+
"type": "Secret Keyword",
144+
"filename": "tests\\test_proxy_integration.py",
145+
"hashed_secret": "3b979f2676df7070a7c8d6038463fa61759ee8fb",
146+
"is_verified": false,
147+
"line_number": 191
148+
},
149+
{
150+
"type": "Secret Keyword",
151+
"filename": "tests\\test_proxy_integration.py",
152+
"hashed_secret": "00942f4668670f34c5943cf52c7ef3139fe2b8d6",
153+
"is_verified": false,
154+
"line_number": 210
155+
}
156+
]
157+
},
158+
"generated_at": "2026-01-19T04:59:40Z"
159+
}

0 commit comments

Comments
 (0)