Skip to main content

Datasette plugin to expose some environment variables at /-/env for debugging

Project description

datasette-unsafe-expose-env

PyPI Changelog Tests License

Datasette plugin to expose some environment variables at /-/env - for debugging

:warning: This plugin is extremely unsafe: it could expose secrets! - Only install this if you are absolutely sure you understand the consequences of doing so.

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-unsafe-expose-env

Usage

Once installed, the plugin will show a list of environment variables at /-/env

It will redact the following variables by default:

  • DATABASE_URL
  • GPG_KEY
  • DATASETTE_SECRET

You can configure an alternative set of redacted secrets in your metadata.yml configuration:

plugins:
  datasette-unsafe-expose-env:
    redact:
    - DATASETTE_SECRET
    - GPG_KEY
    - MY_OTHER_SECRET

Once again though: only use this plugin if you need it for debugging purposes and are absolutely certain it won't expose any valuable information. If in doubt, do not use this at all.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-unsafe-expose-env
python3 -mvenv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-unsafe-expose-env-0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

datasette_unsafe_expose_env-0.1-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page