secret

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package secret는 시크릿으로 보이는 문자열을 찾는 판정을 담는다. promote, new, export, lint 가 같은 판정을 쓴다. 같은 판정을 두 벌 두면 어느 커맨드는 통과하고 어느 커맨드는 거절하는 문서가 생긴다(ADR 0069).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Rule string // 패턴 이름
	Line int    // 1 기반 줄 번호
}

Finding은 찾은 것 하나다.

func Scan

func Scan(body string) []Finding

Scan은 본문에서 시크릿으로 보이는 것을 찾는다. 코드 펜스 안도 검사한다. 시크릿은 코드 블록에 붙여 넣는 일이 더 흔하다. 위키링크 추출(internal/doc)이 코드 펜스를 건너뛰는 것과 반대 방향이다. 링크 문법은 문서에 설명으로 등장하지만 실제 시크릿은 코드 블록에 붙는다(ADR 0069). 줄마다 규칙당 최대 한 건을 낸다. 값은 세지 않는다. 호출자는 규칙 이름과 줄 번호만 알리고 값을 출력하지 않는다. 거절 메시지에 값이 실리면 그 메시지가 로그와 터미널 스크롤백으로 옮겨지므로 그것 자체가 유출이다.

Jump to

Keyboard shortcuts

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