Image rights / copyright detection system: SQLite store, HTTP app, search integrations (Naver, Google Custom Search, Google Cloud Vision web detection), image analysis (fingerprints, face/person detection, evidence enrichment, risk scoring), an admin/review layer, governance and retention policies, batch jobs, and a browser-based operator GUI. This baseline incorporates a full code-review remediation pass (46 fixes; 358 tests passing). Highlights: CRITICAL - Prevent evidence cascade-delete during the schema-constraint migration by disabling FK enforcement around the table rebuild. Security - Sandbox served media (neutralize stored XSS from uploaded/collected SVGs) via CSP + nosniff on the untrusted media routes. - Strip embedded EXIF/GPS from external image derivatives before they are sent to third-party APIs. - Return a clean 404 (not an uncaught StopIteration) for PATCH on an unknown provider. Correctness - LLM-summary failures no longer add +30 to the risk score. - Decode only explicit JS escapes so Korean image URLs are not mangled. - Consume search quota only after a successful request. - Naver/Google adapters map responses inside the failure boundary, so a malformed response degrades to evidence instead of crashing enrichment. - Domain-aware provider attribution; face-box IoU de-duplication; count searches (not result items); per-box crop isolation; clamp evidence confidence and Google CSE num; real submittedEpoch; and more. Robustness - Offline LLM connect fast-fails (short connect timeout) so seed/reload requests are not stalled; full read timeout preserved for generation. - Malformed numeric env vars fall back to defaults instead of crashing startup. Performance - Per-submission evidence reads (no full-table scan per rescore), audit-log LIMIT, lazy active-store lookup, hoisted timestamps. Tests - ~24 regression tests added pinning the above fixes. Runtime data (data/, outputs/, *.sqlite3, *.log), secrets (.env), and node_modules are gitignored.
41 lines
1.2 KiB
Text
41 lines
1.2 KiB
Text
NAVER_CLIENT_ID=
|
|
NAVER_CLIENT_SECRET=
|
|
NAVER_SEARCH_DISPLAY=10
|
|
NAVER_SEARCH_PAGES=1
|
|
NAVER_SEARCH_SORT=sim
|
|
NAVER_BLOG_SEARCH_DISPLAY=3
|
|
NAVER_BLOG_SEARCH_PAGES=1
|
|
NAVER_BLOG_SEARCH_SORT=sim
|
|
NAVER_WEB_SEARCH_DISPLAY=3
|
|
NAVER_WEB_SEARCH_PAGES=1
|
|
|
|
GOOGLE_CLOUD_VISION_API_KEY=
|
|
GOOGLE_CLOUD_VISION_PARENT=
|
|
COPYRIGHTER_GOOGLE_FACE_CROP_SEARCH=false
|
|
|
|
GOOGLE_CUSTOM_SEARCH_API_KEY=
|
|
GOOGLE_CUSTOM_SEARCH_CX=
|
|
GOOGLE_CUSTOM_SEARCH_IMAGE_RESULTS=3
|
|
GOOGLE_CUSTOM_SEARCH_IMAGE_PAGES=1
|
|
GOOGLE_CUSTOM_SEARCH_WEB_RESULTS=3
|
|
GOOGLE_CUSTOM_SEARCH_WEB_PAGES=1
|
|
|
|
COPYRIGHTER_AUTO_NAVER_QUERY_LIMIT=3
|
|
COPYRIGHTER_AUTO_NAVER_BLOG_QUERY_LIMIT=1
|
|
COPYRIGHTER_AUTO_NAVER_WEB_QUERY_LIMIT=1
|
|
COPYRIGHTER_AUTO_GOOGLE_CUSTOM_QUERY_LIMIT=2
|
|
COPYRIGHTER_SEARCH_RESULT_COMPARE_LIMIT=3
|
|
COPYRIGHTER_SEARCH_RESULT_PAGE_IMAGE_LIMIT=3
|
|
COPYRIGHTER_SEARCH_RESULT_SIMILARITY_THRESHOLD=0.9
|
|
COPYRIGHTER_COVERAGE_GOOD_THRESHOLD=70
|
|
COPYRIGHTER_COVERAGE_WARN_THRESHOLD=40
|
|
COPYRIGHTER_QUERY_COVERAGE_GOOD_THRESHOLD=70
|
|
COPYRIGHTER_QUERY_COVERAGE_WARN_THRESHOLD=40
|
|
|
|
COPYRIGHTER_NAVER_DAILY_LIMIT=100
|
|
COPYRIGHTER_GOOGLE_DAILY_LIMIT=100
|
|
COPYRIGHTER_GOOGLE_CUSTOM_SEARCH_DAILY_LIMIT=100
|
|
COPYRIGHTER_LLM_DAILY_LIMIT=100
|
|
|
|
OLLAMA_BASE_URL=http://localhost:11434
|
|
OLLAMA_MODEL=qwen2.5:0.5b-instruct
|