2
0
Files
logikonline a579977667
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Unit Tests (push) Successful in 3m3s
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 4m16s
Build and Release / Lint (push) Successful in 5m27s
Build and Release / Build Binaries (arm64, darwin, macos-latest) (push) Failing after 42s
Build and Release / Build Binaries (arm64, linux, linux-latest) (push) Successful in 2m34s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 2m48s
Build and Release / Build Binaries (amd64, darwin, macos-latest) (push) Successful in 3m20s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 8h7m8s
vault templates and translations
2026-01-17 02:54:23 -05:00

38 lines
1.4 KiB
Go

// Copyright 2026 MarketAlly. All rights reserved.
// SPDX-License-Identifier: MIT
package setting
// SecretScanSettings represents the secret scanning configuration
var SecretScan = struct {
Enabled bool
BlockOnDetection bool
BlockSeverity string // "critical", "high", "medium", "low"
ScanNewBranches bool
IgnoredRepos []string
IgnoredFiles []string
AllowlistPatterns []string
EnableVaultSuggestion bool
}{
Enabled: true,
BlockOnDetection: true,
BlockSeverity: "high", // Block on high and critical
ScanNewBranches: true,
IgnoredRepos: []string{},
IgnoredFiles: []string{},
AllowlistPatterns: []string{},
EnableVaultSuggestion: true,
}
func loadSecretScanFrom(rootCfg ConfigProvider) {
sec := rootCfg.Section("secret_scan")
SecretScan.Enabled = sec.Key("ENABLED").MustBool(true)
SecretScan.BlockOnDetection = sec.Key("BLOCK_ON_DETECTION").MustBool(true)
SecretScan.BlockSeverity = sec.Key("BLOCK_SEVERITY").MustString("high")
SecretScan.ScanNewBranches = sec.Key("SCAN_NEW_BRANCHES").MustBool(true)
SecretScan.IgnoredRepos = sec.Key("IGNORED_REPOS").Strings(",")
SecretScan.IgnoredFiles = sec.Key("IGNORED_FILES").Strings(",")
SecretScan.AllowlistPatterns = sec.Key("ALLOWLIST_PATTERNS").Strings(",")
SecretScan.EnableVaultSuggestion = sec.Key("ENABLE_VAULT_SUGGESTION").MustBool(true)
}