-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.example.yaml
159 lines (145 loc) · 3.48 KB
/
config.example.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
http:
host: 127.0.0.1
port: 3002
# optional timeout configuration
write-timeout: 10
read-timeout: 10
read-header-timeout: 10
# optional tls configuration
cert-path: "/tmp/cert.pem"
key-path: "/tmp/key/key"
ca-cert-path: "/tmp/cacert.pem"
insecure-skip-verify: false
client-auth-type: "RequireAndVerifyClientCert"
# expose the configuration file on /config
expose-configuration: false
# labels to add to the Prometheus metrics exposed by the HTTP server
labels:
- category
- owner
- level
interval: 10
providers:
# Static list of projects to check
static:
- name: "standards-insights"
url: https://github.com/qonto/standards-insights.git
branch: "main"
path: "/tmp/projects/standards-insights"
# The ArgoCD provider will retrieve projects from ArgoCD and use the Spec.Source.RepoURL url to fetch the
# projects. ArgoCD applications labels will automatically be added as labels to the project.
argocd:
url: "argocd-url"
projects:
- project-to-use
selector: "app=foo"
base-path: "/tmp/base"
# Use ARGOCD_AUTH_TOKEN to pass the ArgoCD authentication token
gitlab:
token: # can also use $GITLAB_TOKEN
url: 'https://gitlab.example.com/api/v4'
topics:
- gitlab repository topic
base-path: ./tmp/gitlab
search: #search projects
# Optional Git configuration to clone the projects (pick one)
git:
basic-auth:
username: oauth2
password: pass # You can use GIT_BASIC_AUTH_PASSWORD as well
private-key:
path: /home/mcorbin/.ssh/my_ssh_private_key
password: key-password # you can use GIT_PRIVATE_KEY_PASSWORD
groups:
- name: golang
checks:
- go-version-latest
- go-main
when:
- golang-projects
- name: files-granularity-example
files:
apply-to-files: true
checks:
- files-granularity-example
when:
- golang-projects
checks:
- name: files-granularity-example
labels:
category: upgrade
severity: critical
owner: backend
rules:
- files-granularity-example
- name: go-version-latest
labels:
category: upgrade
severity: critical
owner: backend
rules:
- go-version-latest
- name: go-main
operator: and
labels:
category: misc
severity: minor
owner: backend
rules:
- go-main
- go-version-latest
- name: grep-test
labels:
category: misc
severity: minor
owner: backend
rules:
- grep-rule-fn
rules:
- name: golang-projects
files:
- path: "go.mod"
exists: true
- name: go-version-latest
files:
- path: "go.mod"
contains: "go 1.21"
- name: go-main
files:
- path: "main.go"
contains: "^(func main)"
- name: grep-rule-fn
grep:
- path: "."
recursive: true
pattern: "NewGrepRule"
match: true
- name: files-granularity-example
grep:
- recursive: false
pattern: "package"
match: true
- name: allowed-projects
project:
- names:
- awesome-project1
- awesome-project2
match: true
- name: excluded-projects
project:
- names:
- bad-project1
- bad-project2
match: false
- name: matching-all-labels
project:
- labels:
team: backend
language: golang
match: true
- name: excluding-all-labels
project:
- labels:
team: backend
language: golang
match: false