{"html_url": "https://github.com/simonw/datasette/issues/514#issuecomment-509480062", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/514", "id": 509480062, "node_id": "MDEyOklzc3VlQ29tbWVudDUwOTQ4MDA2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-09T04:15:11Z", "updated_at": "2019-07-09T04:15:11Z", "author_association": "OWNER", "body": "Running as root isn't ideal because it means that if there are any security vulnerabilities in Datasette an attacker could use them to execute any command they like as root on your machine.\r\n\r\nI'm moderately confident there aren't any vulnerabilities like that, but I'm definite not 100% certain!\r\n\r\nMy recommendation is to run Datasette on 127.0.0.1 port 8001 and then have nginx proxy port 80 to it. See https://github.com/simonw/datasette/issues/514#issuecomment-504663201 for suggested nginx configuration.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 459397625, "label": "Documentation with recommendations on running Datasette in production without using Docker"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/554#issuecomment-509618339", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/554", "id": 509618339, "node_id": "MDEyOklzc3VlQ29tbWVudDUwOTYxODMzOQ==", "user": {"value": 3243482, "label": "abdusco"}, "created_at": "2019-07-09T12:16:32Z", "updated_at": "2019-07-09T12:16:32Z", "author_association": "CONTRIBUTOR", "body": "I've also added another fix for using static mounts with absolute paths on Windows. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465728430, "label": "Fix static mounts using relative paths and prevent traversal exploits"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/554#issuecomment-509629331", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/554", "id": 509629331, "node_id": "MDEyOklzc3VlQ29tbWVudDUwOTYyOTMzMQ==", "user": {"value": 3243482, "label": "abdusco"}, "created_at": "2019-07-09T12:51:35Z", "updated_at": "2019-07-09T12:51:35Z", "author_association": "CONTRIBUTOR", "body": "I wanted to add a test for it too, but I've realized it's impossible to test a server process as we cannot get its exit code.\r\n\r\n```python\r\n# tests/test_cli.py\r\ndef test_static_mounts_on_windows():\r\n if sys.platform != \"win32\":\r\n return\r\n runner = CliRunner()\r\n result = runner.invoke(\r\n cli, [\"serve\", \"--static\", r\"s:C:\\\\\"]\r\n )\r\n assert result.exit_code == 0\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465728430, "label": "Fix static mounts using relative paths and prevent traversal exploits"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/37#issuecomment-509685610", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/37", "id": 509685610, "node_id": "MDEyOklzc3VlQ29tbWVudDUwOTY4NTYxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-09T15:16:52Z", "updated_at": "2019-07-09T15:16:52Z", "author_association": "OWNER", "body": "Also interesting:\r\n```\r\npip install pytest-mypy\r\npytest --mypy\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465815372, "label": "Experiment with type hints"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/37#issuecomment-509686432", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/37", "id": 509686432, "node_id": "MDEyOklzc3VlQ29tbWVudDUwOTY4NjQzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-07-09T15:18:49Z", "updated_at": "2019-07-09T15:18:49Z", "author_association": "OWNER", "body": "Interestingly if I run that against my `monkeytype` branch I get the following errors (subset):\r\n```\r\n_______________________________________________________________________________________ mypy db.py ________________________________________________________________________________________\r\nsqlite_utils/db.py:15: error: No library stub file for module 'numpy'\r\nsqlite_utils/db.py:15: note: (Stub files are from https://github.com/python/typeshed)\r\nsqlite_utils/db.py:197: error: Incompatible types in assignment (expression has type \"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], Dict[, ]]\", variable has type \"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], None]\")\r\nsqlite_utils/db.py:204: error: Item \"None\" of \"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], None]\" has no attribute \"__iter__\" (not iterable)\r\nsqlite_utils/db.py:206: error: Argument 1 to \"set\" has incompatible type \"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], None]\"; expected \"Iterable[str]\"\r\nsqlite_utils/db.py:211: error: Item \"None\" of \"Optional[Tuple[str, str, str]]\" has no attribute \"index\"\r\nsqlite_utils/db.py:211: error: Unsupported right operand type for in (\"Optional[Tuple[str, str, str]]\")\r\nsqlite_utils/db.py:232: error: Unsupported right operand type for in (\"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], None]\")\r\nsqlite_utils/db.py:234: error: Value of type \"Union[Dict[str, int], Dict[str, Union[int, str]], Dict[str, str], None]\" is not indexable\r\nsqlite_utils/db.py:307: error: Need type annotation for 'table_sql' (hint: \"table_sql: Dict[, ] = ...\")\r\nsqlite_utils/db.py:427: error: Item \"int\" of \"Union[int, None, str]\" has no attribute \"startswith\"\r\nsqlite_utils/db.py:427: error: Item \"None\" of \"Union[int, None, str]\" has no attribute \"startswith\"\r\nsqlite_utils/db.py:434: error: Incompatible types in assignment (expression has type \"List[Any]\", target has type \"int\")\r\nsqlite_utils/db.py:438: error: Incompatible types in assignment (expression has type \"object\", target has type \"int\")\r\nsqlite_utils/db.py:670: error: Need type annotation for 'all_column_types' (hint: \"all_column_types: Dict[, ] = ...\")\r\nsqlite_utils/db.py:757: error: Incompatible types in assignment (expression has type \"List[Any]\", variable has type \"chain[Any]\")\r\nsqlite_utils/db.py:761: error: Argument 1 to \"create\" of \"Table\" has incompatible type \"Dict[str, Union[Type[str], Type[int], Type[bool], Type[time], Type[float]]]\"; expected \"Dict[str, Union[Type[str], Type[int], Type[bool], Type[time]]]\"\r\nsqlite_utils/db.py:770: error: Need type annotation for 'all_columns' (hint: \"all_columns: Set[] = ...\")\r\nsqlite_utils/db.py:773: error: Incompatible types in assignment (expression has type \"List[Any]\", variable has type \"Set[Any]\")\r\nsqlite_utils/db.py:775: error: \"Set[Any]\" has no attribute \"insert\"\r\nsqlite_utils/db.py:797: error: Need type annotation for 'values' (hint: \"values: List[] = ...\")\r\nsqlite_utils/db.py:811: error: Argument 1 to \"add_missing_columns\" of \"Table\" has incompatible type \"chain[Any]\"; expected \"Union[List[Union[Dict[str, Union[int, str]], Dict[str, Union[int, str, List[str]]]]], List[Dict[str, Union[str, int, float]]], List[Dict[str, Union[int, str]]]]\"\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465815372, "label": "Experiment with type hints"}, "performed_via_github_app": null}