Skip to content

Commit ad3310a

Browse files
committed
deployment: fix docker file
* Fixes lxml conflict with uwsgi command for the deployment. * Adds safety exceptions. * Fixes some small cosmetics in the JSONSchemas. Co-Authored-by: Johnny Mariéthoz <[email protected]>
1 parent 11a6c67 commit ad3310a

File tree

6 files changed

+41
-33
lines changed

6 files changed

+41
-33
lines changed

Dockerfile.base

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
# and includes Pip, Pipenv, Node.js, NPM and some few standard libraries
2323
# Invenio usually needs.
2424

25-
FROM python:3.9-slim-bullseye
25+
FROM python:3.9-slim-bookworm
2626

2727
# require debian packages
2828
RUN apt-get upgrade -y && apt-get update -y
29-
RUN apt-get install --no-install-recommends -y git vim-tiny curl gcc g++ pkg-config gnupg libc6-dev libxml2-dev libxmlsec1-dev libxmlsec1-openssl xpdf xpdf-utils ghostscript imagemagick && rm -rf /var/lib/apt/lists/*
29+
RUN apt-get install --no-install-recommends -y git vim-tiny curl gcc g++ pkg-config gnupg libc6-dev libxmlsec1-openssl xpdf xpdf-utils ghostscript imagemagick && rm -rf /var/lib/apt/lists/*
3030
RUN sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read" pattern="PDF" \/>/g' /etc/ImageMagick-6/policy.xml
3131
RUN pip install --upgrade wheel pip poetry
3232

scripts/test

+7-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ fi
4545
# Vulnerability ID: 70612
4646
# -> Vulnerability found in flask-cors version 4.0.1
4747
# Vulnerability ID: 70624
48+
# -> Vulnerability found in werkzeug version 2.2.3
49+
# Vulnerability ID: 71595
50+
# -> Vulnerability found in werkzeug version 2.2.3
51+
# Vulnerability ID: 71594
52+
# -> Vulnerability found in urllib3 version 1.26.18
53+
# Vulnerability ID: 71608
4854

4955
echo "Check vulnerabilities:"
50-
safety_exceptions="-i 40459 -i 51668 -i 42194 -i 42852 -i 62019 -i 67599 -i 51457 -i 70624 -i 70612"
56+
safety_exceptions="-i 40459 -i 51668 -i 42194 -i 42852 -i 62019 -i 67599 -i 51457 -i 70624 -i 70612 -i 71595 -i 71594 -i 71608"
5157
msg=$(safety check -o text ${safety_exceptions}) || {
5258
echo "Safety vulnerabilites found for packages:" $(safety check -o bare ${safety_exceptions})
5359
echo "Run:" "safety check -o screen ${safety_exceptions} | grep -i vulnerability" "for more details"

sonar/modules/documents/jsonschemas/documents/document-v1.0.0_src.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,14 @@
247247
"type": "object",
248248
"properties": {
249249
"$ref": {
250+
"title": "Organisation",
250251
"type": "string",
251252
"pattern": "^https://sonar.ch/api/organisations/.*?$",
252253
"minLength": 1,
253254
"widget": {
254255
"formlyConfig": {
255256
"props": {
257+
"hideLabel": true,
256258
"remoteOptions": {
257259
"type": "organisations"
258260
}
@@ -2324,10 +2326,10 @@
23242326
}
23252327
},
23262328
"propertiesOrder": [
2329+
"organisation",
23272330
"documentType",
23282331
"title",
23292332
"language",
2330-
"organisation",
23312333
"projects",
23322334
"classification",
23332335
"abstracts",

sonar/modules/organisations/jsonschemas/organisations/organisation-v1.0.0_src.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"description": {
4444
"title": "Descriptions",
4545
"type": "array",
46-
"minItems": 1,
4746
"items": {
4847
"title": "Description",
4948
"type": "object",
@@ -97,7 +96,6 @@
9796
"footer": {
9897
"title": "Footers",
9998
"type": "array",
100-
"minItems": 1,
10199
"items": {
102100
"title": "Footer",
103101
"type": "object",
@@ -226,6 +224,7 @@
226224
"widget": {
227225
"formlyConfig": {
228226
"type": "markdown",
227+
"wrappers": ["form-field"],
229228
"expressions": {
230229
"hide": "!field.model.isDedicated"
231230
},
@@ -520,13 +519,13 @@
520519
"propertiesOrder": [
521520
"name",
522521
"code",
522+
"description",
523+
"arkNAAN",
523524
"isShared",
524525
"isDedicated",
526+
"allowedIps",
525527
"serverName",
526528
"platformName",
527-
"arkNAAN",
528-
"allowedIps",
529-
"description",
530529
"footer",
531530
"documentsCustomField1",
532531
"documentsCustomField2",

sonar/modules/users/jsonschemas/users/user-v1.0.0.json

+19-22
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343
"description": "Date in yyyy-mm-dd format, ex: 1970-01-01",
4444
"type": "string",
4545
"format": "date",
46-
"pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$"
46+
"pattern": "^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$",
47+
"widget": {
48+
"formlyConfig": {
49+
"type": "datepicker"
50+
}
51+
}
4752
},
4853
"email": {
4954
"title": "Email",
@@ -91,6 +96,7 @@
9196
},
9297
"organisation": {
9398
"type": "object",
99+
"title": "Organisation",
94100
"properties": {
95101
"$ref": {
96102
"title": "Organisation",
@@ -107,21 +113,20 @@
107113
}
108114
}
109115
},
110-
"required": [
111-
"$ref"
112-
]
116+
"required": ["$ref"],
117+
"widget": {
118+
"formlyConfig": {
119+
"props": {
120+
"hideLabel": true
121+
}
122+
}
123+
}
113124
},
114125
"role": {
115126
"title": "Role",
116127
"type": "string",
117128
"minLength": 1,
118-
"enum": [
119-
"superuser",
120-
"admin",
121-
"moderator",
122-
"submitter",
123-
"user"
124-
],
129+
"enum": ["superuser", "admin", "moderator", "submitter", "user"],
125130
"widget": {
126131
"formlyConfig": {
127132
"props": {
@@ -172,9 +177,7 @@
172177
}
173178
}
174179
},
175-
"required": [
176-
"$ref"
177-
]
180+
"required": ["$ref"]
178181
}
179182
},
180183
"propertiesOrder": [
@@ -190,11 +193,5 @@
190193
"postal_code",
191194
"city"
192195
],
193-
"required": [
194-
"first_name",
195-
"last_name",
196-
"email",
197-
"role",
198-
"$schema"
199-
]
200-
}
196+
"required": ["first_name", "last_name", "email", "role", "$schema"]
197+
}

sonar/resources/projects/jsonschemas/projects/project-v1.0.0_src.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
"funding_organisations": {
265265
"title": "Funding organisations",
266266
"type": "array",
267-
"minItems": 0,
267+
"minItems": 1,
268268
"items": {
269269
"title": "Funding organisation",
270270
"type": "object",
@@ -316,6 +316,7 @@
316316
"type": "object",
317317
"properties": {
318318
"$ref": {
319+
"title": "Organisation",
319320
"type": "string",
320321
"pattern": "^https://sonar.ch/api/organisations/.*?$",
321322
"widget": {
@@ -334,6 +335,9 @@
334335
],
335336
"widget": {
336337
"formlyConfig": {
338+
"props": {
339+
"hideLabel": true
340+
},
337341
"expressions": {
338342
"props.required": "true"
339343
}
@@ -373,11 +377,11 @@
373377
}
374378
},
375379
"propertiesOrder": [
380+
"organisation",
376381
"name",
377382
"description",
378383
"startDate",
379384
"endDate",
380-
"organisation",
381385
"identifiedBy",
382386
"investigators",
383387
"funding_organisations"

0 commit comments

Comments
 (0)