Skip to content

Commit a2e9a59

Browse files
john-walkoeclaude
andcommitted
Release 2026-09-03b: CI secret-history scan fix, dependency refresh (FastMCP 4, MCP 2026-07-28)
USPTO Final Petition Decisions MCP server: petition search by application, art unit and criteria, petition details, document content and downloads. Example application 17896175 (no petitions) replaced with 17414168; the accepted identifier forms now match the validator (digits and slash only). Updated to FastMCP 4.0.1 on the MCP Python SDK 2.x, speaking the 2026-07-28 MCP protocol revision (MCP Apps now import from fastmcp.apps; a compat shim restores defer_loading on the wire). Security and robustness pass from the 2026-09-03 review: INTERNAL_AUTH_SECRET rotation overlap window with per-purpose derived keys, bounded request bodies, archives and PDF buffers, USPTO-authored text escaped before it reaches the view HTML, response-size guard with paging markers on every tool, shared cross-process USPTO rate limiter, health checks that can actually fail. Documentation refresh: every example application, patent and proceeding number verified live against the USPTO API and rewritten in the form the identifier resolver expects; stale tool counts, env-var tables and response shapes fixed. Removed the cost and spend wording around OCR; the extraction tiers are now described by capability (native text layer first, OCR for scanned pages) and a self-hosted Docling backend can be configured via DOCLING_SERVE_URL. Secrets and prompt-injection baselines regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CeSWJpSaEHe9Cx66xzahVV
1 parent 95b0aa2 commit a2e9a59

3 files changed

Lines changed: 126 additions & 118 deletions

File tree

.github/workflows/secret-scan.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,25 @@ jobs:
3838
3939
- name: Check for secrets in git history (last 100 commits)
4040
run: |
41-
# Scan recent git history for accidentally committed secrets.
42-
# detect-secrets exits 0 even when it finds something, so the results
43-
# are inspected explicitly instead of being discarded with `|| true`.
44-
git log --all --pretty=format: -p -100 | \
45-
detect-secrets scan --stdin \
46-
--exclude-files 'configs/.*\.json' \
47-
--exclude-files '\.md$' \
48-
--exclude-files '\.baseline$' > history-scan.json
41+
# detect-secrets 1.5 has no stdin mode, so the recent history is written to a
42+
# file first. Baseline files, lock files and markdown are left out of the diff;
43+
# a finding whose hash is already in .secrets.baseline is a known placeholder.
44+
git log --all --pretty=format: -p -100 -- . ':!*.baseline' ':!*.lock' ':!*.md' > history.diff
45+
detect-secrets scan --exclude-files 'configs/.*\.json' history.diff > history-scan.json
4946
python - history-scan.json <<'PY'
5047
import json, sys
48+
known = {f.get("hashed_secret")
49+
for fs in json.load(open(".secrets.baseline")).get("results", {}).values()
50+
for f in fs}
5151
results = json.load(open(sys.argv[1])).get("results", {})
52-
for path, findings in results.items():
53-
for finding in findings:
54-
print(f"{path}:{finding.get('line_number')} {finding.get('type')}")
55-
if results:
56-
sys.exit("Secrets detected in git history")
57-
print("No secrets detected in git history")
52+
new = [(p, f.get("line_number"), f.get("type"))
53+
for p, fs in results.items() for f in fs
54+
if f.get("hashed_secret") not in known]
55+
for path, line, kind in new:
56+
print(f"{path}:{line} {kind}")
57+
if new:
58+
sys.exit("Secrets detected in git history that are not in the baseline")
59+
print("No new secrets detected in git history")
5860
PY
5961
6062
- name: Security scan summary

.github/workflows/security-scan.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,25 @@ jobs:
3838
3939
- name: Check for secrets in git history (last 100 commits)
4040
run: |
41-
# Scan recent git history for accidentally committed secrets.
42-
# detect-secrets exits 0 even when it finds something, so the results
43-
# are inspected explicitly instead of being discarded with `|| true`.
44-
git log --all --pretty=format: -p -100 | \
45-
detect-secrets scan --stdin \
46-
--exclude-files 'configs/.*\.json' \
47-
--exclude-files '\.md$' \
48-
--exclude-files '\.baseline$' > history-scan.json
41+
# detect-secrets 1.5 has no stdin mode, so the recent history is written to a
42+
# file first. Baseline files, lock files and markdown are left out of the diff;
43+
# a finding whose hash is already in .secrets.baseline is a known placeholder.
44+
git log --all --pretty=format: -p -100 -- . ':!*.baseline' ':!*.lock' ':!*.md' > history.diff
45+
detect-secrets scan --exclude-files 'configs/.*\.json' history.diff > history-scan.json
4946
python - history-scan.json <<'PY'
5047
import json, sys
48+
known = {f.get("hashed_secret")
49+
for fs in json.load(open(".secrets.baseline")).get("results", {}).values()
50+
for f in fs}
5151
results = json.load(open(sys.argv[1])).get("results", {})
52-
for path, findings in results.items():
53-
for finding in findings:
54-
print(f"{path}:{finding.get('line_number')} {finding.get('type')}")
55-
if results:
56-
sys.exit("Secrets detected in git history")
57-
print("No secrets detected in git history")
52+
new = [(p, f.get("line_number"), f.get("type"))
53+
for p, fs in results.items() for f in fs
54+
if f.get("hashed_secret") not in known]
55+
for path, line, kind in new:
56+
print(f"{path}:{line} {kind}")
57+
if new:
58+
sys.exit("Secrets detected in git history that are not in the baseline")
59+
print("No new secrets detected in git history")
5860
PY
5961
6062
- name: Security scan summary

0 commit comments

Comments
 (0)