Skip to main content

issuebrief

CI PyPI Python License: MIT

Create a shareable GitHub Issue Markdown report from a command's output—locally, with best-effort redaction.

Before sharing, review every generated report yourself. Redaction is heuristic and cannot guarantee that every secret, personal detail, or sensitive path has been removed.

简体中文 README

In 30 seconds

python -m pip install issuebrief
issuebrief run --output issue.md -- python -m your_package --diagnose

Open issue.md, inspect it for sensitive material, then paste it into a GitHub Issue if it is safe to do so.

issuebrief never sends your command output anywhere: no network requests, no account, no telemetry, and no background service. It runs the command you explicitly provide and writes only the requested report.

Commands

Run and report

issuebrief run [OPTIONS] -- COMMAND...

The command runs without a shell. Its standard output, standard error, displayed command, and the current user's home path are passed through the built-in redactor before Markdown is written. Standard input is disabled by default so an unexpected prompt cannot silently block the run.

# Default output is issue-report.md
issuebrief run -- python -m pip --version

# Stop the child process after ten seconds
issuebrief run --timeout 10 --output diagnostics.md -- your-command --flag

# Run in another directory and provide explicit standard input
issuebrief run --cwd ./reproduction --stdin input.txt -- your-command

# Retain at most 256 KiB from each output stream
issuebrief run --max-output-bytes 262144 -- noisy-command

# Do not include OS and Python version metadata
issuebrief run --no-system-info -- your-command

The default output limit is 1 MiB per stream. The process output is still drained after that limit, but only the bounded prefix is retained. The report clearly marks truncated streams and includes the total number of bytes produced.

The report contains the command, status, exit code, duration, sanitized working directory, optional system information, sanitized stdout/stderr, truncation metadata, and replacement counts.

What the report looks like

# Issue Brief

## Result

- Status: completed
- Exit code: 2
- Duration: 0.055s

## Standard Error

    configuration invalid

## Redaction

- HOME_PATH: 1

Sanitize existing text

issuebrief sanitize [OPTIONS] [FILE|-]

With no argument (or -), reads standard input and writes sanitized text to standard output:

issuebrief sanitize app.log > app-sanitized.log
some-command 2>&1 | issuebrief sanitize

Project-specific redaction

Both run and sanitize accept repeatable custom rules:

issuebrief sanitize --redact-pattern 'customer-[0-9]+' app.log
issuebrief run --redact-file .issuebrief-redact -- your-command

A redaction file is UTF-8 text with one regular expression per line. Empty lines and lines beginning with # are ignored. Invalid expressions stop the command before execution or output.

Exit codes

For run, the child command's exit code is returned when it completes. A timeout returns 124; a command that cannot be started returns 127. Argument, input, and output errors are reported by the CLI and exit nonzero. sanitize returns 0 after successfully writing sanitized text.

Redaction and its limits

The built-in rules target common credentials (including GitHub-style tokens, bearer and Basic authorization, cookie and API-key headers, private-key blocks, common API key assignments, and credential URLs), email addresses, home-directory paths, and non-loopback IPv4/IPv6 addresses. Replacements are visibly marked, for example [REDACTED:GITHUB_TOKEN].

This is deliberately a small, deterministic first-pass safety tool—not a security boundary or a complete secret scanner. Custom formats, encoded values, context that identifies a person or company, and newly introduced credential patterns can remain. Never run untrusted commands merely to make a report; never publish a report until a human has reviewed it.

Requirements and development

  • Python 3.10 or newer
  • No runtime network access or third-party runtime dependency

Releases are published to PyPI through GitHub Actions OIDC Trusted Publishing. The project does not use a long-lived PyPI API token.

Run the standard-library test suite from a checkout:

python -m pip install -e ".[dev]"
ruff check src tests
ruff format --check src tests
python -m unittest discover -s tests -v
python -m build
python -m twine check dist/*

See CONTRIBUTING.md for contribution guidance, SECURITY.md for vulnerability reporting, and CHANGELOG.md for releases.

License

MIT. See LICENSE.

Download files

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

Source Distribution

issuebrief-0.2.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

issuebrief-0.2.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file issuebrief-0.2.0.tar.gz.

File metadata

  • Download URL: issuebrief-0.2.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for issuebrief-0.2.0.tar.gz
Algorithm Hash digest
SHA256 806bf53bab9572af03454b53a632a48ec4cf8befa6ccb7e6a5ce6ae0c5a09ac7
MD5 eda79947cc27f714de21c730e5935541
BLAKE2b-256 f6ab66784b54b2a2c711be047d78acbe16e0ba36b64bae4915ba18617d63eec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for issuebrief-0.2.0.tar.gz:

Publisher: release.yml on huangwentao1108-arch/issuebrief

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file issuebrief-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: issuebrief-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for issuebrief-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06058b4e64d8d8e9b77a1989d2d207bb631f6d1c4f6b3761a7c47da17b3c437a
MD5 f218136f5a999baa049bd86c28a1ea32
BLAKE2b-256 00a230643486153f60b625d34a0eb950d7d92e490d192197a3e6815dbc0303be

See more details on using hashes here.

Provenance

The following attestation bundles were made for issuebrief-0.2.0-py3-none-any.whl:

Publisher: release.yml on huangwentao1108-arch/issuebrief

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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