faker

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package faker produces deterministic GCP-shaped fake data for SCC findings. All helpers take an explicit *rand.Rand so callers control determinism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeResourceName

func ComputeResourceName(r *rand.Rand, projectID string) string

ComputeResourceName returns a GCE instance resource name.

func EventTime

func EventTime(r *rand.Rand) time.Time

EventTime returns a deterministic random time within a fixed ~2-year window (2024–2025), derived entirely from the RNG.

func FindingID

func FindingID(r *rand.Rand) string

FindingID returns a 32-hex-char finding ID.

func FindingName

func FindingName(orgID, sourceID, findingID string) string

FindingName returns a fully-qualified Finding resource name.

func FindingParent

func FindingParent(orgID, sourceID string) string

FindingParent returns the SCC source resource name.

func IAMRoleResourceName

func IAMRoleResourceName(projectID string) string

IAMRoleResourceName returns a project-scoped IAM resource name.

func IPv4

func IPv4(r *rand.Rand) string

IPv4 returns a parseable IPv4 address (mix of RFC1918 and public).

func MitreTactic

func MitreTactic(r *rand.Rand) string

MitreTactic returns a MITRE ATT&CK tactic name used by SCC.

func MitreTechnique

func MitreTechnique(r *rand.Rand) string

MitreTechnique returns a MITRE technique ID like "T1078".

func NotificationConfigName

func NotificationConfigName(r *rand.Rand) string

NotificationConfigName returns a fully-qualified SCC notification config name.

func OrganizationID

func OrganizationID(r *rand.Rand) string

OrganizationID returns a 12-digit numeric GCP organization ID.

func PrincipalEmail

func PrincipalEmail(r *rand.Rand) string

PrincipalEmail returns either a user-style or service-account-style email.

func ProjectID

func ProjectID(r *rand.Rand) string

ProjectID returns a fake GCP project ID like "mock-project-<6hex>".

func SourceID

func SourceID(r *rand.Rand) string

SourceID returns a numeric SCC source ID.

func StorageBucketResourceName

func StorageBucketResourceName(r *rand.Rand, projectID string) string

StorageBucketResourceName returns a GCS bucket resource name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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