124 lines
5.2 KiB
Go
124 lines
5.2 KiB
Go
package feature
|
|
|
|
import (
|
|
"sync/atomic"
|
|
)
|
|
|
|
var (
|
|
ForceSkipBinaries atomic.Bool
|
|
ForceSkipArchives atomic.Bool
|
|
GitCloneTimeoutDuration atomic.Int64
|
|
SkipAdditionalRefs atomic.Bool
|
|
EnableAPKHandler atomic.Bool
|
|
UserAgentSuffix AtomicString
|
|
UseSimplifiedGitlabEnumeration atomic.Bool
|
|
UseGitMirror atomic.Bool
|
|
GitlabProjectsPerPage atomic.Int64
|
|
UseGithubGraphQLAPI atomic.Bool // use github graphql api to fetch issues, pr's and comments
|
|
HTMLDecoderEnabled atomic.Bool
|
|
PineconeDetectorEnabled atomic.Bool
|
|
CloudinaryDetectorEnabled atomic.Bool
|
|
GitLabOAuthDetectorEnabled atomic.Bool
|
|
SonarCloudV2DetectorEnabled atomic.Bool
|
|
EnigmaDetectorEnabled atomic.Bool
|
|
DatadogApiKeyDetectorEnabled atomic.Bool
|
|
TlyDetectorEnabled atomic.Bool
|
|
WitDetectorEnabled atomic.Bool
|
|
RevDetectorEnabled atomic.Bool
|
|
UserDetectorEnabled atomic.Bool
|
|
BraintrustDetectorEnabled atomic.Bool
|
|
PgAnalyzeReadKeyDetectorEnabled atomic.Bool
|
|
RedHatPyxisDetectorEnabled atomic.Bool
|
|
OctopusDeployDetectorEnabled atomic.Bool
|
|
DropUnverifiedJWTResults atomic.Bool
|
|
OpenRouterDetectorEnabled atomic.Bool
|
|
NewRelicInsightsInsertKeyDetectorEnabled atomic.Bool
|
|
DuffelTokenDetectorEnabled atomic.Bool
|
|
ShippoDetectorEnabled atomic.Bool
|
|
IPInfoDetectorEnabled atomic.Bool
|
|
LobDetectorEnabled atomic.Bool
|
|
HashiCorpVaultBatchTokenDetectorEnabled atomic.Bool
|
|
HashiCorpVaultTokenDetectorEnabled atomic.Bool
|
|
CloudflareApiTokenV2DetectorEnabled atomic.Bool
|
|
CloudflareGlobalApiKeyV2DetectorEnabled atomic.Bool
|
|
DuoDetectorEnabled atomic.Bool
|
|
FigmaV3DetectorEnabled atomic.Bool
|
|
NewRelicLicenseKeyDetectorEnabled atomic.Bool
|
|
NewRelicBrowserKeyDetectorEnabled atomic.Bool
|
|
NewRelicUserKeyDetectorEnabled atomic.Bool
|
|
NewRelicInsightsQueryKeyDetectorEnabled atomic.Bool
|
|
NewRelicMobileAppTokenDetectorEnabled atomic.Bool
|
|
MSTeamsWebhookV2DetectorEnabled atomic.Bool
|
|
SolarwindsDetectorEnabled atomic.Bool
|
|
WeightsAndBiasesV2DetectorEnabled atomic.Bool
|
|
|
|
// INT-595: gated while verification-error reporting is rolled out.
|
|
CexIODetectorEnabled atomic.Bool
|
|
CommoditiesDetectorEnabled atomic.Bool
|
|
ConvierDetectorEnabled atomic.Bool
|
|
CryptoCompareDetectorEnabled atomic.Bool
|
|
DareboostDetectorEnabled atomic.Bool
|
|
DyspatchDetectorEnabled atomic.Bool
|
|
EtherscanDetectorEnabled atomic.Bool
|
|
FixerIODetectorEnabled atomic.Bool
|
|
FlickrDetectorEnabled atomic.Bool
|
|
FlightstatsDetectorEnabled atomic.Bool
|
|
FlowFluDetectorEnabled atomic.Bool
|
|
FreshbooksDetectorEnabled atomic.Bool
|
|
GengoDetectorEnabled atomic.Bool
|
|
GoCanvasDetectorEnabled atomic.Bool
|
|
HolisticDetectorEnabled atomic.Bool
|
|
HumanityDetectorEnabled atomic.Bool
|
|
InfuraDetectorEnabled atomic.Bool
|
|
InstamojoDetectorEnabled atomic.Bool
|
|
IpStackDetectorEnabled atomic.Bool
|
|
LinearAPIDetectorEnabled atomic.Bool
|
|
MailboxlayerDetectorEnabled atomic.Bool
|
|
MetabaseDetectorEnabled atomic.Bool
|
|
MoosendDetectorEnabled atomic.Bool
|
|
MrticktockDetectorEnabled atomic.Bool
|
|
OnedeskDetectorEnabled atomic.Bool
|
|
ParallelDotsDetectorEnabled atomic.Bool
|
|
PlanyoDetectorEnabled atomic.Bool
|
|
RazorPayDetectorEnabled atomic.Bool
|
|
ReallySimpleSystemsDetectorEnabled atomic.Bool
|
|
SemaphoreDetectorEnabled atomic.Bool
|
|
SimFinDetectorEnabled atomic.Bool
|
|
SlackWebhookDetectorEnabled atomic.Bool
|
|
TefterDetectorEnabled atomic.Bool
|
|
TeletypeDetectorEnabled atomic.Bool
|
|
ThinkificDetectorEnabled atomic.Bool
|
|
TwelveDataDetectorEnabled atomic.Bool
|
|
UnifyIDDetectorEnabled atomic.Bool
|
|
UptimeRobotDetectorEnabled atomic.Bool
|
|
WalkScoreDetectorEnabled atomic.Bool
|
|
WeatherStackDetectorEnabled atomic.Bool
|
|
WebscrapingDetectorEnabled atomic.Bool
|
|
WebsitepulseDetectorEnabled atomic.Bool
|
|
WhoxyDetectorEnabled atomic.Bool
|
|
)
|
|
|
|
type AtomicString struct {
|
|
value atomic.Value
|
|
}
|
|
|
|
// Load returns the current value of the atomic string
|
|
func (as *AtomicString) Load() string {
|
|
if v := as.value.Load(); v != nil {
|
|
return v.(string)
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Store sets the value of the atomic string
|
|
func (as *AtomicString) Store(newValue string) {
|
|
as.value.Store(newValue)
|
|
}
|
|
|
|
// Swap atomically swaps the current string with a new one and returns the old value
|
|
func (as *AtomicString) Swap(newValue string) string {
|
|
oldValue := as.Load()
|
|
as.Store(newValue)
|
|
return oldValue
|
|
}
|