Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
datasette-cookies-for-magic-parameters
Advanced tools
UI for setting cookies to populate magic parameters
Install this plugin in the same environment as Datasette.
datasette install datasette-cookies-for-magic-parameters
This plugin only affects canned queries. If you have a canned query configured like this:
databases:
mydatabase:
queries:
api_query:
sql: select 'Your API key is' || :_cookie_openai_api_token;
Then the /mydatabase/api_query
page will include a new interface for setting the openapi_api_token
cookie, or unsetting it if it has already been set.
This plugin was initially developed to use with datasette-openai - a plugin that provides custom SQL functions that take an API token as one of their parameters.
Passing these API tokens in a GET query string is unsafe, as they may leak through referrers or other log files.
Instead, this plugin enables them to be set and passed using a cookie, which is much less likely to be logged.
This pattern takes advantage of the :_cookie_x
feature of Datasette's magic parameters mechanism.
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-cookies-for-magic-parameters
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
FAQs
UI for setting cookies to populate magic parameters
We found that datasette-cookies-for-magic-parameters demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.