Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Add BitBucket platform to secret scanning
x03220537d490ede342
diff --git a/cli/detect/cmd/scm/scm.go b/cli/detect/cmd/scm/scm.goindex 66868aadcb..dddeffdf5d 100644--- a/cli/detect/cmd/scm/scm.go+++ b/cli/detect/cmd/scm/scm.go@@ -35,6 +35,7 @@ const (GitHubPlatformGitLabPlatformAzureDevOpsPlatform+ BitBucketPlatform// TODO: Add others.)@@ -45,6 +46,7 @@ func (p Platform) String() string {"github","gitlab","azuredevops",+ "bitbucket",}[p]}@@ -60,6 +62,8 @@ func PlatformFromString(s string) (Platform, error) {return GitLabPlatform, nilcase "azuredevops":return AzureDevOpsPlatform, nil+ case "bitbucket":+ return BitBucketPlatform, nildefault:return UnknownPlatform, fmt.Errorf("invalid scm platform value: %s", s)}diff --git a/cli/detect/git.go b/cli/detect/git.goindex ddde0757df..83ed8a853c 100644--- a/cli/detect/git.go+++ b/cli/detect/git.go@@ -208,6 +208,8 @@ func platformFromHost(u *url.URL) scm.Platform {return scm.GitLabPlatformcase "dev.azure.com", "visualstudio.com":return scm.AzureDevOpsPlatform+ case "bitbucket.org":+ return scm.BitBucketPlatformdefault:return scm.UnknownPlatform}diff --git a/cli/detect/utils.go b/cli/detect/utils.goindex 255d01fbe3..0ab755319c 100644--- a/cli/detect/utils.go+++ b/cli/detect/utils.go@@ -112,6 +112,15 @@ func createScmLink(scmPlatform scm.Platform, remoteUrl string, finding report.Fi// This is a bit dirty, but Azure DevOps does not highlight the line when the lineStartColumn and lineEndColumn are not providedlink += "&lineStartColumn=1&lineEndColumn=10000000&type=2&lineStyle=plain&_a=files"return link+ case scm.BitBucketPlatform:+ link := fmt.Sprintf("%s/src/%s/%s", remoteUrl, finding.Commit, filePath)+ if finding.StartLine != 0 {+ link += fmt.Sprintf("#lines-%d", finding.StartLine)+ if finding.EndLine != finding.StartLine {+ link += fmt.Sprintf(":%d", finding.EndLine)+ }+ }+ return linkdefault:// This should never happen.return ""