-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgitlab.go
More file actions
57 lines (47 loc) · 2.1 KB
/
gitlab.go
File metadata and controls
57 lines (47 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package gitlab
import (
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/cicd"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/container"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/enum"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/renovate"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/runners"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/scan"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/schedule"
securefiles "github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/secureFiles"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/variables"
"github.com/CompassSecurity/pipeleek/internal/cmd/gitlab/vuln"
"github.com/spf13/cobra"
)
var (
gitlabApiToken string
gitlabUrl string
)
func NewGitLabRootCmd() *cobra.Command {
glCmd := &cobra.Command{
Use: "gl [command]",
Short: "GitLab related commands",
Long: `Commands to enumerate and exploit GitLab instances.
### GitLab Proxy Support
> **Note:** Proxying is currently supported only for GitLab commands.
Since Go binaries aren't compatible with Proxychains, you can set a proxy using the HTTP_PROXY environment variable.
For HTTP proxy (e.g., Burp Suite):
<code>HTTP_PROXY=http://127.0.0.1:8080 pipeleek gl scan --token glpat-xxxxxxxxxxx --gitlab https://gitlab.com</code>
For SOCKS5 proxy:
<code>HTTP_PROXY=socks5://127.0.0.1:8080 pipeleek gl scan --token glpat-xxxxxxxxxxx --gitlab https://gitlab.com</code>
`,
GroupID: "GitLab",
}
glCmd.AddCommand(scan.NewScanCmd())
glCmd.AddCommand(runners.NewRunnersRootCmd())
glCmd.AddCommand(vuln.NewVulnCmd())
glCmd.AddCommand(variables.NewVariablesCmd())
glCmd.AddCommand(securefiles.NewSecureFilesCmd())
glCmd.AddCommand(enum.NewEnumCmd())
glCmd.AddCommand(renovate.NewRenovateRootCmd())
glCmd.AddCommand(container.NewContainerScanCmd())
glCmd.AddCommand(cicd.NewCiCdCmd())
glCmd.AddCommand(schedule.NewScheduleCmd())
glCmd.PersistentFlags().StringVarP(&gitlabUrl, "gitlab", "g", "", "GitLab instance URL")
glCmd.PersistentFlags().StringVarP(&gitlabApiToken, "token", "t", "", "GitLab API Token")
return glCmd
}