secret

package
v0.167.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 1 Imported by: 0 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

Package secret holds credential-redaction primitives shared by the workflow export path and the job request-redact path. Leaf package (imports only regexp) so both internal/job and internal/job/workflow reuse it without a cycle (internal/job cannot import internal/job/workflow — G024).

Index

Constants

View Source
const Placeholder = "***REDACTED***"

Placeholder replaces a value that matched a secret pattern (SR403). Structure is preserved so a redacted request/spec stays a runnable template; the real value must be filled back in before re-running.

Variables

This section is empty.

Functions

func RedactString

func RedactString(s string) (string, bool)

RedactString replaces credential-looking assignments/flags in s with Placeholder, keeping the key/flag so the output stays a usable template. Returns the scrubbed string and whether anything was redacted. 逐字迁自 export.go:40-62;另加命令行 位置密码(mysql -p<pass>、curl -u user:pass、URL user:pass@)。

func ScanSubmission

func ScanSubmission(command, args []string, prompt string) []string

ScanSubmission returns location labels only. It never returns matching text, so callers can safely print the warning without echoing a credential.

func ScanSubmissionWithMetadata

func ScanSubmissionWithMetadata(command, args []string, prompt, title string, tags []string) []string

ScanSubmissionWithMetadata extends the submission warning surface to fields that are persisted with a job title/tags. It returns location labels only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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