Skip to content

Commit 3cb16d9

Browse files
committed
merged with main
2 parents 80450b3 + 79e8e2f commit 3cb16d9

145 files changed

Lines changed: 15862 additions & 1590 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ FRONTEND_URL=http://localhost:3000
1818

1919
OSI_LICENSES_API=https://opensource.org/api/license/
2020

21+
PDF_GENERATION_API=https://dwt-api.dev-l3montree.cloud/pdf
2122
# comment to disable error tracking
22-
ERROR_TRACKING_DSN="https://3c5ae6e686b54ee39057194b6e6f6b8b@error-tracking.devguard.org/1"
23+
ERROR_TRACKING_DSN="https://<your-error-tracking-dsn>"
2324

2425
# ENVIRONMENT can be dev, stage or prod
2526
ENVIRONMENT=dev

.github/ISSUE_TEMPLATE/test_report.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,44 @@ body:
1818
label: ✅ Functional Test Scenarios
1919
description: Please test thoroughly and mark each scenario as you complete.
2020
options:
21+
- label: Sign up with email and passkey
22+
- label: Sign up with email and password
23+
- label: E-mail verification works
24+
- label: Login with email and passkey
25+
- label: Login with email and password
2126
- label: User login works with GitHub account
2227
- label: User login works with GitLab account
2328
- label: User login works with openCode account
29+
- label: Linking GitHub account works
30+
- label: Linking GitLab account works
31+
- label: Linking openCode account works
32+
- label: Create a new organization
33+
- label: Switching between light and dark mode works
34+
- label: Invite other user to organization with existing account
35+
- label: Invite other user to organization without existing account (Sign up during invite)
36+
- label: Change members role in organization
37+
- label: Remove user from organization
38+
- label: Check that owner of organization can never be deleted
39+
- label: Create a new group
40+
- label: Test permissions for group, subgroup and repo creation (member vs. admin on org level, change to admin on test group level)
41+
- label: Test group deletion
42+
- label: Test subgroup creation
43+
- label: Test subgroup deletion
44+
- label: Test repository creation
45+
- label: Test repository deletion
46+
- label: Test that min org admin can only invite users
47+
- label: Test linking org to GitHub
48+
- label: Test linking org to GitLab
49+
- label: Test linking org to Jira
50+
- label: Test linking repo in DevGuard to GitLab
51+
- label: Test automated issue creation
52+
- label: Test reporting range setting
53+
- label: Test auto setup feature
54+
- label: Test whole DevSecOps integration flow
55+
- label: Test partial scan setup flows
56+
- label: Test working with tickets (slash commands, commenting, etc.)
57+
- label: Test filter in risk tables
58+
- label: Test sbom and vex download
2459

2560
- type: textarea
2661
id: notes

.github/workflows/devguard-scanner.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
with:
4040
asset-name: l3montree-cybersecurity/projects/devguard/assets/devguard
4141
api-url: https://api.main.devguard.org
42+
fail-on-risk: high
43+
fail-on-cvss: high
4244
secrets:
4345
devguard-token: ${{ secrets.DEVGUARD_TOKEN }}
4446

@@ -110,6 +112,8 @@ jobs:
110112
with:
111113
asset-name: l3montree-cybersecurity/projects/devguard/assets/devguard
112114
api-url: https://api.main.devguard.org
115+
fail-on-risk: high
116+
fail-on-cvss: high
113117
secrets:
114118
devguard-token: ${{ secrets.DEVGUARD_TOKEN }}
115119

.kratos/identity.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"confirmedTerms": {
5555
"type": "boolean",
56-
"title": "I agree to the terms of use (devguard.org/terms-of-use)",
56+
"title": "I agree to the terms of use ",
5757
"description": "You must agree to the terms of use to use this service.",
5858
"default": false,
5959
"const": true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,4 @@ docker run -v "$(PWD):/app" scanner devguard-scanner container-scanning \
167167
--token="<TOKEN>" \
168168
--path="/app/image.tar"
169169
```
170+

charts/devguard/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.7.0
18+
version: 0.9.2
1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to
2121
# follow Semantic Versioning. They should reflect the version the application is using.

charts/devguard/templates/devguard/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ spec:
7979
value: http://kratos:4434
8080
- name: GOMEMLIMIT
8181
value: 1024MiB
82+
- name: PDF_GENERATION_API
83+
value: https://dwt-api.dev-l3montree.cloud/pdf
8284
{{- range .Values.oidc.providers }}
8385
{{- if eq .provider "gitlab" }}
8486
- name: GITLAB_{{ .id | upper }}_APPID
@@ -136,6 +138,10 @@ spec:
136138
key: webhookSecret
137139
name: {{ .Values.api.github.existingWebhookSecretSecretName }}
138140
optional: true
141+
- name: ENVIRONMENT
142+
value: {{ .Values.api.errorTracking.environment | quote }}
143+
- name: ERROR_TRACKING_DSN
144+
value: {{ .Values.api.errorTracking.dsn | quote }}
139145
{{- end }}
140146
ports:
141147
- name: http

charts/devguard/templates/kratos/kratos-config.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ data:
1313
"properties": {
1414
"traits": {
1515
"required": [
16-
"email"
16+
"email",
17+
"name",
18+
"confirmedTerms"
1719
],
1820
"additionalProperties": false,
1921
"type": "object",
@@ -55,6 +57,13 @@ data:
5557
"type": "string"
5658
}
5759
}
60+
},
61+
"confirmedTerms": {
62+
"type": "boolean",
63+
"title": "I agree to the terms of use ",
64+
"description": "You must agree to the terms of use to use this service.",
65+
"default": false,
66+
"const": true
5867
}
5968
}
6069
}

charts/devguard/values.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ api:
4040
podLabels: {}
4141
podSecurityContext: {}
4242
# fsGroup: 2000
43-
securityContext: {}
44-
# capabilities:
45-
# drop:
46-
# - ALL
47-
# readOnlyRootFilesystem: true
48-
# runAsNonRoot: true
49-
# runAsUser: 1000
43+
securityContext:
44+
capabilities:
45+
drop:
46+
- ALL
47+
#readOnlyRootFilesystem: true
48+
#runAsNonRoot: true
49+
#runAsUser: 1000
5050

5151
autoscaling:
5252
enabled: false
@@ -59,6 +59,12 @@ api:
5959
tolerations: []
6060
affinity: {}
6161

62+
errorTracking:
63+
# https://<your-error-tracking-dsn>
64+
dsn: ""
65+
# can be dev, stage or prod
66+
environment: "dev"
67+
6268
ingress:
6369
enabled: true
6470
className: ""
@@ -91,15 +97,7 @@ web:
9197
imagePullSecrets: []
9298
podAnnotations: {}
9399
podLabels: {}
94-
podSecurityContext: {}
95-
# fsGroup: 2000
96-
securityContext: {}
97-
# capabilities:
98-
# drop:
99-
# - ALL
100-
# readOnlyRootFilesystem: true
101-
# runAsNonRoot: true
102-
# runAsUser: 1000
100+
103101
autoscaling:
104102
enabled: false
105103
minReplicas: 1

cmd/devguard-cli/commands/daemon.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func newTriggerCommand() *cobra.Command {
5151
},
5252
}
5353

54-
trigger.Flags().StringArrayP("daemons", "d", []string{"vulndb", "componentProperties", "risk", "tickets", "statistics"}, "List of daemons to trigger")
54+
trigger.Flags().StringArrayP("daemons", "d", []string{"vulndb", "componentProperties", "risk", "tickets", "statistics", "deleteOldAssetVersions"}, "List of daemons to trigger")
5555

5656
return trigger
5757
}
@@ -76,6 +76,23 @@ func triggerDaemon(db core.DB, daemons []string) error {
7676
// thus there is no need to recalculate the risk or anything earlier
7777
slog.Info("starting background jobs", "time", time.Now())
7878
var start time.Time
79+
if emptyOrContains(daemons, "deleteOldAssetVersions") {
80+
start = time.Now()
81+
// delete old asset versions
82+
err := daemon.DeleteOldAssetVersions(db)
83+
if err != nil {
84+
slog.Error("could not delete old asset versions", "err", err)
85+
return nil
86+
}
87+
88+
if err := markMirrored(configService, "vulndb.deleteOldAssetVersions"); err != nil {
89+
slog.Error("could not mark assetVersionsDelete as mirrored", "err", err)
90+
return nil
91+
}
92+
93+
slog.Info("old asset versions deleted", "duration", time.Since(start))
94+
}
95+
7996
if emptyOrContains(daemons, "depsDev") {
8097
start = time.Now()
8198
// update deps dev

0 commit comments

Comments
 (0)