issueguard

command
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command issueguard decides whether a new or edited issue, or issue comment, holds what looks like a key (Story 4.14). The issue-guard workflow runs it on the `issues` and `issue_comment` events and, when it says so, adds the possible-secret label and posts the fixed rotation comment.

It reads the event payload (-event, default $GITHUB_EVENT_PATH), takes the comment body for a comment event and the issue title and body otherwise, and pipes it to `<tokenhound> scan - --no-verify --include-test-keys --format json --quiet`, run in an empty directory so no project config or ignore file applies. Generated test keys (AD-16) count: a key-shaped value in a public issue is flagged whatever it is. Suppressed findings count too, so an inline `tokenhound:allow` pasted with a key does not hide it. Comments on pull requests arrive as issue_comment events and are scanned like any other comment.

The body, the scan output and every finding (redacted form included) stay inside this process: it prints only the decision and the issue number, and writes `possible-secret=true|false` and `number=<n>` to $GITHUB_OUTPUT when set. With -comment-file it writes the fixed comment there when the decision is true. The comment never depends on the body.

Usage: go run ./tools/issueguard -tokenhound <binary> [-event <file>] [-comment-file <file>]

Exit codes: 0 decided (either way), 2 the event or the scan could not be read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL