@@ -10,70 +10,50 @@ It supports 3 main on premise version control service:
10
10
- Gitlab CE and EE
11
11
- Bitbucket
12
12
13
- ## Use the package
14
-
15
- - Build binary
16
- ``` sh
17
- go build ./cmd/src-fingerprint
18
- ```
19
- - Set env var ` VCS_TOKEN ` to the GitHub Token or GitLab Token
20
- ``` sh
21
- export VCS_TOKEN=" <token>"
22
- ```
23
- - Run and read doc
24
- ``` sh
25
- ./src-fingerprint
26
- ```
27
- - Run on a given user/group
28
- ``` sh
29
- ./src-fingerprint --provider github --object Uber
30
- ./src-fingerprint --provider-url http://gitlab.example.com --provider gitlab --object Groupe
31
- ```
32
-
33
13
## Providers
34
14
35
15
### GitHub
36
16
37
17
1 . Export all file SHAs from a GitHub Org with private repositories to a file with logs:
38
18
39
19
``` sh
40
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --output file_shas_collected_dna.json --provider github --object GitGuardian
20
+ env VCS_TOKEN=" <token>" src-fingerprint -v --output file_shas_collected_dna.json --provider github --object GitGuardian
41
21
```
42
22
43
23
2 . Export all file SHAs of every repository the user can access to ` stdout ` :
44
24
45
25
``` sh
46
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --provider github GitGuardian
26
+ env VCS_TOKEN=" <token>" src-fingerprint -v --provider github GitGuardian
47
27
```
48
28
49
29
### GitLab
50
30
51
31
1 . Export all file SHAs from a GitLab group with private projects to a file with logs:
52
32
53
33
``` sh
54
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --output file_shas_collected_dna.json --provider gitlab --object " GitGuardian-dev-group"
34
+ env VCS_TOKEN=" <token>" src-fingerprint -v --output file_shas_collected_dna.json --provider gitlab --object " GitGuardian-dev-group"
55
35
```
56
36
57
37
2 . Export all file SHAs of every project the user can access to ` stdout ` :
58
38
59
39
> :warning : On ` gitlab.com ` this will attempt to retrieve all repositories on ` gitlab.com `
60
40
61
41
``` sh
62
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --provider gitlab
42
+ env VCS_TOKEN=" <token>" src-fingerprint -v --provider gitlab
63
43
```
64
44
65
45
### Bitbucket server (formely Atlassian Stash)
66
46
67
47
1 . Export all file SHAs from a Bitbucket project with private repository to a file with logs:
68
48
69
49
``` sh
70
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --output file_shas_collected_dna.json --provider bitbucket --object " GitGuardian Project"
50
+ env VCS_TOKEN=" <token>" src-fingerprint -v --output file_shas_collected_dna.json --provider bitbucket --object " GitGuardian Project"
71
51
```
72
52
73
53
2 . Export all file SHAs of every repository the user can access to ` stdout ` :
74
54
75
55
``` sh
76
- env VCS_TOKEN=" <token>" ./ src-fingerprint -v --provider bitbucket
56
+ env VCS_TOKEN=" <token>" src-fingerprint -v --provider bitbucket
77
57
```
78
58
79
59
### Repository
@@ -120,7 +100,33 @@ The gitlab package contains the implementation of the Gitlab Provider.
120
100
121
101
The cmd/src-fingerprint package contains the binary code. It reads from CLI and environment the configuration and run the Pipeline on an organization.
122
102
123
- ### Library we use
103
+ ## Development build and testing
104
+
105
+ - Build binary
106
+
107
+ ``` sh
108
+ go build ./cmd/src-fingerprint
109
+ ```
110
+
111
+ - Set env var ` VCS_TOKEN ` to the GitHub Token or GitLab Token
112
+
113
+ ``` sh
114
+ export VCS_TOKEN=" <token>"
115
+ ```
116
+
117
+ - Run and read doc
118
+
119
+ ``` sh
120
+ ./src-fingerprint
121
+ ```
122
+
123
+ - Run on a given user/group
124
+ ``` sh
125
+ ./src-fingerprint --provider github --object Uber
126
+ ./src-fingerprint --provider-url http://gitlab.example.com --provider gitlab --object Groupe
127
+ ```
128
+
129
+ ### Libraries we use
124
130
125
131
#### Providers
126
132
0 commit comments