github

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package github provides detectors for GitHub secret types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthDetector

type OAuthDetector struct{}

OAuthDetector detects GitHub server-/user-to-server tokens (gho_/ghu_/ghr_/ghs_), including new stateless ghs_ installation tokens.

func (*OAuthDetector) Description

func (d *OAuthDetector) Description() string

Description returns a human-readable description of the GitHub OAuth2 token detector.

func (*OAuthDetector) ID

func (d *OAuthDetector) ID() string

ID returns the unique identifier of the GitHub OAuth2 token detector.

func (*OAuthDetector) Keywords

func (d *OAuthDetector) Keywords() []string

Keywords returns the Aho-Corasick pre-filter keywords for GitHub OAuth2 token detection.

func (*OAuthDetector) Scan

func (d *OAuthDetector) Scan(_ context.Context, data []byte) []detector.RawFinding

Scan scans the given data for GitHub OAuth2 Token patterns.

func (*OAuthDetector) Severity

func (d *OAuthDetector) Severity() finding.Severity

Severity returns the default severity level for GitHub OAuth2 token findings.

type Token

type Token struct{}

Token detects GitHub Personal Access Tokens.

func (*Token) Description

func (d *Token) Description() string

Description returns a human-readable description of the GitHub token detector.

func (*Token) ID

func (d *Token) ID() string

ID returns the unique identifier of the GitHub token detector.

func (*Token) Keywords

func (d *Token) Keywords() []string

Keywords returns the Aho-Corasick pre-filter keywords for GitHub token detection.

func (*Token) Scan

func (d *Token) Scan(_ context.Context, data []byte) []detector.RawFinding

Scan scans the given data for GitHub Personal Access Token patterns.

func (*Token) Severity

func (d *Token) Severity() finding.Severity

Severity returns the default severity level for GitHub token findings.

Jump to

Keyboard shortcuts

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