semvec/pypi-packages huggingface dataset:
secrets-hunter 0.3.0
Detect secrets and sensitive information in your codebase
Requires Python: >=3.11
Keywords: security, secrets, scanner, git, ci

# Secrets Hunter

[![PyPI](badges/pypi.svg)](https://pypi.org/project/secrets-hunter/)
[![Python](badges/python.svg)](https://python.org/)

**Secrets Hunter** is a lightweight, fully autonomous, and dependency-free scanner that detects secrets and sensitive information in your codebase.

The scanner provides a **command-line interface** (CLI) and is designed for use both locally (as a linter) and in security pipelines (as a security gate).

## Features

Findings are detected using a combined **regex** and **entropy** approach:

- **Pattern-based detection**: Identifies predefined secret formats (API keys, tokens, etc.)
- **Entropy-based detection**: Finds high-entropy strings

Each high-entropy finding gets a **confidence boost** if it is detected in the context of an assignment or key/value pair with keywords, 
assuming a secret (e.g., `API_KEY=...`, `"secret_token": "..."`, etc.). 

All of these patterns are fully configurable via TOML config overlays (see [Configuration](#configuration)).

**Secrets Hunter** supports parallel scanning with configurable workers. Output findings can be displayed in console output or exported to a JSON file.

## Installation

> **Requirements:** Python 3.11+

### From PyPI

```bash
pip install secrets-hunter
```

### From source

1) Clone this repository

```bash
git clone https://github.com/FVLCN/secrets-hunter.git secrets-hunter
cd secrets-hunter
```

2) Activate virtual environment (macOS and Linux)

```bash
python -m venv venv
source venv/bin/activate
```

3) Build and install package

```bash
pip install -e .
```

## Quick start

Scan the current directory:

```bash
secrets-hunter .
```

Findings are masked by default. To reveal them, use the `--reveal-findings` flag:

```bash
secrets-hunter . --reveal-findings
```

Scan a specific file:

```bash
secrets-hunter path/to/file.py
```

Export results to JSON:

```bash
secrets-hunter . --json results.json
```

See the [Usage docs](docs/usage.md) for all flags and more examples.

## Configuration

Secrets Hunter ships with built-in packaged defaults. You can display them using CLI:
```bash
secrets-hunter showconfig
```

Configuration can be customized using overlay config files. Example (team baseline overlay):
```bash
secrets-hunter . --config team.toml
```

Multiple overlays are applied **in the order provided**:
```bash
secrets-hunter . --config ci.toml --config local.toml
```

A full description and usage examples are available in [Configuration docs](docs/config.md).

## License

MIT

## Acknowledgment

This project was made possible by [whitespots.io](https://whitespots.io)
hoa_utils_redux 0.2.0
A slightly updated fork of `hoa_utils`. Utilities for the HOA format.
Requires Python: <4.0,>=3.8
Keywords: HOA, HOA-format, automata

## Disclaimer

This repository is a fork of `hoa-utils` (https://github.com/whitemech/hoa-utils).
I sincerely hope the (limited) changes I suggest are merged upstream. In case this
happens, I will archive the repository/PyPI package and redirect users towards the
upstream repo.

## Original README.md

Utilities for the HOA format.

## Install

The best way is to install the package from PyPI:
```
pip install hoa-utils
```

Alternatively, you can install it from source (master branch):
```
pip install git+https://github.com/whitemech/hoa-utils.git
```

## What you'll find

- APIs to create and manipulate HOA objects
- CLI tools to about the HOA format.

The implementation may not be very stable at the moment.

Currently, the only supported CLI tool is:
- `pyhoafparser`: parse and validate a file in HOA format. 


## Development

If you want to contribute, here's how to set up your development environment.

- Install [Poetry](https://python-poetry.org/)
- Clone the repository: `git clone https://github.com/whitemech/hoa-utils.git && cd hoa-utils`
- Install the dependencies: `poetry install`

## Tests

To run tests: `tox`

To run only the code tests: `tox -e py3.7`

To run only the code style checks:
 - `tox -e black-check`
 - `tox -e isort-check`
 - `tox -e flake8`
 
 In `tox.ini` you can find all the test environment supported.

## Docs

To build the docs: `mkdocs build`

To view documentation in a browser: `mkdocs serve`
and then go to [http://localhost:8000](http://localhost:8000)

## Authors

- [Marco Favorito](https://marcofavorito.github.io/)
- [Francesco Fuggitti](https://francescofuggitti.github.io/)

## License

`hoa-utils` is released under the MIT License.

Copyright 2020 WhiteMech