Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detect-llm-api-keys

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-llm-api-keys

scan python files for llm api keys (designed for pre-commit)

  • 0.0.3
  • PyPI
  • Socket score

Maintainers
1

detect_llm_api_keys

scan python files for llm api keys (designed for pre-commit)

License: MIT python

Publish to PyPI GitHub tag (with filter) Read the Docs

Code Climate maintainability Code Climate issues Code Climate technical debt coverage

pre-commit Ruff Checked with mypy Code style: black

security: bandit Known Vulnerabilities

🤖 This README was written by GPT-4. 🤖

Introduction

detect_llm_api_keys is a vital tool for Python developers, especially those working with large language models (LLMs). It's a pre-commit hook that efficiently scans your Python files to detect and prevent the accidental committing of LLM API keys, enhancing the security of your projects.

Features

  • Efficient API Key Detection: Scans for keys from major providers like Anthropic, Anyscale, Microsoft Azure, LangChain, OpenAI, and Mistral AI.
  • Easy Integration: Seamlessly integrates with your existing Python projects.
  • Support for Various API Key Patterns: Recognizes a range of patterns, ensuring comprehensive protection.
  • Compatibility with nosec and noqa Comments: Respects your code's existing security annotations.

Getting Started

  1. Installation: Add detect_llm_api_keys to your .pre-commit-config.yaml file.
  2. Configuration: Customize the settings as per your project requirements.
  3. Usage: Automatically scans files upon each commit, flagging potential API key exposures.

Usage

To use detect_llm_api_keys in your project, update your .pre-commit-config.yaml as follows:

repos:
-   repo: https://github.com/joshuasundance-swca/detect_llm_api_keys
    rev: "0.0.3"
    hooks:
    -   id: detect-llm-api-keys

Collaboration and Contributions

Feedback, suggestions, and contributions are highly welcomed to enhance detect_llm_api_keys. Please feel free to open issues or submit pull requests on GitHub.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Special thanks to the Python and Open Source communities for their invaluable support and contributions.

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc