Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
secret_key = os.environ.get("SECRET_KEY")if not secret_key: raise ValueError("SECRET_KEY required")
SQL インジェクション対策
SQL 文字列を連結しない
ORM (SQLAlchemy) またはパラメータ化クエリを使用
# 良い例: パラメータ化cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))# 悪い例: 連結cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
CORS 設定
CORS(app) を無制限で使用しない
オリジンを明示的にホワイトリストする
from flask_cors import CORSCORS(app, origins=["https://example.com"])
依存パッケージの脆弱性チェック
Dependabot を有効化 (.github/dependabot.yml)
uv run pip-audit を定期実行
CI パイプラインでマージ前に実行
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/sugiyama404-practice-githubcopilot-prompt-security-instructions/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.