Spaces:
Configuration error
Configuration error
test: add SQL injection and path traversal unit tests, and integrate Bandit CI security scanning
Browse filesFiles changed (4)
289 unmodified lines290291292293294295296289 unmodified linesflask_app = create_app()port = int(os.getenv("III_REST_PORT", os.getenv("PORT", "3111")))print(f"[main] Starting Flask daemon on port {port}...")flask_app.run(host="0.0.0.0", port=port, debug=False)if __name__ == "__main__":289 unmodified lines290291292293294295296289 unmodified linesflask_app = create_app()port = int(os.getenv("III_REST_PORT", os.getenv("PORT", "3111")))print(f"[main] Starting Flask daemon on port {port}...")flask_app.run(host="0.0.0.0", port=port, debug=False) # nosec B104if __name__ == "__main__":
253 unmodified lines254255256257258259260253 unmodified linesserve_parser.add_argument("--port", type=int, default=int(os.getenv("III_REST_PORT", "3111")))serve_parser.add_argument("--host", default="0.0.0.0")serve_parser.add_argument("--no-workers", action="store_true", help="Disable background worker threads")253 unmodified lines254255256257258259260253 unmodified linesserve_parser.add_argument("--port", type=int, default=int(os.getenv("III_REST_PORT", "3111")))serve_parser.add_argument("--host", default="0.0.0.0") # nosec B104serve_parser.add_argument("--no-workers", action="store_true", help="Disable background worker threads")
649 unmodified lines6506516526536546556563099 unmodified lines3756375737583759376037613762649 unmodified lineschunk_delete = to_delete[i : i + 50]format_strings = ",".join(["?"] * len(chunk_delete))cursor.execute(f"DELETE FROM kv_store WHERE scope IN ({format_strings})",tuple(chunk_delete),)conn.commit()3099 unmodified lines)try:with urllib.request.urlopen(req, timeout=60.0) as response:resp_data = json.loads(response.read().decode("utf-8"))candidates = resp_data.get("candidates", [])649 unmodified lines6506516526536546556563099 unmodified lines3756375737583759376037613762649 unmodified lineschunk_delete = to_delete[i : i + 50]format_strings = ",".join(["?"] * len(chunk_delete))cursor.execute(f"DELETE FROM kv_store WHERE scope IN ({format_strings})", # nosec B608tuple(chunk_delete),)conn.commit()3099 unmodified lines)try:with urllib.request.urlopen(req, timeout=60.0) as response: # nosec B310resp_data = json.loads(response.read().decode("utf-8"))candidates = resp_data.get("candidates", [])
718 unmodified lines719720721722723724725147 unmodified lines873874875876877878879718 unmodified lines)try:with urllib.request.urlopen(req, timeout=30.0) as response:resp_data = json.loads(response.read().decode("utf-8"))for emb in resp_data.get("embeddings", []):147 unmodified linesmethod="POST",)try:with urllib.request.urlopen(req, timeout=30.0) as response:resp_data = json.loads(response.read().decode("utf-8"))# Sort by index to preserve orderembeddings_sorted = sorted(718 unmodified lines719720721722723724725147 unmodified lines873874875876877878879718 unmodified lines)try:with urllib.request.urlopen(req, timeout=30.0) as response: # nosec B310resp_data = json.loads(response.read().decode("utf-8"))for emb in resp_data.get("embeddings", []):147 unmodified linesmethod="POST",)try:with urllib.request.urlopen(req, timeout=30.0) as response: # nosec B310resp_data = json.loads(response.read().decode("utf-8"))# Sort by index to preserve orderembeddings_sorted = sorted(
src/agentcache/app.py+1-1
src/agentcache/cli.py+1-1
src/agentcache/functions.py+2-2
src/agentcache/search.py+2-2