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 lines290291292293293294295296289 unmodified lines flask_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) flask_app.run(host="0.0.0.0", port=port, debug=False) # nosec B104
if __name__ == "__main__":253 unmodified lines254255256257257258259260253 unmodified lines serve_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("--host", default="0.0.0.0") # nosec B104 serve_parser.add_argument( "--no-workers", action="store_true", help="Disable background worker threads" )649 unmodified lines6506516526536536546556563099 unmodified lines37563757375837593759376037613762649 unmodified lines chunk_delete = to_delete[i : i + 50] format_strings = ",".join(["?"] * len(chunk_delete)) cursor.execute( f"DELETE FROM kv_store WHERE scope IN ({format_strings})", f"DELETE FROM kv_store WHERE scope IN ({format_strings})", # nosec B608 tuple(chunk_delete), ) conn.commit()3099 unmodified lines )
try: with urllib.request.urlopen(req, timeout=60.0) as response: with urllib.request.urlopen(req, timeout=60.0) as response: # nosec B310 resp_data = json.loads(response.read().decode("utf-8"))
candidates = resp_data.get("candidates", [])718 unmodified lines719720721722722723724725147 unmodified lines873874875876876877878879718 unmodified lines )
try: with urllib.request.urlopen(req, timeout=30.0) as response: with urllib.request.urlopen(req, timeout=30.0) as response: # nosec B310 resp_data = json.loads(response.read().decode("utf-8"))
for emb in resp_data.get("embeddings", []):147 unmodified lines method="POST", ) try: with urllib.request.urlopen(req, timeout=30.0) as response: with urllib.request.urlopen(req, timeout=30.0) as response: # nosec B310 resp_data = json.loads(response.read().decode("utf-8")) # Sort by index to preserve order embeddings_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