check-opencloud-security 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2375 @@
1
+ Metadata-Version: 2.5
2
+ Name: check-opencloud-security
3
+ Version: 1.0.1
4
+ Summary: Check the security level of your OpenCloud instance with a built-in scanner - no API access required
5
+ Author: Massoud Ahmed
6
+ License: GNU GENERAL PUBLIC LICENSE
7
+ Version 3, 29 June 2007
8
+
9
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
10
+ Everyone is permitted to copy and distribute verbatim copies
11
+ of this license document, but changing it is not allowed.
12
+
13
+ Preamble
14
+
15
+ The GNU General Public License is a free, copyleft license for
16
+ software and other kinds of works.
17
+
18
+ The licenses for most software and other practical works are designed
19
+ to take away your freedom to share and change the works. By contrast,
20
+ the GNU General Public License is intended to guarantee your freedom to
21
+ share and change all versions of a program--to make sure it remains free
22
+ software for all its users. We, the Free Software Foundation, use the
23
+ GNU General Public License for most of our software; it applies also to
24
+ any other work released this way by its authors. You can apply it to
25
+ your programs, too.
26
+
27
+ When we speak of free software, we are referring to freedom, not
28
+ price. Our General Public Licenses are designed to make sure that you
29
+ have the freedom to distribute copies of free software (and charge for
30
+ them if you wish), that you receive source code or can get it if you
31
+ want it, that you can change the software or use pieces of it in new
32
+ free programs, and that you know you can do these things.
33
+
34
+ To protect your rights, we need to prevent others from denying you
35
+ these rights or asking you to surrender the rights. Therefore, you have
36
+ certain responsibilities if you distribute copies of the software, or if
37
+ you modify it: responsibilities to respect the freedom of others.
38
+
39
+ For example, if you distribute copies of such a program, whether
40
+ gratis or for a fee, you must pass on to the recipients the same
41
+ freedoms that you received. You must make sure that they, too, receive
42
+ or can get the source code. And you must show them these terms so they
43
+ know their rights.
44
+
45
+ Developers that use the GNU GPL protect your rights with two steps:
46
+ (1) assert copyright on the software, and (2) offer you this License
47
+ giving you legal permission to copy, distribute and/or modify it.
48
+
49
+ For the developers' and authors' protection, the GPL clearly explains
50
+ that there is no warranty for this free software. For both users' and
51
+ authors' sake, the GPL requires that modified versions be marked as
52
+ changed, so that their problems will not be attributed erroneously to
53
+ authors of previous versions.
54
+
55
+ Some devices are designed to deny users access to install or run
56
+ modified versions of the software inside them, although the manufacturer
57
+ can do so. This is fundamentally incompatible with the aim of
58
+ protecting users' freedom to change the software. The systematic
59
+ pattern of such abuse occurs in the area of products for individuals to
60
+ use, which is precisely where it is most unacceptable. Therefore, we
61
+ have designed this version of the GPL to prohibit the practice for those
62
+ products. If such problems arise substantially in other domains, we
63
+ stand ready to extend this provision to those domains in future versions
64
+ of the GPL, as needed to protect the freedom of users.
65
+
66
+ Finally, every program is threatened constantly by software patents.
67
+ States should not allow patents to restrict development and use of
68
+ software on general-purpose computers, but in those that do, we wish to
69
+ avoid the special danger that patents applied to a free program could
70
+ make it effectively proprietary. To prevent this, the GPL assures that
71
+ patents cannot be used to render the program non-free.
72
+
73
+ The precise terms and conditions for copying, distribution and
74
+ modification follow.
75
+
76
+ TERMS AND CONDITIONS
77
+
78
+ 0. Definitions.
79
+
80
+ "This License" refers to version 3 of the GNU General Public License.
81
+
82
+ "Copyright" also means copyright-like laws that apply to other kinds of
83
+ works, such as semiconductor masks.
84
+
85
+ "The Program" refers to any copyrightable work licensed under this
86
+ License. Each licensee is addressed as "you". "Licensees" and
87
+ "recipients" may be individuals or organizations.
88
+
89
+ To "modify" a work means to copy from or adapt all or part of the work
90
+ in a fashion requiring copyright permission, other than the making of an
91
+ exact copy. The resulting work is called a "modified version" of the
92
+ earlier work or a work "based on" the earlier work.
93
+
94
+ A "covered work" means either the unmodified Program or a work based
95
+ on the Program.
96
+
97
+ To "propagate" a work means to do anything with it that, without
98
+ permission, would make you directly or secondarily liable for
99
+ infringement under applicable copyright law, except executing it on a
100
+ computer or modifying a private copy. Propagation includes copying,
101
+ distribution (with or without modification), making available to the
102
+ public, and in some countries other activities as well.
103
+
104
+ To "convey" a work means any kind of propagation that enables other
105
+ parties to make or receive copies. Mere interaction with a user through
106
+ a computer network, with no transfer of a copy, is not conveying.
107
+
108
+ An interactive user interface displays "Appropriate Legal Notices"
109
+ to the extent that it includes a convenient and prominently visible
110
+ feature that (1) displays an appropriate copyright notice, and (2)
111
+ tells the user that there is no warranty for the work (except to the
112
+ extent that warranties are provided), that licensees may convey the
113
+ work under this License, and how to view a copy of this License. If
114
+ the interface presents a list of user commands or options, such as a
115
+ menu, a prominent item in the list meets this criterion.
116
+
117
+ 1. Source Code.
118
+
119
+ The "source code" for a work means the preferred form of the work
120
+ for making modifications to it. "Object code" means any non-source
121
+ form of a work.
122
+
123
+ A "Standard Interface" means an interface that either is an official
124
+ standard defined by a recognized standards body, or, in the case of
125
+ interfaces specified for a particular programming language, one that
126
+ is widely used among developers working in that language.
127
+
128
+ The "System Libraries" of an executable work include anything, other
129
+ than the work as a whole, that (a) is included in the normal form of
130
+ packaging a Major Component, but which is not part of that Major
131
+ Component, and (b) serves only to enable use of the work with that
132
+ Major Component, or to implement a Standard Interface for which an
133
+ implementation is available to the public in source code form. A
134
+ "Major Component", in this context, means a major essential component
135
+ (kernel, window system, and so on) of the specific operating system
136
+ (if any) on which the executable work runs, or a compiler used to
137
+ produce the work, or an object code interpreter used to run it.
138
+
139
+ The "Corresponding Source" for a work in object code form means all
140
+ the source code needed to generate, install, and (for an executable
141
+ work) run the object code and to modify the work, including scripts to
142
+ control those activities. However, it does not include the work's
143
+ System Libraries, or general-purpose tools or generally available free
144
+ programs which are used unmodified in performing those activities but
145
+ which are not part of the work. For example, Corresponding Source
146
+ includes interface definition files associated with source files for
147
+ the work, and the source code for shared libraries and dynamically
148
+ linked subprograms that the work is specifically designed to require,
149
+ such as by intimate data communication or control flow between those
150
+ subprograms and other parts of the work.
151
+
152
+ The Corresponding Source need not include anything that users
153
+ can regenerate automatically from other parts of the Corresponding
154
+ Source.
155
+
156
+ The Corresponding Source for a work in source code form is that
157
+ same work.
158
+
159
+ 2. Basic Permissions.
160
+
161
+ All rights granted under this License are granted for the term of
162
+ copyright on the Program, and are irrevocable provided the stated
163
+ conditions are met. This License explicitly affirms your unlimited
164
+ permission to run the unmodified Program. The output from running a
165
+ covered work is covered by this License only if the output, given its
166
+ content, constitutes a covered work. This License acknowledges your
167
+ rights of fair use or other equivalent, as provided by copyright law.
168
+
169
+ You may make, run and propagate covered works that you do not
170
+ convey, without conditions so long as your license otherwise remains
171
+ in force. You may convey covered works to others for the sole purpose
172
+ of having them make modifications exclusively for you, or provide you
173
+ with facilities for running those works, provided that you comply with
174
+ the terms of this License in conveying all material for which you do
175
+ not control copyright. Those thus making or running the covered works
176
+ for you must do so exclusively on your behalf, under your direction
177
+ and control, on terms that prohibit them from making any copies of
178
+ your copyrighted material outside their relationship with you.
179
+
180
+ Conveying under any other circumstances is permitted solely under
181
+ the conditions stated below. Sublicensing is not allowed; section 10
182
+ makes it unnecessary.
183
+
184
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
185
+
186
+ No covered work shall be deemed part of an effective technological
187
+ measure under any applicable law fulfilling obligations under article
188
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
189
+ similar laws prohibiting or restricting circumvention of such
190
+ measures.
191
+
192
+ When you convey a covered work, you waive any legal power to forbid
193
+ circumvention of technological measures to the extent such circumvention
194
+ is effected by exercising rights under this License with respect to
195
+ the covered work, and you disclaim any intention to limit operation or
196
+ modification of the work as a means of enforcing, against the work's
197
+ users, your or third parties' legal rights to forbid circumvention of
198
+ technological measures.
199
+
200
+ 4. Conveying Verbatim Copies.
201
+
202
+ You may convey verbatim copies of the Program's source code as you
203
+ receive it, in any medium, provided that you conspicuously and
204
+ appropriately publish on each copy an appropriate copyright notice;
205
+ keep intact all notices stating that this License and any
206
+ non-permissive terms added in accord with section 7 apply to the code;
207
+ keep intact all notices of the absence of any warranty; and give all
208
+ recipients a copy of this License along with the Program.
209
+
210
+ You may charge any price or no price for each copy that you convey,
211
+ and you may offer support or warranty protection for a fee.
212
+
213
+ 5. Conveying Modified Source Versions.
214
+
215
+ You may convey a work based on the Program, or the modifications to
216
+ produce it from the Program, in the form of source code under the
217
+ terms of section 4, provided that you also meet all of these conditions:
218
+
219
+ a) The work must carry prominent notices stating that you modified
220
+ it, and giving a relevant date.
221
+
222
+ b) The work must carry prominent notices stating that it is
223
+ released under this License and any conditions added under section
224
+ 7. This requirement modifies the requirement in section 4 to
225
+ "keep intact all notices".
226
+
227
+ c) You must license the entire work, as a whole, under this
228
+ License to anyone who comes into possession of a copy. This
229
+ License will therefore apply, along with any applicable section 7
230
+ additional terms, to the whole of the work, and all its parts,
231
+ regardless of how they are packaged. This License gives no
232
+ permission to license the work in any other way, but it does not
233
+ invalidate such permission if you have separately received it.
234
+
235
+ d) If the work has interactive user interfaces, each must display
236
+ Appropriate Legal Notices; however, if the Program has interactive
237
+ interfaces that do not display Appropriate Legal Notices, your
238
+ work need not make them do so.
239
+
240
+ A compilation of a covered work with other separate and independent
241
+ works, which are not by their nature extensions of the covered work,
242
+ and which are not combined with it such as to form a larger program,
243
+ in or on a volume of a storage or distribution medium, is called an
244
+ "aggregate" if the compilation and its resulting copyright are not
245
+ used to limit the access or legal rights of the compilation's users
246
+ beyond what the individual works permit. Inclusion of a covered work
247
+ in an aggregate does not cause this License to apply to the other
248
+ parts of the aggregate.
249
+
250
+ 6. Conveying Non-Source Forms.
251
+
252
+ You may convey a covered work in object code form under the terms
253
+ of sections 4 and 5, provided that you also convey the
254
+ machine-readable Corresponding Source under the terms of this License,
255
+ in one of these ways:
256
+
257
+ a) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by the
259
+ Corresponding Source fixed on a durable physical medium
260
+ customarily used for software interchange.
261
+
262
+ b) Convey the object code in, or embodied in, a physical product
263
+ (including a physical distribution medium), accompanied by a
264
+ written offer, valid for at least three years and valid for as
265
+ long as you offer spare parts or customer support for that product
266
+ model, to give anyone who possesses the object code either (1) a
267
+ copy of the Corresponding Source for all the software in the
268
+ product that is covered by this License, on a durable physical
269
+ medium customarily used for software interchange, for a price no
270
+ more than your reasonable cost of physically performing this
271
+ conveying of source, or (2) access to copy the
272
+ Corresponding Source from a network server at no charge.
273
+
274
+ c) Convey individual copies of the object code with a copy of the
275
+ written offer to provide the Corresponding Source. This
276
+ alternative is allowed only occasionally and noncommercially, and
277
+ only if you received the object code with such an offer, in accord
278
+ with subsection 6b.
279
+
280
+ d) Convey the object code by offering access from a designated
281
+ place (gratis or for a charge), and offer equivalent access to the
282
+ Corresponding Source in the same way through the same place at no
283
+ further charge. You need not require recipients to copy the
284
+ Corresponding Source along with the object code. If the place to
285
+ copy the object code is a network server, the Corresponding Source
286
+ may be on a different server (operated by you or a third party)
287
+ that supports equivalent copying facilities, provided you maintain
288
+ clear directions next to the object code saying where to find the
289
+ Corresponding Source. Regardless of what server hosts the
290
+ Corresponding Source, you remain obligated to ensure that it is
291
+ available for as long as needed to satisfy these requirements.
292
+
293
+ e) Convey the object code using peer-to-peer transmission, provided
294
+ you inform other peers where the object code and Corresponding
295
+ Source of the work are being offered to the general public at no
296
+ charge under subsection 6d.
297
+
298
+ A separable portion of the object code, whose source code is excluded
299
+ from the Corresponding Source as a System Library, need not be
300
+ included in conveying the object code work.
301
+
302
+ A "User Product" is either (1) a "consumer product", which means any
303
+ tangible personal property which is normally used for personal, family,
304
+ or household purposes, or (2) anything designed or sold for incorporation
305
+ into a dwelling. In determining whether a product is a consumer product,
306
+ doubtful cases shall be resolved in favor of coverage. For a particular
307
+ product received by a particular user, "normally used" refers to a
308
+ typical or common use of that class of product, regardless of the status
309
+ of the particular user or of the way in which the particular user
310
+ actually uses, or expects or is expected to use, the product. A product
311
+ is a consumer product regardless of whether the product has substantial
312
+ commercial, industrial or non-consumer uses, unless such uses represent
313
+ the only significant mode of use of the product.
314
+
315
+ "Installation Information" for a User Product means any methods,
316
+ procedures, authorization keys, or other information required to install
317
+ and execute modified versions of a covered work in that User Product from
318
+ a modified version of its Corresponding Source. The information must
319
+ suffice to ensure that the continued functioning of the modified object
320
+ code is in no case prevented or interfered with solely because
321
+ modification has been made.
322
+
323
+ If you convey an object code work under this section in, or with, or
324
+ specifically for use in, a User Product, and the conveying occurs as
325
+ part of a transaction in which the right of possession and use of the
326
+ User Product is transferred to the recipient in perpetuity or for a
327
+ fixed term (regardless of how the transaction is characterized), the
328
+ Corresponding Source conveyed under this section must be accompanied
329
+ by the Installation Information. But this requirement does not apply
330
+ if neither you nor any third party retains the ability to install
331
+ modified object code on the User Product (for example, the work has
332
+ been installed in ROM).
333
+
334
+ The requirement to provide Installation Information does not include a
335
+ requirement to continue to provide support service, warranty, or updates
336
+ for a work that has been modified or installed by the recipient, or for
337
+ the User Product in which it has been modified or installed. Access to a
338
+ network may be denied when the modification itself materially and
339
+ adversely affects the operation of the network or violates the rules and
340
+ protocols for communication across the network.
341
+
342
+ Corresponding Source conveyed, and Installation Information provided,
343
+ in accord with this section must be in a format that is publicly
344
+ documented (and with an implementation available to the public in
345
+ source code form), and must require no special password or key for
346
+ unpacking, reading or copying.
347
+
348
+ 7. Additional Terms.
349
+
350
+ "Additional permissions" are terms that supplement the terms of this
351
+ License by making exceptions from one or more of its conditions.
352
+ Additional permissions that are applicable to the entire Program shall
353
+ be treated as though they were included in this License, to the extent
354
+ that they are valid under applicable law. If additional permissions
355
+ apply only to part of the Program, that part may be used separately
356
+ under those permissions, but the entire Program remains governed by
357
+ this License without regard to the additional permissions.
358
+
359
+ When you convey a copy of a covered work, you may at your option
360
+ remove any additional permissions from that copy, or from any part of
361
+ it. (Additional permissions may be written to require their own
362
+ removal in certain cases when you modify the work.) You may place
363
+ additional permissions on material, added by you to a covered work,
364
+ for which you have or can give appropriate copyright permission.
365
+
366
+ Notwithstanding any other provision of this License, for material you
367
+ add to a covered work, you may (if authorized by the copyright holders of
368
+ that material) supplement the terms of this License with terms:
369
+
370
+ a) Disclaiming warranty or limiting liability differently from the
371
+ terms of sections 15 and 16 of this License; or
372
+
373
+ b) Requiring preservation of specified reasonable legal notices or
374
+ author attributions in that material or in the Appropriate Legal
375
+ Notices displayed by works containing it; or
376
+
377
+ c) Prohibiting misrepresentation of the origin of that material, or
378
+ requiring that modified versions of such material be marked in
379
+ reasonable ways as different from the original version; or
380
+
381
+ d) Limiting the use for publicity purposes of names of licensors or
382
+ authors of the material; or
383
+
384
+ e) Declining to grant rights under trademark law for use of some
385
+ trade names, trademarks, or service marks; or
386
+
387
+ f) Requiring indemnification of licensors and authors of that
388
+ material by anyone who conveys the material (or modified versions of
389
+ it) with contractual assumptions of liability to the recipient, for
390
+ any liability that these contractual assumptions directly impose on
391
+ those licensors and authors.
392
+
393
+ All other non-permissive additional terms are considered "further
394
+ restrictions" within the meaning of section 10. If the Program as you
395
+ received it, or any part of it, contains a notice stating that it is
396
+ governed by this License along with a term that is a further
397
+ restriction, you may remove that term. If a license document contains
398
+ a further restriction but permits relicensing or conveying under this
399
+ License, you may add to a covered work material governed by the terms
400
+ of that license document, provided that the further restriction does
401
+ not survive such relicensing or conveying.
402
+
403
+ If you add terms to a covered work in accord with this section, you
404
+ must place, in the relevant source files, a statement of the
405
+ additional terms that apply to those files, or a notice indicating
406
+ where to find the applicable terms.
407
+
408
+ Additional terms, permissive or non-permissive, may be stated in the
409
+ form of a separately written license, or stated as exceptions;
410
+ the above requirements apply either way.
411
+
412
+ 8. Termination.
413
+
414
+ You may not propagate or modify a covered work except as expressly
415
+ provided under this License. Any attempt otherwise to propagate or
416
+ modify it is void, and will automatically terminate your rights under
417
+ this License (including any patent licenses granted under the third
418
+ paragraph of section 11).
419
+
420
+ However, if you cease all violation of this License, then your
421
+ license from a particular copyright holder is reinstated (a)
422
+ provisionally, unless and until the copyright holder explicitly and
423
+ finally terminates your license, and (b) permanently, if the copyright
424
+ holder fails to notify you of the violation by some reasonable means
425
+ prior to 60 days after the cessation.
426
+
427
+ Moreover, your license from a particular copyright holder is
428
+ reinstated permanently if the copyright holder notifies you of the
429
+ violation by some reasonable means, this is the first time you have
430
+ received notice of violation of this License (for any work) from that
431
+ copyright holder, and you cure the violation prior to 30 days after
432
+ your receipt of the notice.
433
+
434
+ Termination of your rights under this section does not terminate the
435
+ licenses of parties who have received copies or rights from you under
436
+ this License. If your rights have been terminated and not permanently
437
+ reinstated, you do not qualify to receive new licenses for the same
438
+ material under section 10.
439
+
440
+ 9. Acceptance Not Required for Having Copies.
441
+
442
+ You are not required to accept this License in order to receive or
443
+ run a copy of the Program. Ancillary propagation of a covered work
444
+ occurring solely as a consequence of using peer-to-peer transmission
445
+ to receive a copy likewise does not require acceptance. However,
446
+ nothing other than this License grants you permission to propagate or
447
+ modify any covered work. These actions infringe copyright if you do
448
+ not accept this License. Therefore, by modifying or propagating a
449
+ covered work, you indicate your acceptance of this License to do so.
450
+
451
+ 10. Automatic Licensing of Downstream Recipients.
452
+
453
+ Each time you convey a covered work, the recipient automatically
454
+ receives a license from the original licensors, to run, modify and
455
+ propagate that work, subject to this License. You are not responsible
456
+ for enforcing compliance by third parties with this License.
457
+
458
+ An "entity transaction" is a transaction transferring control of an
459
+ organization, or substantially all assets of one, or subdividing an
460
+ organization, or merging organizations. If propagation of a covered
461
+ work results from an entity transaction, each party to that
462
+ transaction who receives a copy of the work also receives whatever
463
+ licenses to the work the party's predecessor in interest had or could
464
+ give under the previous paragraph, plus a right to possession of the
465
+ Corresponding Source of the work from the predecessor in interest, if
466
+ the predecessor has it or can get it with reasonable efforts.
467
+
468
+ You may not impose any further restrictions on the exercise of the
469
+ rights granted or affirmed under this License. For example, you may
470
+ not impose a license fee, royalty, or other charge for exercise of
471
+ rights granted under this License, and you may not initiate litigation
472
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
473
+ any patent claim is infringed by making, using, selling, offering for
474
+ sale, or importing the Program or any portion of it.
475
+
476
+ 11. Patents.
477
+
478
+ A "contributor" is a copyright holder who authorizes use under this
479
+ License of the Program or a work on which the Program is based. The
480
+ work thus licensed is called the contributor's "contributor version".
481
+
482
+ A contributor's "essential patent claims" are all patent claims
483
+ owned or controlled by the contributor, whether already acquired or
484
+ hereafter acquired, that would be infringed by some manner, permitted
485
+ by this License, of making, using, or selling its contributor version,
486
+ but do not include claims that would be infringed only as a
487
+ consequence of further modification of the contributor version. For
488
+ purposes of this definition, "control" includes the right to grant
489
+ patent sublicenses in a manner consistent with the requirements of
490
+ this License.
491
+
492
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
493
+ patent license under the contributor's essential patent claims, to
494
+ make, use, sell, offer for sale, import and otherwise run, modify and
495
+ propagate the contents of its contributor version.
496
+
497
+ In the following three paragraphs, a "patent license" is any express
498
+ agreement or commitment, however denominated, not to enforce a patent
499
+ (such as an express permission to practice a patent or covenant not to
500
+ sue for patent infringement). To "grant" such a patent license to a
501
+ party means to make such an agreement or commitment not to enforce a
502
+ patent against the party.
503
+
504
+ If you convey a covered work, knowingly relying on a patent license,
505
+ and the Corresponding Source of the work is not available for anyone
506
+ to copy, free of charge and under the terms of this License, through a
507
+ publicly available network server or other readily accessible means,
508
+ then you must either (1) cause the Corresponding Source to be so
509
+ available, or (2) arrange to deprive yourself of the benefit of the
510
+ patent license for this particular work, or (3) arrange, in a manner
511
+ consistent with the requirements of this License, to extend the patent
512
+ license to downstream recipients. "Knowingly relying" means you have
513
+ actual knowledge that, but for the patent license, your conveying the
514
+ covered work in a country, or your recipient's use of the covered work
515
+ in a country, would infringe one or more identifiable patents in that
516
+ country that you have reason to believe are valid.
517
+
518
+ If, pursuant to or in connection with a single transaction or
519
+ arrangement, you convey, or propagate by procuring conveyance of, a
520
+ covered work, and grant a patent license to some of the parties
521
+ receiving the covered work authorizing them to use, propagate, modify
522
+ or convey a specific copy of the covered work, then the patent license
523
+ you grant is automatically extended to all recipients of the covered
524
+ work and works based on it.
525
+
526
+ A patent license is "discriminatory" if it does not include within
527
+ the scope of its coverage, prohibits the exercise of, or is
528
+ conditioned on the non-exercise of one or more of the rights that are
529
+ specifically granted under this License. You may not convey a covered
530
+ work if you are a party to an arrangement with a third party that is
531
+ in the business of distributing software, under which you make payment
532
+ to the third party based on the extent of your activity of conveying
533
+ the work, and under which the third party grants, to any of the
534
+ parties who would receive the covered work from you, a discriminatory
535
+ patent license (a) in connection with copies of the covered work
536
+ conveyed by you (or copies made from those copies), or (b) primarily
537
+ for and in connection with specific products or compilations that
538
+ contain the covered work, unless you entered into that arrangement,
539
+ or that patent license was granted, prior to 28 March 2007.
540
+
541
+ Nothing in this License shall be construed as excluding or limiting
542
+ any implied license or other defenses to infringement that may
543
+ otherwise be available to you under applicable patent law.
544
+
545
+ 12. No Surrender of Others' Freedom.
546
+
547
+ If conditions are imposed on you (whether by court order, agreement or
548
+ otherwise) that contradict the conditions of this License, they do not
549
+ excuse you from the conditions of this License. If you cannot convey a
550
+ covered work so as to satisfy simultaneously your obligations under this
551
+ License and any other pertinent obligations, then as a consequence you may
552
+ not convey it at all. For example, if you agree to terms that obligate you
553
+ to collect a royalty for further conveying from those to whom you convey
554
+ the Program, the only way you could satisfy both those terms and this
555
+ License would be to refrain entirely from conveying the Program.
556
+
557
+ 13. Use with the GNU Affero General Public License.
558
+
559
+ Notwithstanding any other provision of this License, you have
560
+ permission to link or combine any covered work with a work licensed
561
+ under version 3 of the GNU Affero General Public License into a single
562
+ combined work, and to convey the resulting work. The terms of this
563
+ License will continue to apply to the part which is the covered work,
564
+ but the special requirements of the GNU Affero General Public License,
565
+ section 13, concerning interaction through a network will apply to the
566
+ combination as such.
567
+
568
+ 14. Revised Versions of this License.
569
+
570
+ The Free Software Foundation may publish revised and/or new versions of
571
+ the GNU General Public License from time to time. Such new versions will
572
+ be similar in spirit to the present version, but may differ in detail to
573
+ address new problems or concerns.
574
+
575
+ Each version is given a distinguishing version number. If the
576
+ Program specifies that a certain numbered version of the GNU General
577
+ Public License "or any later version" applies to it, you have the
578
+ option of following the terms and conditions either of that numbered
579
+ version or of any later version published by the Free Software
580
+ Foundation. If the Program does not specify a version number of the
581
+ GNU General Public License, you may choose any version ever published
582
+ by the Free Software Foundation.
583
+
584
+ If the Program specifies that a proxy can decide which future
585
+ versions of the GNU General Public License can be used, that proxy's
586
+ public statement of acceptance of a version permanently authorizes you
587
+ to choose that version for the Program.
588
+
589
+ Later license versions may give you additional or different
590
+ permissions. However, no additional obligations are imposed on any
591
+ author or copyright holder as a result of your choosing to follow a
592
+ later version.
593
+
594
+ 15. Disclaimer of Warranty.
595
+
596
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
597
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
598
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
599
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
600
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
601
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
602
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
603
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
604
+
605
+ 16. Limitation of Liability.
606
+
607
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
608
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
609
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
610
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
611
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
612
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
613
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
614
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
615
+ SUCH DAMAGES.
616
+
617
+ 17. Interpretation of Sections 15 and 16.
618
+
619
+ If the disclaimer of warranty and limitation of liability provided
620
+ above cannot be given local legal effect according to their terms,
621
+ reviewing courts shall apply local law that most closely approximates
622
+ an absolute waiver of all civil liability in connection with the
623
+ Program, unless a warranty or assumption of liability accompanies a
624
+ copy of the Program in return for a fee.
625
+
626
+ END OF TERMS AND CONDITIONS
627
+
628
+ How to Apply These Terms to Your New Programs
629
+
630
+ If you develop a new program, and you want it to be of the greatest
631
+ possible use to the public, the best way to achieve this is to make it
632
+ free software which everyone can redistribute and change under these terms.
633
+
634
+ To do so, attach the following notices to the program. It is safest
635
+ to attach them to the start of each source file to most effectively
636
+ state the exclusion of warranty; and each file should have at least
637
+ the "copyright" line and a pointer to where the full notice is found.
638
+
639
+ <one line to give the program's name and a brief idea of what it does.>
640
+ Copyright (C) <year> <name of author>
641
+
642
+ This program is free software: you can redistribute it and/or modify
643
+ it under the terms of the GNU General Public License as published by
644
+ the Free Software Foundation, either version 3 of the License, or
645
+ (at your option) any later version.
646
+
647
+ This program is distributed in the hope that it will be useful,
648
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
649
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
650
+ GNU General Public License for more details.
651
+
652
+ You should have received a copy of the GNU General Public License
653
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
654
+
655
+ Also add information on how to contact you by electronic and paper mail.
656
+
657
+ If the program does terminal interaction, make it output a short
658
+ notice like this when it starts in an interactive mode:
659
+
660
+ <program> Copyright (C) <year> <name of author>
661
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
662
+ This is free software, and you are welcome to redistribute it
663
+ under certain conditions; type `show c' for details.
664
+
665
+ The hypothetical commands `show w' and `show c' should show the appropriate
666
+ parts of the General Public License. Of course, your program's commands
667
+ might be different; for a GUI interface, you would use an "about box".
668
+
669
+ You should also get your employer (if you work as a programmer) or school,
670
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
671
+ For more information on this, and how to apply and follow the GNU GPL, see
672
+ <https://www.gnu.org/licenses/>.
673
+
674
+ The GNU General Public License does not permit incorporating your program
675
+ into proprietary programs. If your program is a subroutine library, you
676
+ may consider it more useful to permit linking proprietary applications with
677
+ the library. If this is what you want to do, use the GNU Lesser General
678
+ Public License instead of this License. But first, please read
679
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
680
+ License-File: LICENSE
681
+ Requires-Python: >=3.10
682
+ Requires-Dist: certifi>=2026.7.22
683
+ Requires-Dist: pyyaml>=6.0.3
684
+ Requires-Dist: requests>=2.34.2
685
+ Requires-Dist: types-requests>=2.33.0.20260712
686
+ Description-Content-Type: text/markdown
687
+
688
+ <!-- TOC -->
689
+ * [check-opencloud-security](#check-opencloud-security)
690
+ * [Quick start](#quick-start)
691
+ * [Features](#features)
692
+ * [Prerequisites](#prerequisites)
693
+ * [Installation](#installation)
694
+ * [Using pipx / uv / pip (recommended)](#using-pipx--uv--pip-recommended)
695
+ * [Updating](#updating)
696
+ * [Docker](#docker)
697
+ * [Icinga2 / Nagios](#icinga2--nagios)
698
+ * [Using the Docker image instead](#using-the-docker-image-instead)
699
+ * [CLI Usage](#cli-usage)
700
+ * [Command](#command)
701
+ * [Options:](#options)
702
+ * [Checking multiple hosts](#checking-multiple-hosts)
703
+ * [Environment variables](#environment-variables)
704
+ * [Why there is no API backend](#why-there-is-no-api-backend)
705
+ * [What the scanner checks](#what-the-scanner-checks)
706
+ * [Reading the version correctly](#reading-the-version-correctly)
707
+ * [TLS and self-signed certificates](#tls-and-self-signed-certificates)
708
+ * [Debug ports](#debug-ports)
709
+ * [End-of-life detection](#end-of-life-detection)
710
+ * [Advisory database](#advisory-database)
711
+ * [Running the scanner as a service](#running-the-scanner-as-a-service)
712
+ * [Update check](#update-check)
713
+ * [The recommended release follows your track](#the-recommended-release-follows-your-track)
714
+ * [Declaring your release track](#declaring-your-release-track)
715
+ * [Configuration file and secrets](#configuration-file-and-secrets)
716
+ * [Rating thresholds](#rating-thresholds)
717
+ * [Hardening checks](#hardening-checks)
718
+ * [Measures that are not settings](#measures-that-are-not-settings)
719
+ * [Accepting a finding you are not going to fix](#accepting-a-finding-you-are-not-going-to-fix)
720
+ * [Explaining a rating](#explaining-a-rating)
721
+ * [Webhook notifications](#webhook-notifications)
722
+ * [Retries and backoff](#retries-and-backoff)
723
+ * [Performance data](#performance-data)
724
+ * [Caching](#caching)
725
+ * [Example output](#example-output)
726
+ * [Icinga Director](#icinga-director)
727
+ * [Automated deployment with Ansible](#automated-deployment-with-ansible)
728
+ * [Scheduling without Icinga2 / Nagios (systemd timer / cron)](#scheduling-without-icinga2--nagios-systemd-timer--cron)
729
+ * [systemd timer](#systemd-timer)
730
+ * [cron](#cron)
731
+ * [Troubleshooting](#troubleshooting)
732
+ * [Examples](#examples)
733
+ * [The basics](#the-basics)
734
+ * [Release track examples](#release-track-examples)
735
+ * [Accepting findings you are not going to fix](#accepting-findings-you-are-not-going-to-fix)
736
+ * [Both together, in a configuration file](#both-together-in-a-configuration-file)
737
+ * [Instances that are not on the public internet](#instances-that-are-not-on-the-public-internet)
738
+ * [Thresholds and notifications](#thresholds-and-notifications)
739
+ * [Icinga2 command definition](#icinga2-command-definition)
740
+ * [The scanner on its own](#the-scanner-on-its-own)
741
+ * [Contributing](#contributing)
742
+ * [License](#license)
743
+ <!-- TOC -->
744
+
745
+ # check-opencloud-security
746
+ Check the security level of your OpenCloud instance from your own monitoring
747
+ system.
748
+
749
+ OpenCloud has no public security scan service and no scan API - there is no
750
+ `scan.opencloud.eu` to ask. This plugin therefore ships its own scanner and
751
+ runs **every check locally**: it talks to the instance directly, reads the
752
+ endpoints OpenCloud exposes without authentication, probes for the
753
+ misconfigurations that actually occur in OpenCloud deployments, and rates the
754
+ result on a `0`-`5` scale. The ratings follow the scale of the Nextcloud scan
755
+ API, so existing thresholds, graphs and alert rules keep their meaning.
756
+
757
+ Nothing about your instance is ever sent to a third party. The only optional
758
+ outbound request is the [update check](#update-check), which asks GitHub for
759
+ the newest OpenCloud release - and even that can be pinned, bundled or turned
760
+ off entirely for an air-gapped setup.
761
+
762
+ # Quick start
763
+ Install the plugin and run a check - one command each:
764
+
765
+ ```shell
766
+ pipx install check-opencloud-security # or: uv tool install / pip install
767
+ check-opencloud-security --host opencloud.example.com
768
+ ```
769
+
770
+ A fresh OpenCloud created with `opencloud init` serves TLS on port 9200 with a
771
+ self-signed certificate. Point the check at it and tell it not to hold the
772
+ certificate against the instance:
773
+
774
+ ```shell
775
+ check-opencloud-security --host opencloud.example.com:9200 --insecure
776
+ ```
777
+
778
+ For a permanent setup (Icinga2, systemd timer, cron, Docker, ...) see
779
+ [Installation](#installation) below.
780
+
781
+ # Features
782
+ - **No API, no third party.** Every check runs in the plugin process, against
783
+ your instance. IP addresses, custom ports and internal hostnames all work,
784
+ and there are no rate limits
785
+ - **OpenCloud-specific checks**: unauthenticated Graph/WebDAV/OCS endpoints,
786
+ exposed `opencloud.yaml`, `proxy/server.key` and boltdb files, reachable
787
+ service debug ports (`/metrics`, `/config`, `/debug/pprof`), enabled basic
788
+ auth, version disclosure and maintenance mode
789
+ - **TLS inspection**: handshake, protocol version, certificate expiry and
790
+ trust, plus an automatic HTTPS -> HTTP fallback that reports the downgrade
791
+ instead of hiding it
792
+ - **Hardening derived from what the instance actually reports**, not guessed
793
+ from its version number: HSTS strength, CSP quality, public-link password
794
+ and expiry enforcement, user-enumeration and password-policy settings
795
+ - **Update check** against the OpenCloud release feed, with offline `pinned`
796
+ and `bundled` modes
797
+ - Configuration from a YAML file, environment variables or a secret provider
798
+ (Docker/Kubernetes secrets, files, environment, commands)
799
+ - Standard Nagios/Icinga exit codes (OK, WARNING, CRITICAL, UNKNOWN) and
800
+ performance data (rating, vulnerability count, scan duration)
801
+ - Configurable rating thresholds for WARNING and CRITICAL
802
+ - Optional hardening and security-header checks (`--check-hardening`)
803
+ - Optional webhook notification when a check turns critical
804
+ - Automatic retry with exponential backoff on transient network errors
805
+ - Web proxy support, debugging, multi-host runs
806
+ - Installable with pipx/uv/pip - or as a ready-to-use Docker image
807
+
808
+ # Prerequisites
809
+ - Python 3.10 or newer - or Docker, if you prefer the containerised route.
810
+ - `requests` and `PyYAML`, installed automatically by pipx/uv/pip.
811
+ - Network access from the monitoring host to the OpenCloud instance. Unlike a
812
+ hosted scanner, this plugin needs to reach the instance itself - which is
813
+ exactly what makes it work for instances that are not on the internet.
814
+
815
+ # Installation
816
+ Installing with pipx, uv or pip is the recommended route; Docker is available
817
+ as an alternative if you don't want Python on the host.
818
+
819
+ ## Using pipx / uv / pip (recommended)
820
+ The package is published on
821
+ [PyPI](https://pypi.org/project/check-opencloud-security/) and installs two
822
+ commands onto your `PATH`: `check-opencloud-security` (the check itself) and
823
+ `check-opencloud-scanner` (the same scanner as a one-shot JSON tool or a
824
+ long-running service).
825
+
826
+ **[pipx](https://pipx.pypa.io/) - recommended for CLI tools**, keeps the plugin
827
+ in its own virtualenv:
828
+ ```shell
829
+ pipx install check-opencloud-security
830
+ ```
831
+
832
+ **[uv](https://docs.astral.sh/uv/)** - same idea, faster:
833
+ ```shell
834
+ uv tool install check-opencloud-security
835
+ ```
836
+
837
+ **pip** - into the system or an existing virtualenv:
838
+ ```shell
839
+ pip install check-opencloud-security
840
+ ```
841
+
842
+ To install the latest unreleased changes, point any of them at the repository
843
+ instead: `pipx install git+https://github.com/sowoi/check-opencloud-security.git`
844
+ (likewise `uv tool install git+https://...` and `pip install git+https://...`).
845
+
846
+ ### Updating
847
+ ```shell
848
+ pipx upgrade check-opencloud-security # pipx
849
+ pipx upgrade-all # ... or every pipx tool at once
850
+
851
+ uv tool upgrade check-opencloud-security # uv
852
+ uv tool upgrade --all # ... or every uv tool at once
853
+
854
+ pip install --upgrade check-opencloud-security # pip
855
+ ```
856
+
857
+ Check what you are running with `check-opencloud-security --version`, and see
858
+ [CHANGELOG.md](CHANGELOG.md) for what changed. A git installation is updated by
859
+ re-running the same `install` command with `--force` (pipx/uv) or
860
+ `--upgrade --force-reinstall` (pip).
861
+
862
+ Keeping the package current matters more here than for a plugin that asks a
863
+ hosted service: the OpenCloud release schedule and the newest known release
864
+ ship *inside* the package (see
865
+ [End-of-life detection](#end-of-life-detection)).
866
+
867
+ To remove the plugin again: `pipx uninstall check-opencloud-security`,
868
+ `uv tool uninstall check-opencloud-security` or
869
+ `pip uninstall check-opencloud-security`.
870
+
871
+ **From a checkout (development or air-gapped install):**
872
+
873
+ The project uses [uv](https://docs.astral.sh/uv/) as its dependency manager;
874
+ `uv.lock` pins every dependency, so an install is reproducible:
875
+
876
+ ```shell
877
+ git clone https://github.com/sowoi/check-opencloud-security.git
878
+ cd check-opencloud-security
879
+
880
+ uv sync # create .venv from uv.lock
881
+ uv run check-opencloud-security --host opencloud.example.com
882
+ ```
883
+
884
+ Without `uv`, install the checkout with pip - the dependencies are declared in
885
+ `pyproject.toml`, no separate requirements file is needed:
886
+
887
+ ```shell
888
+ pip install .
889
+ # or, without installing, run the script in place:
890
+ pip install requests PyYAML
891
+ python3 check_opencloud_security.py --host opencloud.example.com
892
+ ```
893
+
894
+ If some deployment tool of yours insists on a `requirements.txt`, generate one
895
+ from the lock file instead of maintaining it by hand:
896
+
897
+ ```shell
898
+ uv export --no-dev --no-emit-project --format requirements.txt -o requirements.txt
899
+
900
+ # without the hashes, if your tooling cannot handle them:
901
+ uv export --no-dev --no-emit-project --no-hashes --format requirements.txt -o requirements.txt
902
+
903
+ # including the development and test dependencies:
904
+ uv export --no-emit-project --format requirements.txt -o requirements-dev.txt
905
+ ```
906
+
907
+ Such a file is a build artefact - do not commit it, it goes stale the moment
908
+ `uv.lock` changes.
909
+
910
+ ## Docker
911
+ Use this if you would rather not install anything on the host. The image also
912
+ ships the scan service (see
913
+ [Running the scanner as a service](#running-the-scanner-as-a-service)).
914
+
915
+ Build the image once from a local checkout of this repository:
916
+ ```shell
917
+ git clone https://github.com/sowoi/check-opencloud-security.git
918
+ cd check-opencloud-security
919
+ docker build -t check-opencloud-security .
920
+ ```
921
+
922
+ Run a check:
923
+ ```shell
924
+ docker run --rm check-opencloud-security --host opencloud.example.com
925
+ ```
926
+
927
+ Or configure it entirely through [environment variables](#environment-variables)
928
+ (handy since you don't need to edit the `docker run` command per host):
929
+ ```shell
930
+ docker run --rm -e COS_HOST=opencloud.example.com check-opencloud-security
931
+ ```
932
+
933
+ The check container needs no network ports, but - unlike a plugin that calls a
934
+ hosted scan API - it does need to reach the OpenCloud instance itself. If the
935
+ instance is only reachable on the Docker host's own network, add
936
+ `--network host` or the appropriate `--add-host`. It runs as an unprivileged
937
+ `nagios` user and exits with the same Nagios-style codes (`0`/`1`/`2`/`3`) as
938
+ the native script, so it can be dropped straight into any monitoring pipeline
939
+ that already understands `docker run` as a check command (see
940
+ [Icinga2 / Nagios](#icinga2--nagios) and [Icinga Director](#icinga-director)
941
+ below).
942
+
943
+ If you'd rather not build locally, push the built image to your own registry
944
+ (e.g. `docker tag check-opencloud-security registry.example.com/check-opencloud-security`
945
+ followed by `docker push ...`) and reference that image on your monitoring
946
+ host(s) instead.
947
+
948
+ ## Icinga2 / Nagios
949
+ - If you installed the package with pipx/uv/pip, locate the installed `check-opencloud-security` executable (e.g. `which check-opencloud-security`) and reference that path in `PluginDir`, or copy/symlink it into your plugin folder (usually `/usr/lib/nagios/plugins/`).
950
+ - If you're running the script manually, put `check_opencloud_security.py` into your plugin folder instead.
951
+ - Create a new custom command:
952
+
953
+ ```
954
+ object CheckCommand "check_opencloud_security" {
955
+ import "plugin-check-command"
956
+ command = [ PluginDir + "/check-opencloud-security" ]
957
+
958
+ arguments += {
959
+ "--host" = {
960
+ description = "OpenCloud hostname, IP or URL"
961
+ required = true
962
+ value = "$address$"
963
+ }
964
+
965
+ "--port" = {
966
+ description = "Port the instance listens on, e.g. 9200 (optional)"
967
+ value = "$opencloud_port$"
968
+ }
969
+
970
+ "--proxy" = {
971
+ description = "HTTP/HTTPS proxy (optional)"
972
+ required = false
973
+ }
974
+
975
+ "--insecure" = {
976
+ description = "Do not verify the instance's TLS certificate (optional)"
977
+ set_if = "$opencloud_insecure$"
978
+ }
979
+
980
+ "--no-debug-ports" = {
981
+ description = "Skip probing the OpenCloud debug ports (optional)"
982
+ set_if = "$opencloud_no_debug_ports$"
983
+ }
984
+
985
+ "--debug" = {
986
+ description = "Enable debugging output (optional)"
987
+ set_if = "$opencloud_debug$"
988
+ }
989
+
990
+ "--warning" = {
991
+ description = "Rating (0-5) at or below which the check warns (optional)"
992
+ value = "$opencloud_warning$"
993
+ }
994
+
995
+ "--critical" = {
996
+ description = "Rating (0-5) at or below which the check is critical (optional)"
997
+ value = "$opencloud_critical$"
998
+ }
999
+
1000
+ "--check-hardening" = {
1001
+ description = "Also check hardening measures and security headers (optional)"
1002
+ set_if = "$opencloud_check_hardening$"
1003
+ }
1004
+
1005
+ "--update-source" = {
1006
+ description = "Where the newest release is looked up: auto, feed, pinned, bundled, off"
1007
+ value = "$opencloud_update_source$"
1008
+ }
1009
+ }
1010
+ }
1011
+ ```
1012
+
1013
+ - Create a new Service object.
1014
+
1015
+ ```
1016
+ object Service "Service: OpenCloud Security Scan" {
1017
+ import "generic-service"
1018
+ host_name = "YOUR OPENCLOUD HOST"
1019
+ check_command = "check_opencloud_security"
1020
+ check_interval = 24h
1021
+ }
1022
+ ```
1023
+
1024
+ The scan only talks to your own instance, so there is no external rate limit to
1025
+ respect and a shorter interval than 24h is technically fine. A full scan does
1026
+ issue a few dozen requests plus the debug-port probes, though, so an hourly
1027
+ check is a sensible floor - and if the [update check](#update-check) uses the
1028
+ GitHub feed, keep it at a few times a day or supply a token.
1029
+
1030
+ ### Using the Docker image instead
1031
+
1032
+ If you installed via [Docker](#docker), point the `CheckCommand` at `docker`
1033
+ and let it run the container on demand instead of a local binary:
1034
+
1035
+ ```
1036
+ object CheckCommand "check_opencloud_security_docker" {
1037
+ import "plugin-check-command"
1038
+ command = [ "/usr/bin/docker" ]
1039
+
1040
+ arguments += {
1041
+ "run" = {
1042
+ order = -5
1043
+ value = "run"
1044
+ }
1045
+ "--rm" = {
1046
+ order = -4
1047
+ value = "--rm"
1048
+ }
1049
+ "image" = {
1050
+ order = -3
1051
+ skip_key = true
1052
+ value = "check-opencloud-security"
1053
+ }
1054
+ "--host" = {
1055
+ description = "OpenCloud hostname, IP or URL"
1056
+ required = true
1057
+ value = "$address$"
1058
+ }
1059
+ "--port" = {
1060
+ description = "Port the instance listens on, e.g. 9200 (optional)"
1061
+ value = "$opencloud_port$"
1062
+ }
1063
+ "--proxy" = {
1064
+ description = "HTTP/HTTPS proxy (optional)"
1065
+ required = false
1066
+ }
1067
+ "--insecure" = {
1068
+ description = "Do not verify the instance's TLS certificate (optional)"
1069
+ set_if = "$opencloud_insecure$"
1070
+ }
1071
+ "--debug" = {
1072
+ description = "Enable debugging output (optional)"
1073
+ set_if = "$opencloud_debug$"
1074
+ }
1075
+ "--warning" = {
1076
+ description = "Rating (0-5) at or below which the check warns (optional)"
1077
+ value = "$opencloud_warning$"
1078
+ }
1079
+ "--critical" = {
1080
+ description = "Rating (0-5) at or below which the check is critical (optional)"
1081
+ value = "$opencloud_critical$"
1082
+ }
1083
+ "--check-hardening" = {
1084
+ description = "Also check hardening measures and security headers (optional)"
1085
+ set_if = "$opencloud_check_hardening$"
1086
+ }
1087
+ }
1088
+ }
1089
+ ```
1090
+
1091
+ This assumes the `check-opencloud-security` image has already been built (or
1092
+ pulled) on the Icinga2 host, that the user running the Icinga2 daemon has
1093
+ permission to talk to the Docker socket, and that the container can reach the
1094
+ OpenCloud instance.
1095
+
1096
+ # CLI Usage
1097
+ - `check-opencloud-security -h` will show you a manual.
1098
+
1099
+ ## Command
1100
+ ```shell
1101
+ check-opencloud-security --host <Hostname> --check-hardening
1102
+ ```
1103
+
1104
+ # Options:
1105
+ | Option | Description | Default | Environment variable |
1106
+ |:--------------------|:--------------------------------------------------------|:-------------|:----------------------|
1107
+ | `-H, --host` | OpenCloud server address(es): hostname, IP or URL, optionally with a port. Accepts a comma-separated list to check multiple hosts in one run | **required** | `COS_HOST` |
1108
+ | `-P, --proxy` | Proxy server address | *None* | `COS_PROXY` |
1109
+ | `-d, --debug` | Explain the rating and every finding; verbose logging | *False* | `COS_DEBUG` |
1110
+ | `-w, --warning` | Rating (0-5) at or below which the check warns | `3` (`C`) | `COS_WARNING` |
1111
+ | `-c, --critical` | Rating (0-5) at or below which the check is critical | `1` (`E`) | `COS_CRITICAL` |
1112
+ | `--check-hardening` | Also report missing hardening measures and security headers | *False* | `COS_CHECK_HARDENING` |
1113
+ | `--timeout` | HTTP timeout in seconds per request | `10` | `COS_TIMEOUT` |
1114
+ | `--port` | Port the instance listens on (OpenCloud's own proxy uses `9200`) | from `--host`, else `443` | `COS_SCANNER_TARGET_PORT` |
1115
+ | `--scheme` | `https` or `http`; `https` falls back to `http` automatically | `https` | `COS_SCANNER_SCHEME` |
1116
+ | `--insecure` | Do not verify the instance's TLS certificate | *False* | `COS_INSECURE` |
1117
+ | `--no-extra-checks` | Only check product, version and security headers | *False* | `COS_NO_EXTRA_CHECKS` |
1118
+ | `--no-debug-ports` | Skip probing the OpenCloud debug ports | *False* | `COS_NO_DEBUG_PORTS` |
1119
+ | `--ignore-hardening`| Hardening measure or check to accept, repeatable, comma-separated and wildcard capable | *None* | `COS_SCANNER_IGNORE_HARDENINGS` |
1120
+ | `--release-track` | Release track this instance follows: `rolling`, `production` or `lts` | inferred | `COS_SCANNER_RELEASE_TRACK` |
1121
+ | `--update-source` | Where the newest release comes from: `auto`, `feed`, `pinned`, `bundled`, `off` | `auto` | `COS_UPDATE_SOURCE` |
1122
+ | `--release-feed` | URL of the release feed | GitHub releases API of `opencloud-eu/opencloud` | `COS_RELEASES_FEED_URL` |
1123
+ | `--release-token` | Token for the release feed (raises GitHub's rate limit)| *None* | `COS_RELEASES_TOKEN` |
1124
+ | `--latest-version` | Newest release, given explicitly; implies `--update-source pinned` | *None* | `COS_RELEASES_LATEST_VERSION` |
1125
+ | `--no-update-check` | Disable the update check (same as `--update-source off`)| *False* | `COS_NO_UPDATE_CHECK` |
1126
+ | `--update-warning` | Report WARNING when a newer release is available | *False* | `COS_UPDATE_WARNING` |
1127
+ | `--webhook-url` | Optional endpoint notified when the check reaches the configured state | *None* (disabled) | `COS_WEBHOOK_URL` |
1128
+ | `--webhook-on` | Lowest state that triggers the webhook (`critical`, `warning`, `unknown`, `always`) | `critical` | `COS_WEBHOOK_ON` |
1129
+ | `--webhook-header` | Extra header for the webhook request, repeatable | *None* | `COS_WEBHOOK_HEADERS` |
1130
+ | `--webhook-timeout` | HTTP timeout in seconds for the webhook call | `10` | `COS_WEBHOOK_TIMEOUT` |
1131
+ | `--retries` | Retry attempts for transient network errors | `2` | `COS_RETRIES` |
1132
+ | `--backoff-factor` | Exponential backoff factor (seconds) between retries | `0.5` | `COS_BACKOFF_FACTOR` |
1133
+ | `--config` | Path to the YAML configuration file | auto-discovered | `COS_CONFIG_FILE` |
1134
+ | `-V, --version` | Show the installed version and exit | — | — |
1135
+ | `-h, --help` | Show help and exit | — | — |
1136
+
1137
+ Settings that have no command-line flag of their own - the TLS expiry window,
1138
+ the debug-port list, the advisory sources - are configured through the
1139
+ [configuration file](#configuration-file-and-secrets) or their `COS_SCANNER_*`
1140
+ environment variables.
1141
+
1142
+ # Checking multiple hosts
1143
+ `--host` (and `COS_HOST`) accepts a comma-separated list of hostnames, e.g.:
1144
+
1145
+ ```shell
1146
+ check-opencloud-security --host opencloud1.example.com,opencloud2.example.com
1147
+ ```
1148
+
1149
+ Hosts are processed one by one. The output starts with a one-line summary
1150
+ (e.g. `Checked 2 host(s): overall CRITICAL (1 CRITICAL, 1 OK)`), followed by
1151
+ one result block per host. The plugin exits with the worst status found
1152
+ across all hosts, using the usual Nagios/Icinga priority: `CRITICAL` >
1153
+ `WARNING` > `UNKNOWN` > `OK`. A single host still produces the original,
1154
+ single-block output and exit code, so existing single-host setups are
1155
+ unaffected.
1156
+
1157
+ Whitespace around each hostname is ignored, and empty entries (e.g. from a
1158
+ trailing comma) are dropped. Because there is no hosted API involved, each
1159
+ entry may be a hostname, an IPv4 address, a bracketed IPv6 address or a full
1160
+ URL, with or without a port:
1161
+ `--host 10.0.0.5:9200,[2001:db8::1],https://cloud.example.com/`.
1162
+
1163
+ # Environment variables
1164
+ Every option has a `COS_`-prefixed environment variable equivalent (see the
1165
+ table above). This is especially useful for Docker, systemd, and cron, where
1166
+ setting environment variables is often more convenient than editing a command
1167
+ line. **An explicit command-line flag always takes precedence over its
1168
+ environment variable.**
1169
+
1170
+ ```shell
1171
+ export COS_HOST=opencloud.example.com
1172
+ export COS_PROXY=http://proxy.example.com:3128
1173
+ check-opencloud-security
1174
+ ```
1175
+
1176
+ Boolean variables (`COS_DEBUG`, `COS_CHECK_HARDENING`, `COS_INSECURE`, ...)
1177
+ accept `1`, `true`, `yes`, or `on` (case-insensitive) to enable the
1178
+ corresponding flag; any other value (including unset/empty) is treated as
1179
+ disabled.
1180
+
1181
+ The same values can also come from a YAML file or a secret provider - see
1182
+ [Configuration file and secrets](#configuration-file-and-secrets).
1183
+
1184
+ # Why there is no API backend
1185
+ OpenCloud publishes no hosted scan service and no API that reports an
1186
+ instance's security state, so there is nothing for the plugin to ask.
1187
+
1188
+ That turns out to be less of a loss than it sounds. A hosted scanner can only
1189
+ see what is reachable from the internet, refuses IP addresses and internal
1190
+ hostnames, rate-limits its callers and learns about your instance in the
1191
+ process. Scanning locally has none of those constraints, so this plugin has
1192
+ **one** backend: the scanner in
1193
+ [`opencloud_local_scan/`](opencloud_local_scan/README.md), which runs in the
1194
+ plugin process.
1195
+
1196
+ There is nothing to enable and no `--scan-backend` flag to pass. Everything
1197
+ below describes what that scanner does and how to tune it.
1198
+
1199
+ ## What the scanner checks
1200
+
1201
+ Read from the instance itself:
1202
+
1203
+ - product, `productversion` and edition from `/status.php`, plus
1204
+ `maintenance` and `needsDbUpgrade`
1205
+ - capabilities from `/ocs/v1.php/cloud/capabilities` (both endpoints are
1206
+ unauthenticated in OpenCloud)
1207
+ - the security headers `Strict-Transport-Security`, `Content-Security-Policy`,
1208
+ `X-Content-Type-Options`, `X-Frame-Options`,
1209
+ `X-Permitted-Cross-Domain-Policies`, `X-Robots-Tag`, `X-XSS-Protection` and
1210
+ `Referrer-Policy`, reported as `setup.headers`
1211
+ - `hardenings` derived from those headers and capabilities
1212
+ - known vulnerabilities from the [advisory database](#advisory-database) and
1213
+ the resulting rating (`0`-`5`)
1214
+
1215
+ Plus the additional checks (`extraChecks` in the JSON, disable with
1216
+ `--no-extra-checks`):
1217
+
1218
+ | Check | Severity | Purpose |
1219
+ |:------|:---------|:--------|
1220
+ | `httpsAvailable`, `tlsHandshake`, `tlsProtocol` | critical/high | Instance only reachable over HTTP, broken TLS, or a protocol older than TLS 1.2 |
1221
+ | `tlsCertificate`, `tlsTrusted` | high/medium | Certificate expired, expiring within `scanner.tls_min_days`, or not trusted |
1222
+ | `header:<name>` | high - low | One of the headers above missing or too weak |
1223
+ | `authentication:/remote.php/dav/files/`, `/graph/v1.0/users`, `/ocs/v1.php/cloud/user` | critical/high | An endpoint that must demand authentication answered anyway |
1224
+ | `exposed:/opencloud.yaml`, `/proxy/server.key`, `/idm/opencloud.boltdb`, `/.env`, `/docker-compose.yml`, `/storage/users/`, `/.git/config` | critical/high | Deployment internals published by a misconfigured reverse proxy |
1225
+ | `directoryListing` | critical | A directory index served instead of the web frontend |
1226
+ | `debugEndpoint:/metrics`, `/config`, `/debug/pprof/` | critical/high | Debug handlers reachable on the public address |
1227
+ | `debugPort:<port>` | high | A service debug port answering from the outside |
1228
+ | `basicAuthDisabled` | medium | The proxy still offers HTTP basic authentication |
1229
+ | `versionDisclosure:Server`, `webfingerVersionDisclosure` | low | Exact versions leaked to unauthenticated callers |
1230
+ | `maintenanceMode`, `databaseUpgrade` | medium/high | Instance in maintenance mode or waiting for a database upgrade |
1231
+
1232
+ A failed additional check caps the rating (critical -> `D`, high -> `C`, medium
1233
+ -> `A`, low -> `A+`); set `scanner.extra_checks_rating: false` to report them
1234
+ without touching the rating.
1235
+
1236
+ OpenCloud is a single Go binary that serves its web frontend from embedded
1237
+ assets, and its frontend is a single-page application: unknown paths return the
1238
+ app shell with HTTP 200 rather than a 404. A naive "does `/opencloud.yaml`
1239
+ return 200?" check would therefore flag every healthy instance. The scanner
1240
+ first probes a path that cannot exist, learns what the catch-all response looks
1241
+ like, and only reports an exposed path whose response actually differs from it.
1242
+
1243
+ ## Reading the version correctly
1244
+
1245
+ `/status.php` reports three version fields, and two of them are traps:
1246
+
1247
+ ```json
1248
+ {"version":"0.1.0.0","versionstring":"0.1.0","productversion":"7.4.0"}
1249
+ ```
1250
+
1251
+ `version` and `versionstring` are hardcoded constants OpenCloud sends to keep
1252
+ old sync clients happy - they are the same on every instance and say nothing
1253
+ about the release. The real release is **`productversion`** only. The scanner
1254
+ uses `productversion`, falls back to the capabilities endpoint, and reports
1255
+ `legacyVersion: true` in the result document when an instance offers nothing
1256
+ but the placeholder. Anything comparing versions from `/status.php` by hand
1257
+ (including other monitoring scripts you may already run) is almost certainly
1258
+ reading the wrong field.
1259
+
1260
+ ## TLS and self-signed certificates
1261
+
1262
+ OpenCloud's proxy terminates TLS itself on port 9200, and `opencloud init`
1263
+ generates a self-signed certificate for it. Many deployments then put a reverse
1264
+ proxy with a real certificate in front; many others do not.
1265
+
1266
+ The scanner handles both without needing to be told which one it is looking at:
1267
+
1268
+ 1. HTTPS with certificate verification. If that works, everything is fine.
1269
+ 2. HTTPS without verification. The scan continues and reports `tlsTrusted` as
1270
+ a failed check - you still get the full result, plus the fact that the chain
1271
+ is not trusted.
1272
+ 3. Plain HTTP, reported as `httpsAvailable` (critical).
1273
+
1274
+ `--insecure` (`COS_INSECURE`) skips step 1. The untrusted chain is still
1275
+ listed in the output; it just stops counting against the rating. Use it for an
1276
+ instance you know is self-signed, so that a genuinely broken certificate
1277
+ elsewhere still stands out.
1278
+
1279
+ ## Debug ports
1280
+
1281
+ Every OpenCloud service has a debug listener that serves `/healthz`,
1282
+ `/readyz`, `/metrics`, `/config` and `/debug/pprof`. `/metrics` includes
1283
+ `opencloud_proxy_build_info` (exact version), `/config` dumps the effective
1284
+ service configuration, and `/debug/pprof` allows anyone to trigger profiling.
1285
+
1286
+ These listeners bind to loopback by default, so a debug port that answers from
1287
+ your monitoring host is a genuine finding - usually a container that published
1288
+ the whole port range. The scanner probes the five most informative ones:
1289
+
1290
+ | Port | Service |
1291
+ |:-----|:--------|
1292
+ | 9205 | proxy |
1293
+ | 9141 | frontend |
1294
+ | 9124 | graph |
1295
+ | 9134 | idp |
1296
+ | 9239 | idm |
1297
+
1298
+ Each probe is a single TCP connect with a three second timeout, so a firewalled
1299
+ host costs up to 15 seconds. Turn the probes off with `--no-debug-ports`, or
1300
+ tune them:
1301
+
1302
+ ```yaml
1303
+ scanner:
1304
+ check_debug_ports: true
1305
+ debug_ports: [9205, 9141]
1306
+ debug_port_timeout: 1
1307
+ ```
1308
+
1309
+ ## End-of-life detection
1310
+
1311
+ A version number on its own does not tell you whether an OpenCloud instance is
1312
+ still receiving security fixes, because OpenCloud maintains three kinds of
1313
+ releases at the same time:
1314
+
1315
+ | Track | Cadence | Supported until | Support |
1316
+ |:------|:--------|:----------------|:--------|
1317
+ | **Rolling** | about every 3 weeks | its successor is released | community |
1318
+ | **Production** | about every 6 months | the next production release | professional |
1319
+ | **LTS** | a production line | 2 years after the line opened | professional |
1320
+
1321
+ See the [OpenCloud release lifecycle][lifecycle] for the authoritative
1322
+ description.
1323
+
1324
+ [lifecycle]: https://docs.opencloud.eu/docs/admin/resources/lifecycle/
1325
+
1326
+ The consequence for monitoring is that the *same* version can be perfectly
1327
+ current or long dead depending on the track it was published on. `7.2.3` is the
1328
+ current production release even though the rolling track is already at `7.4.0`,
1329
+ while `7.3.0` - a *higher* version - stopped receiving fixes the day `7.4.0`
1330
+ appeared.
1331
+
1332
+ The plugin therefore works in **release lines** (`MAJOR.MINOR`), which is the
1333
+ unit OpenCloud maintains: `7.2.3` is a patch of the `7.2` line. A line can
1334
+ belong to more than one track - `7.2` shipped as a rolling release before it
1335
+ was promoted to production, and `4.0` is both the previous production line and
1336
+ the current LTS line - and it is judged by whichever track supports it longest.
1337
+
1338
+ The schedule ships in `opencloud_local_scan/data/release_schedule.json` and is
1339
+ scraped from the release dates in the OpenCloud admin documentation, the only
1340
+ source that states the release *type*; the GitHub release list cannot tell a
1341
+ rolling release from a production one. It is refreshed on every release and
1342
+ weekly by a [scheduled workflow](.github/workflows/release-schedule.yml).
1343
+
1344
+ A line that is out of support is rated `F` and reported as `CRITICAL`:
1345
+
1346
+ ```
1347
+ CRITICAL: The 7.3 rolling release line is end-of-life and has no security fixes. Upgrade to 7.4.0.
1348
+ OpenCloud 7.3.0 on cloud.example.com, rating: F, last scanned: 2026-08-12 15:18:08.839323
1349
+ Release lifecycle: 7.3 (rolling), out of support since 2026-08-03, upgrade to 7.4.0
1350
+ ```
1351
+
1352
+ A supported line reports how much time is left, which is what makes an LTS
1353
+ instance worth monitoring at all:
1354
+
1355
+ ```
1356
+ Release lifecycle: 4.0 (lts), supported until 2027-12-01 (476 days left)
1357
+ ```
1358
+
1359
+ The remaining window is also published as the `support_days_left` performance
1360
+ value, so a graph shows it shrinking - and going negative once the line is
1361
+ overdue.
1362
+
1363
+ ```yaml
1364
+ scanner:
1365
+ use_release_schedule: true # false disables the EOL check entirely
1366
+ # release_schedule: /etc/check-opencloud-security/schedule.json
1367
+ ```
1368
+
1369
+ Or via the environment: `COS_SCANNER_USE_RELEASE_SCHEDULE`,
1370
+ `COS_SCANNER_RELEASE_SCHEDULE`.
1371
+
1372
+ Two things are worth knowing about the bundled schedule:
1373
+
1374
+ - **LTS releases are only available with a subscription**, so an LTS line is
1375
+ recognised from the documentation but its releases may never appear
1376
+ publicly. If your vendor has committed to a different window, point
1377
+ `release_schedule` at your own file rather than letting the bundled one
1378
+ decide.
1379
+ - **A release newer than everything in the schedule is never rated `F`.** The
1380
+ file ages between updates, and a fresh release must not trip the alarm.
1381
+
1382
+ ## Advisory database
1383
+ Known vulnerabilities are matched against the version range
1384
+ `[introduced, fixed)` of a local advisory database. Sources are merged in this
1385
+ order and de-duplicated by id:
1386
+
1387
+ 1. the file bundled with the package,
1388
+ 2. every file in `scanner.vulnerability_db`,
1389
+ 3. the JSON feed in `scanner.vulnerability_feed`.
1390
+
1391
+ The native format (`{"advisories": [{"id": ..., "introduced": ...,
1392
+ "fixed": ...}]}`), the GitHub Advisory API format and OSV documents are all
1393
+ understood, so an air-gapped setup can mirror a feed to a file without
1394
+ conversion. A feed that is unreachable is logged and ignored - it never turns a
1395
+ healthy instance into `UNKNOWN`.
1396
+
1397
+ > **The bundled database is empty.** At the time of writing no CVE or GHSA has
1398
+ > been published for OpenCloud, so `vulnerabilities: []` means "nothing in the
1399
+ > database you configured matched", not "this version is known to be safe". The
1400
+ > rating you get is driven by the configuration checks above. Point
1401
+ > `scanner.vulnerability_feed` at OSV or your own advisory mirror to make that
1402
+ > part of the check meaningful.
1403
+
1404
+ ## Running the scanner as a service
1405
+
1406
+ The package ships a second entry point, `check-opencloud-scanner`. It runs the
1407
+ very same scanner, either once or as a service:
1408
+
1409
+ ```shell
1410
+ # one-shot: print the full result document as JSON
1411
+ check-opencloud-scanner scan opencloud.example.com
1412
+
1413
+ # as a service
1414
+ check-opencloud-scanner serve --port 8080
1415
+ ```
1416
+
1417
+ | Endpoint | Behaviour |
1418
+ |:---------|:----------|
1419
+ | `POST /api/queue` (`url=<host>`) | Scan the host, return `{"uuid": ...}` |
1420
+ | `GET /api/result/<uuid>` | Return the stored result |
1421
+ | `POST /api/requeue` (`url=<host>`) | Discard the cache and scan again |
1422
+ | `GET /api/scan?url=<host>` | Convenience: scan and return the document |
1423
+ | `GET /healthz` | Liveness probe |
1424
+
1425
+ The plugin does **not** talk to this service - it has no remote backend and
1426
+ always scans in process. The service exists so that several consumers (a
1427
+ dashboard, a script, a second monitoring system) can share one cached result,
1428
+ and so that scans can run from a host closer to the instance than the
1429
+ monitoring server is. Results are cached per host for `service.cache_ttl`
1430
+ seconds, 15 minutes by default.
1431
+
1432
+ Protect it with a token whenever it is reachable by others - without
1433
+ `service.token` every endpoint is open to anyone who can connect, and the
1434
+ scanner will happily scan any host they name:
1435
+
1436
+ ```shell
1437
+ docker run -d --name opencloud-scanner -p 127.0.0.1:8080:8080 \
1438
+ -e COS_SERVICE_TOKEN="$(openssl rand -hex 32)" \
1439
+ --entrypoint check-opencloud-scanner \
1440
+ check-opencloud-security serve
1441
+
1442
+ curl -H "Authorization: Bearer <token>" \
1443
+ 'http://127.0.0.1:8080/api/scan?url=opencloud.example.com'
1444
+ ```
1445
+
1446
+ A ready-made [`docker-compose.yml`](docker-compose.yml) starts the scanner plus
1447
+ a check container, including a health check and Docker secrets:
1448
+
1449
+ ```shell
1450
+ # 1. create the secret files from the templates
1451
+ cp secrets/scanner_token.example secrets/scanner_token
1452
+ cp secrets/releases_token.example secrets/releases_token
1453
+
1454
+ # 2. fill them with real values
1455
+ openssl rand -hex 32 > secrets/scanner_token # protects the service
1456
+ printf '%s' '<github-token>' > secrets/releases_token
1457
+ chmod 600 secrets/scanner_token secrets/releases_token
1458
+
1459
+ # 3. adjust COS_HOST in docker-compose.yml, then:
1460
+ docker compose up -d scanner
1461
+ docker compose run --rm check
1462
+ ```
1463
+
1464
+ Everything in `secrets/` except the `*.example` templates is git-ignored - see
1465
+ [`secrets/README.md`](secrets/README.md).
1466
+
1467
+ # Update check
1468
+ There is no update endpoint on an OpenCloud instance, so "is this the newest
1469
+ release?" is answered by comparing the `productversion` the instance reports
1470
+ against the OpenCloud release feed on GitHub. `--update-source` selects where
1471
+ that number comes from:
1472
+
1473
+ | Mode | Behaviour |
1474
+ |:-----|:----------|
1475
+ | `auto` (default) | Try the feed; on any failure fall back to the release bundled with the package |
1476
+ | `feed` | Only the feed. A failure is reported as unknown rather than silently ignored |
1477
+ | `pinned` | Use `--latest-version`. No network access |
1478
+ | `bundled` | Use the release recorded in the shipped data file. No network access |
1479
+ | `off` | Skip the update check entirely (same as `--no-update-check`) |
1480
+
1481
+ ```shell
1482
+ # ask GitHub, with a token to stay clear of the anonymous rate limit
1483
+ check-opencloud-security --host opencloud.example.com \
1484
+ --release-token 'secret://releases_token'
1485
+
1486
+ # fully offline: compare against a version you control
1487
+ check-opencloud-security --host opencloud.example.com --latest-version 7.4.0
1488
+ ```
1489
+
1490
+ The anonymous GitHub API allows sixty requests per hour and IP address, shared
1491
+ with everything else on that address. A token - a fine-grained one without any
1492
+ permission is enough - raises that considerably. In `auto` mode a rate-limited
1493
+ lookup is not an error: the check falls back to the bundled release, which is
1494
+ as new as the installed package.
1495
+
1496
+ The result is reported as an extra output line and as the `update_available`
1497
+ performance metric; with `--update-warning` a pending update turns an otherwise
1498
+ `OK` result into `WARNING`. A failing update check never aborts the security
1499
+ check.
1500
+
1501
+ ## The recommended release follows your track
1502
+
1503
+ A release feed only knows the newest release *overall*, and on OpenCloud that
1504
+ is always a rolling one. Recommending it to a production or LTS instance would
1505
+ quietly move it onto a track with a three-week support window - the opposite
1506
+ of what an operator on the production track signed up for.
1507
+
1508
+ The update check therefore uses the
1509
+ [release schedule](#end-of-life-detection) to pick a target on the instance's
1510
+ own track:
1511
+
1512
+ | Installed | Track | Recommended | Why |
1513
+ |:----------|:------|:------------|:----|
1514
+ | `7.2.3` | production | *nothing* | Current production release, even though rolling is at `7.4.0` |
1515
+ | `7.2.0` | production | `7.2.3` | The newest patch of the same line |
1516
+ | `7.3.0` | rolling | `7.4.0` | On rolling, the newest release is the right one |
1517
+ | `4.0.0` | LTS | `4.0.8` | Where the backports are |
1518
+
1519
+ The newest release overall is still reported, as `newestRelease` in the JSON
1520
+ result and the webhook payload, so nothing is hidden - it is just not
1521
+ presented as the thing to install. If the feed reports a newer patch of the
1522
+ line you are already on, the feed wins, because it is fresher than the bundled
1523
+ schedule.
1524
+
1525
+ ## Declaring your release track
1526
+
1527
+ By default the release schedule works out which track a version belongs to and
1528
+ judges it as generously as the truth allows: `7.2.3` appears on both the
1529
+ rolling and the production track, so it is treated as a production release and
1530
+ is current.
1531
+
1532
+ That is the right answer when nobody has said otherwise, but it is not the
1533
+ right answer for everyone. If you deliberately follow the rolling track, then
1534
+ `7.2.3` went out of support the day `7.4.0` shipped, and you want to be told
1535
+ so. `--release-track` says which track you are on, and the version is then
1536
+ judged on that track alone:
1537
+
1538
+ ```bash
1539
+ check-opencloud-security --host opencloud.example.com --release-track rolling
1540
+ ```
1541
+
1542
+ | Installed | Declared | Verdict |
1543
+ |:----------|:---------|:--------|
1544
+ | `7.2.3` | *nothing* | Supported - current production release |
1545
+ | `7.2.3` | `production` | Supported - current production release |
1546
+ | `7.2.3` | `rolling` | **End of life** - superseded by `7.4.0`, upgrade to `7.4.0` |
1547
+ | `7.4.0` | `production` | **End of life** - `7.4.0` is a rolling release and was never published on the production track |
1548
+ | `4.0.8` | `lts` | Supported until the two-year window closes |
1549
+
1550
+ Two consequences are worth knowing about in advance:
1551
+
1552
+ - **A newer version can be less supported than an older one.** `7.4.0` is
1553
+ newer than `7.2.3`, but on the production track it does not exist, while
1554
+ `7.2.3` is current. This is not a bug in the check; it is what the tracks
1555
+ mean.
1556
+ - **The check never recommends a downgrade.** If your declared track has no
1557
+ release you could move *up* to, the update recommendation stays empty and
1558
+ the reason explains the situation instead. Moving from `7.4.0` back to
1559
+ `7.2.3` is a decision for a human, not for a monitoring plugin.
1560
+
1561
+ The declared track also steers the update recommendation described in
1562
+ [the section above](#the-recommended-release-follows-your-track), and the
1563
+ output marks it as declared so it can be told apart from an inferred one:
1564
+
1565
+ ```
1566
+ Release lifecycle: 7.2 (rolling track declared), out of support since 2026-07-14, upgrade to 7.4.0
1567
+ ```
1568
+
1569
+ An unknown value is ignored rather than treated as an error, so a typo in a
1570
+ config file degrades to the default behaviour instead of taking the check down.
1571
+
1572
+ # Configuration file and secrets
1573
+ All settings can live in a YAML file instead of the command line. It is read
1574
+ from `--config`, `COS_CONFIG_FILE`, `./check-opencloud-security.yml` or
1575
+ `/etc/check-opencloud-security/config.yml` (first match wins). See
1576
+ [`config/check-opencloud-security.example.yml`](config/check-opencloud-security.example.yml)
1577
+ for a fully commented example.
1578
+
1579
+ ```yaml
1580
+ host: opencloud.example.com
1581
+ check_hardening: true
1582
+
1583
+ scanner:
1584
+ verify_tls: false # self-signed instance
1585
+ target_port: 9200
1586
+ tls_min_days: 21
1587
+ check_debug_ports: true
1588
+
1589
+ releases:
1590
+ mode: auto
1591
+ token: secret://releases_token
1592
+ ```
1593
+
1594
+ Nested keys map one to one onto the environment variables: `scanner.target_port`
1595
+ is `COS_SCANNER_TARGET_PORT`, `releases.token` is `COS_RELEASES_TOKEN`,
1596
+ `scanner.tls_min_days` is `COS_SCANNER_TLS_MIN_DAYS`. Precedence is
1597
+ **command line > environment variable > configuration file > default**.
1598
+
1599
+ Secrets never have to be written into the file or the process environment.
1600
+ Any value may be a reference:
1601
+
1602
+ | Reference | Resolves to |
1603
+ |:----------|:------------|
1604
+ | `secret://name` | `<secrets.dir>/name`, i.e. `/run/secrets/name` for Docker and Kubernetes secrets |
1605
+ | `file:///path/to/file` | The contents of that file |
1606
+ | `env://VARIABLE` | The value of that environment variable |
1607
+ | `exec://command --arg` | The stdout of that command (requires `secrets.allow_exec: true`) |
1608
+
1609
+ Alternatively append `_file` to any key or variable:
1610
+ `COS_RELEASES_TOKEN_FILE=/run/secrets/token` or `token_file: /run/secrets/token`.
1611
+ Trailing newlines are stripped, so `echo secret > file` works as expected.
1612
+
1613
+ `secret://name` looks below `secrets.dir` (`COS_SECRETS_DIR`), which defaults to
1614
+ `/run/secrets` - exactly where Docker and Kubernetes mount their secrets.
1615
+ Outside a container, point it at your own directory:
1616
+
1617
+ ```shell
1618
+ mkdir -p /etc/check-opencloud-security/secrets
1619
+ printf '%s' '<github-token>' > /etc/check-opencloud-security/secrets/releases_token
1620
+ chmod 600 /etc/check-opencloud-security/secrets/*
1621
+
1622
+ export COS_SECRETS_DIR=/etc/check-opencloud-security/secrets
1623
+ check-opencloud-security --host opencloud.example.com \
1624
+ --release-token 'secret://releases_token'
1625
+ ```
1626
+
1627
+ The repository ships templates for both files in
1628
+ [`secrets/`](secrets/README.md); copy them and replace the placeholder values.
1629
+
1630
+ # Rating thresholds
1631
+ The scanner grades an instance from `A+` (best) down to `F`. The plugin maps
1632
+ that grade to a numeric rating and compares it against two inclusive
1633
+ thresholds:
1634
+
1635
+ | Rating | 5 | 4 | 3 | 2 | 1 | 0 |
1636
+ |:-------|:-----|:----|:----|:----|:----|:----|
1637
+ | Grade | `A+` | `A` | `C` | `D` | `E` | `F` |
1638
+
1639
+ - `-c, --critical` / `COS_CRITICAL` (default `1`, i.e. `E`) - a rating at or
1640
+ below this value is `CRITICAL`.
1641
+ - `-w, --warning` / `COS_WARNING` (default `3`, i.e. `C`) - a rating at or
1642
+ below this value is `WARNING`.
1643
+
1644
+ Two rules always apply on top of the thresholds:
1645
+
1646
+ - **Known vulnerabilities raise the state to at least `WARNING`**, even when
1647
+ the overall rating still looks acceptable. The reported identifiers are
1648
+ listed in the output.
1649
+ - **An end-of-life version is always `CRITICAL`**, because it receives no
1650
+ security fixes at all.
1651
+
1652
+ > **A single critical finding does not page by default.** The worst finding
1653
+ > caps the rating rather than setting it: critical caps at `2` (`D`), which the
1654
+ > default `--critical 1` still reports as `WARNING`. That is deliberate - it
1655
+ > keeps one exposed path from being indistinguishable from an end-of-life
1656
+ > instance. If a critical finding should wake somebody up, run with
1657
+ > `--critical 2`.
1658
+
1659
+ A rating outside the documented `0-5` range yields `UNKNOWN`. `--critical`
1660
+ must not be higher than `--warning`, and both must be within `0-5`; otherwise
1661
+ the plugin refuses to run.
1662
+
1663
+ ```shell
1664
+ # Only alert once the instance is actually end-of-life
1665
+ check-opencloud-security --host opencloud.example.com --warning 1 --critical 0
1666
+
1667
+ # Page on any critical finding
1668
+ check-opencloud-security --host opencloud.example.com --warning 4 --critical 2
1669
+ ```
1670
+
1671
+ # Hardening checks
1672
+ Besides the pass/fail checks above, the scanner reports which hardening
1673
+ measures the instance has in place. With `--check-hardening` /
1674
+ `COS_CHECK_HARDENING` these are evaluated as well.
1675
+
1676
+ The names are terse because they end up in alert text, so here is what each
1677
+ one means and what to change. Every setting below is an OpenCloud environment
1678
+ variable; run the plugin with `--debug` to get the same explanation printed
1679
+ next to the finding.
1680
+
1681
+ | Hardening | What a failure means | Setting to change |
1682
+ |:----------|:---------------------|:------------------|
1683
+ | `basicAuthDisabled` | The instance offers HTTP Basic auth, so credentials can be replayed on every request and single sign-on (with any second factor) is bypassed. | [`PROXY_ENABLE_BASIC_AUTH=false`][proxy-env] - the default; OpenCloud documents it as development-only. |
1684
+ | `cspWithoutUnsafeInline` | The `Content-Security-Policy` contains `'unsafe-inline'`, so injected markup may execute. **This is OpenCloud's shipped default** - see the note below. | [`PROXY_CSP_CONFIG_FILE_LOCATION`][proxy-env] pointing at your own `csp.yaml` (or `PROXY_CSP_CONFIG_FILE_OVERRIDE_LOCATION` to replace the default outright). |
1685
+ | `publicLinkPasswordEnforced` | Public links may be created without a password, so the URL alone grants access. OpenCloud enforces a password on read-only links but not on writable ones. | [`OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD=true`][sharing-env] and `OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=true`. |
1686
+ | `passwordPolicyEnforced` | Public link passwords may be shorter than 8 characters. (This policy covers link passwords, not account passwords - those belong to your identity provider.) | [`OC_PASSWORD_POLICY_MIN_CHARACTERS`][link-password] (default `8`), plus the `MIN_LOWERCASE`/`MIN_UPPERCASE`/`MIN_DIGITS`/`MIN_SPECIAL_CHARACTERS` companions. |
1687
+ | `hstsLongMaxAge` | `Strict-Transport-Security` carries a `max-age` below a year. | None in OpenCloud - its proxy sends ten years, so a short value comes from a reverse proxy in front of it. |
1688
+ | `hstsPreload` | The same header has no `preload` directive, so the very first request to the host is unprotected. | None in OpenCloud - again a reverse proxy rewriting the header. Only add `preload` once every subdomain is HTTPS-only. |
1689
+ | `publicLinkExpirationEnforced` | Nothing about your instance: OpenCloud hardcodes this capability to `false`. **Never alerted on** - see below. | None exists. |
1690
+ | `userEnumerationRestricted` | Account search is not limited to shared groups. OpenCloud hardcodes the restricted state, so this passes everywhere. | None exists. |
1691
+
1692
+ [proxy-env]: https://docs.opencloud.eu/docs/dev/server/services/proxy/environment-variables
1693
+ [sharing-env]: https://docs.opencloud.eu/docs/dev/server/services/sharing/environment-variables
1694
+ [frontend-env]: https://docs.opencloud.eu/docs/dev/server/services/frontend/environment-variables
1695
+ [link-password]: https://docs.opencloud.eu/docs/admin/configuration/link-password-policy
1696
+
1697
+ Two further entries can show up in the "Missing hardening" line: `httpsEnforced`
1698
+ when the instance does not enforce HTTPS, and the name of any security header
1699
+ from `setup.headers` that is absent or too weak (e.g.
1700
+ `Strict-Transport-Security`). `--debug` explains those too.
1701
+
1702
+ Anything reported as missing is listed in the output and exported as the
1703
+ `hardenings_missing` performance metric. A result that would otherwise be `OK`
1704
+ is raised to `WARNING`; an existing `WARNING`/`CRITICAL` is never downgraded.
1705
+
1706
+ ```shell
1707
+ check-opencloud-security --host opencloud.example.com --check-hardening
1708
+ ```
1709
+
1710
+ ## Measures that are not settings
1711
+
1712
+ Two of the rows above cannot be influenced by anyone:
1713
+
1714
+ - **`publicLinkExpirationEnforced`** is reported as `false` by *every*
1715
+ OpenCloud instance. The capability is a hardcoded constant in the frontend
1716
+ service, not a configuration value, so there is no variable to set and no
1717
+ version that passes.
1718
+ - **`userEnumerationRestricted`** is the same story with the opposite sign:
1719
+ hardcoded to the restricted state, so it always passes.
1720
+
1721
+ They are still recorded in the result document, because the observation is
1722
+ real, but they are **left out of the "Missing hardening" line, out of the
1723
+ `hardenings_missing` metric and out of the webhook**. A warning nobody can
1724
+ ever clear is noise, and noise is how genuine findings get ignored. `--debug`
1725
+ still lists them, with the explanation.
1726
+
1727
+ `cspWithoutUnsafeInline` is a milder version of the same problem: OpenCloud's
1728
+ **default CSP contains `'unsafe-inline'`**, so it fails on a stock instance.
1729
+ That one *is* changeable, so it is reported rather than excused - but be aware
1730
+ that the web interface currently relies on inline scripts and styles, so a
1731
+ strict policy is likely to break the UI and any connected office or IDP
1732
+ service. Test before rolling it out.
1733
+
1734
+ The capability-derived rows only appear when the instance actually reports the
1735
+ corresponding capability, so an older release does not accumulate phantom
1736
+ findings.
1737
+
1738
+ ## Accepting a finding you are not going to fix
1739
+
1740
+ Some findings are real but not actionable in your environment: a CSP you
1741
+ cannot tighten without breaking the web UI, an HSTS header your reverse proxy
1742
+ owns, or basic auth you genuinely need for a migration tool. Left alone they
1743
+ keep the rating down and the check yellow, and a check that is permanently
1744
+ yellow is a check nobody reads.
1745
+
1746
+ `--ignore-hardening` accepts a finding by name. The rating is recalculated
1747
+ without it, so accepting a finding really does change the grade:
1748
+
1749
+ ```bash
1750
+ check-opencloud-security --host opencloud.example.com --check-hardening \
1751
+ --ignore-hardening cspWithoutUnsafeInline \
1752
+ --ignore-hardening basicAuthDisabled
1753
+ ```
1754
+
1755
+ The option is repeatable, also takes a comma-separated list, and understands
1756
+ shell-style wildcards for the identifiers that carry a path or a port:
1757
+
1758
+ ```bash
1759
+ --ignore-hardening 'debugPort:*,exposed:/status.php'
1760
+ ```
1761
+
1762
+ It matches hardening measures, security header names, `httpsEnforced` and the
1763
+ ids of the additional checks - one option for all of them, because
1764
+ `basicAuthDisabled` is both a hardening measure and an additional check, and
1765
+ accepting it in one place but not the other would be surprising.
1766
+
1767
+ A waived finding:
1768
+
1769
+ - no longer lowers the rating,
1770
+ - no longer appears in `Missing hardening:` or `Additional checks failed`,
1771
+ - no longer counts towards the `hardenings_missing` and `extra_checks_failed`
1772
+ metrics,
1773
+ - is left out of the webhook payload,
1774
+ - but **stays in the JSON result document**, flagged with `"ignored": true`,
1775
+ and is listed in the plugin output as `Ignored by configuration (n): ...`.
1776
+
1777
+ That last point is deliberate. A waiver suppresses an alert, not the evidence:
1778
+ the scan still records what it saw, `--debug` still explains it, and anyone
1779
+ reading the output can see exactly what is being skipped.
1780
+
1781
+ Two things a waiver will not do:
1782
+
1783
+ - **It cannot waive something that passes.** A waiver is only applied to a
1784
+ finding that actually failed, so it cannot quietly turn into a blind spot the
1785
+ day the measure regresses.
1786
+ - **It cannot waive an end-of-life release.** Running a version that receives
1787
+ no security fixes overrides every other signal, including
1788
+ `--ignore-hardening '*'`.
1789
+
1790
+ Waivers are a good fit for a config file, where they can carry a comment
1791
+ explaining why each one is there:
1792
+
1793
+ ```yaml
1794
+ scanner:
1795
+ release_track: production
1796
+ ignore_hardenings:
1797
+ - cspWithoutUnsafeInline # default csp.yaml, tightening it breaks the web UI
1798
+ - hstsPreload # the reverse proxy sets its own HSTS header
1799
+ ```
1800
+
1801
+ # Explaining a rating
1802
+ A rating on its own is a verdict without an argument. `-d` / `--debug` (or
1803
+ `COS_DEBUG=1`) adds the reasoning to the output: where the rating started, what
1804
+ pulled it down, and what every identifier in the report means.
1805
+
1806
+ ```shell
1807
+ check-opencloud-security --host opencloud.example.com --check-hardening --debug
1808
+ ```
1809
+
1810
+ ```text
1811
+ --- Why this rating ---
1812
+ Starting point: 5/5 - the installed release is current and no advisory matches this version
1813
+ Failed check basicAuthDisabled [high] caps the rating at 3/5 - WWW-Authenticate: Basic realm="..."
1814
+ Final rating: 3/5 (C). WARNING at or below C, CRITICAL at or below E.
1815
+
1816
+ --- Missing hardening measures ---
1817
+ basicAuthDisabled: HTTP Basic authentication is enabled
1818
+ The instance answers with a 'WWW-Authenticate: Basic' challenge, so usernames
1819
+ and passwords can be replayed on every request without going through the
1820
+ identity provider. This bypasses single sign-on and any second factor.
1821
+ Setting: PROXY_ENABLE_BASIC_AUTH
1822
+ Fix: Set PROXY_ENABLE_BASIC_AUTH=false (the default). OpenCloud documents
1823
+ this option as being for development only, never for production.
1824
+ Docs: https://docs.opencloud.eu/docs/dev/server/services/proxy/environment-variables
1825
+ --- end of explanation ---
1826
+ ```
1827
+
1828
+ The starting point is what the version and the advisory database alone would
1829
+ give: `5` up to date, `4` a patch update pending, `3` a whole release line
1830
+ behind, `2` known vulnerabilities, `1` critical or high ones, `0` end of life.
1831
+ Failed additional checks then cap it by severity - `critical` to `2`, `high` to
1832
+ `3`, `medium` to `4`, `low` to `5`. A check that failed but did not decide the
1833
+ outcome is still listed, marked as such, so nothing looks quietly dropped.
1834
+
1835
+ Without `--debug` the output stays the size a monitoring system wants. The
1836
+ same breakdown is always present in the scan result as `ratingExplanation`, so
1837
+ it can be read without rerunning the check:
1838
+
1839
+ ```shell
1840
+ python -m opencloud_local_scan.cli scan opencloud.example.com | jq .ratingExplanation
1841
+ ```
1842
+
1843
+ Note that `--debug` also switches logging to `DEBUG`, so HTTP-level detail
1844
+ goes to stderr while the explanation goes to stdout with the rest of the
1845
+ plugin output.
1846
+
1847
+ # Webhook notifications
1848
+ The plugin can post a JSON notification to an HTTP(S) endpoint when a check
1849
+ reaches a critical level. The feature is **optional and disabled by default** -
1850
+ it activates only once `--webhook-url` (or `COS_WEBHOOK_URL`) is set.
1851
+
1852
+ ```shell
1853
+ check-opencloud-security --host opencloud.example.com \
1854
+ --webhook-url https://hooks.example.com/opencloud
1855
+ ```
1856
+
1857
+ - `--webhook-on` / `COS_WEBHOOK_ON` (default `critical`) selects the lowest
1858
+ state that triggers a notification. Each level includes the more severe ones:
1859
+ `critical`, `warning` (WARNING + CRITICAL), `unknown` (UNKNOWN + WARNING +
1860
+ CRITICAL) and `always`.
1861
+ - `--webhook-header` / `COS_WEBHOOK_HEADERS` adds request headers, e.g. for
1862
+ authentication. Repeat the flag, or separate entries with `;` in the
1863
+ environment variable: `COS_WEBHOOK_HEADERS="X-Auth-Token: abc; X-Env: prod"`.
1864
+ - `--webhook-timeout` / `COS_WEBHOOK_TIMEOUT` (default `10`) limits the
1865
+ webhook call; it is independent of the scan `--timeout`.
1866
+
1867
+ Delivery reuses `--retries` / `--backoff-factor`. **A failing webhook never
1868
+ changes the check result** - the plugin appends `Webhook delivery failed` to
1869
+ its output and still exits with the state it measured, so a broken
1870
+ notification channel cannot hide (or fake) a vulnerable instance.
1871
+
1872
+ When several hosts are checked in one run, each host that reaches the
1873
+ configured state produces its own notification. Scans that fail outright
1874
+ (unreachable host, broken TLS) notify as well when `--webhook-on` is set to
1875
+ `unknown` or `always`.
1876
+
1877
+ Example payload:
1878
+
1879
+ ```json
1880
+ {
1881
+ "plugin": "check-opencloud-security",
1882
+ "plugin_version": "1.0.0",
1883
+ "timestamp": "2026-08-07T10:12:33.123456+00:00",
1884
+ "host": "opencloud.example.com",
1885
+ "status": "CRITICAL",
1886
+ "exit_code": 2,
1887
+ "message": "CRITICAL: The 7.3 rolling release line is end-of-life and has no security fixes. Upgrade to 7.4.0.",
1888
+ "rating": 0,
1889
+ "rating_label": "F",
1890
+ "product": "OpenCloud",
1891
+ "product_version": "7.3.0",
1892
+ "domain": "opencloud.example.com",
1893
+ "scanned_at": "2026-08-12 15:24:13.978540",
1894
+ "eol": true,
1895
+ "release_type": "rolling",
1896
+ "lifecycle": {
1897
+ "line": "7.3",
1898
+ "releaseType": "rolling",
1899
+ "state": "endOfLife",
1900
+ "released": "2026-07-14",
1901
+ "endOfLife": "2026-08-03",
1902
+ "daysRemaining": -9,
1903
+ "latestOnLine": null,
1904
+ "upgradeTo": "7.4.0",
1905
+ "reason": "rolling release, unsupported since 2026-08-03"
1906
+ },
1907
+ "vulnerability_count": 0,
1908
+ "vulnerabilities": [],
1909
+ "missing_hardenings": [],
1910
+ "failed_extra_checks": ["exposed:/opencloud.yaml"],
1911
+ "scan_backend": "local",
1912
+ "scan_uuid": "6a1d1bd0-...",
1913
+ "update": {"available": true, "version": "7.3.0", "availableVersion": "7.4.0", "releasedAt": "2026-08-03", "source": "feed", "error": null, "track": "rolling", "newestRelease": null},
1914
+ "duration_seconds": 1.234
1915
+ }
1916
+ ```
1917
+
1918
+ `scan_backend` is always `"local"` - it records how the result was obtained,
1919
+ so a receiver that also handles payloads from scanners with a remote backend
1920
+ can tell them apart without special-casing the plugin name.
1921
+
1922
+ Notifications sent for a failed scan carry only the common fields (`plugin`,
1923
+ `plugin_version`, `timestamp`, `host`, `status`, `exit_code`, `message`).
1924
+
1925
+ > **Note:** treat the webhook as a supplement to your monitoring system, not a
1926
+ > replacement. It is fire-and-forget and is not retried beyond the configured
1927
+ > retry budget.
1928
+
1929
+ # Retries and backoff
1930
+ Transient network errors (timeouts, connection resets, `5xx` responses from the
1931
+ instance) are retried automatically with exponential backoff before the check
1932
+ gives up and reports `UNKNOWN`.
1933
+
1934
+ - `--retries` / `COS_RETRIES` (default `2`) - number of retry attempts after
1935
+ the initial try (so the default performs up to 3 attempts total).
1936
+ - `--backoff-factor` / `COS_BACKOFF_FACTOR` (default `0.5`) - base delay in
1937
+ seconds; the wait before each retry doubles (`backoff_factor * 2^attempt`),
1938
+ e.g. `0.5s`, `1s`, `2s`, ...
1939
+ - `--timeout` / `COS_TIMEOUT` (default `10`) - how long a single request may
1940
+ take before it counts as a failure. Raise it on slow links or when scanning
1941
+ through a proxy.
1942
+
1943
+ Set `--retries 0` to disable retries entirely and fail fast. A retry re-runs
1944
+ the whole scan, so a high retry count on an unreachable host makes the check
1945
+ take noticeably longer than the timeout alone suggests.
1946
+
1947
+ # Performance data
1948
+ Output includes standard Nagios/Icinga performance data after a `|`
1949
+ character, so Icinga2/Grafana/etc. can graph results over time:
1950
+
1951
+ ```
1952
+ rating=5;@0:3;@0:1;0;5 vulnerabilities=0;;;0; time=1.234s;;;0;
1953
+ ```
1954
+
1955
+ The `rating` metric carries the configured WARNING and CRITICAL thresholds in
1956
+ Nagios range syntax (`@0:3` means "warn inside 0-3"), so Icinga2 draws them on
1957
+ the graph without extra configuration.
1958
+
1959
+ | Metric | Meaning |
1960
+ |:------------------|:-----------------------------------------------------------------|
1961
+ | `rating` | Numeric scan rating, `0`-`5` (`5`=A+ ... `0`=F), `U` if unknown |
1962
+ | `vulnerabilities` | Number of known vulnerabilities reported for the scanned version |
1963
+ | `time` | Time spent on the scan, in seconds |
1964
+ | `hardenings_missing` | Missing hardening measures (only with `--check-hardening`) |
1965
+ | `extra_checks_failed` | Number of failed additional checks |
1966
+ | `update_available` | `1` when a newer OpenCloud release exists |
1967
+ | `support_days_left` | Days until the release line loses support (negative when overdue) |
1968
+
1969
+ # Caching
1970
+ The plugin holds no cache: every run scans the instance afresh, so there is
1971
+ nothing to invalidate and no flag to force a fresh scan.
1972
+
1973
+ The one place caching does happen is the optional
1974
+ [scan service](#running-the-scanner-as-a-service), which reuses a result for
1975
+ `service.cache_ttl` seconds. `POST /api/requeue` discards it and scans again.
1976
+
1977
+ # Example output
1978
+
1979
+ A healthy instance:
1980
+
1981
+ ```Shell
1982
+ $ check-opencloud-security -H opencloud.example.com
1983
+ OK: Server is up to date. No known vulnerabilities.
1984
+ OpenCloud 7.4.0 on opencloud.example.com, rating: A+, last scanned: 2026-05-29 08:50:58.000000
1985
+ Additional checks: all passed | rating=5;@0:3;@0:1;0;5 vulnerabilities=0;;;0; time=0.731s;;;0; extra_checks_failed=0;;;0;
1986
+ ```
1987
+
1988
+ A major release that no longer receives fixes - always CRITICAL, regardless of
1989
+ the thresholds:
1990
+
1991
+ ```Shell
1992
+ $ check-opencloud-security -H opencloud.example.com
1993
+ CRITICAL: The 7.3 rolling release line is end-of-life and has no security fixes. Upgrade to 7.4.0.
1994
+ OpenCloud 1.0.0 on opencloud.example.com, rating: F, last scanned: 2026-05-30 07:48:58.000000
1995
+ Additional checks: all passed | rating=0;@0:3;@0:1;0;5 vulnerabilities=0;;;0; time=0.842s;;;0; extra_checks_failed=0;;;0;
1996
+ ```
1997
+
1998
+ A single critical finding caps the rating at `D`, which the default thresholds
1999
+ report as WARNING - see [Rating thresholds](#rating-thresholds):
2000
+
2001
+ ```Shell
2002
+ $ check-opencloud-security -H opencloud.example.com
2003
+ WARNING: Rating D is at or below the warning threshold C, but no known vulnerabilities.
2004
+ OpenCloud 7.4.0 on opencloud.example.com, rating: D, last scanned: 2026-05-29 08:51:33.000000
2005
+ Additional checks failed (1): exposed:/opencloud.yaml | rating=2;@0:3;@0:1;0;5 vulnerabilities=0;;;0; time=0.860s;;;0; extra_checks_failed=1;;;0;
2006
+ ```
2007
+
2008
+ With `--check-hardening` on a production instance whose proxy still offers
2009
+ HTTP Basic authentication:
2010
+
2011
+ ```Shell
2012
+ $ check-opencloud-security -H opencloud.example.com --check-hardening
2013
+ WARNING: Rating C is at or below the warning threshold C, but no known vulnerabilities.
2014
+ OpenCloud 7.2.3 on opencloud.example.com, rating: C, last scanned: 2026-08-12 15:58:04.138671
2015
+ Release lifecycle: 7.2 (production), current release
2016
+ Missing hardening: basicAuthDisabled, cspWithoutUnsafeInline, publicLinkPasswordEnforced (run with --debug for what each means and how to fix it)
2017
+ Additional checks failed (1): basicAuthDisabled
2018
+ Update check (feed, installed 7.2.3): up to date | rating=3;@0:3;@0:1;0;5 vulnerabilities=0;;;0; time=1.835s;;;0; hardenings_missing=3;;;0; extra_checks_failed=1;;;0; update_available=0;;;0;1
2019
+ ```
2020
+
2021
+ The rating dropped to `C` because `basicAuthDisabled` is also an additional
2022
+ check, and a failed `high` check caps the rating at `3`. A hardening measure
2023
+ that is *only* a hardening measure raises the state to WARNING without
2024
+ lowering the grade. Add `--debug` to have the check spell that out, along with
2025
+ what each identifier means - see
2026
+ [Explaining a rating](#explaining-a-rating).
2027
+
2028
+ # Icinga Director
2029
+ [Icinga Director](https://icinga.com/docs/icinga-director/latest/) manages
2030
+ `CheckCommand`, `Service Template`, and `Service` objects through its web UI
2031
+ instead of hand-written config files. The steps below work for either the
2032
+ native install or the [Docker](#docker) image.
2033
+
2034
+ 1. **Create the Command**
2035
+ - Navigate to *Icinga Director → Commands → Add*.
2036
+ - **Command name:** `check_opencloud_security`
2037
+ - **Command:**
2038
+ - Native install: `/usr/lib/nagios/plugins/check-opencloud-security` (wherever you installed/symlinked it, see [Installation](#installation)).
2039
+ - Docker: `/usr/bin/docker` (see the [Docker CheckCommand](#using-the-docker-image-instead) example for the required fixed arguments `run`, `--rm`, and the image name).
2040
+ - **Command type:** *Plugin Check Command*.
2041
+
2042
+ 2. **Add the arguments** on the same Command object (*Fields* tab → *Add argument*):
2043
+
2044
+ | Argument | Value | Description |
2045
+ |:-------------|:----------------------------|:------------------------------------|
2046
+ | `--host` | `$address$` (or a custom Director Data Field, e.g. `$opencloud_host$`) | OpenCloud hostname, IP or URL, required |
2047
+ | `--port` | Data Field `$opencloud_port$`, optional | Port, e.g. `9200` |
2048
+ | `--insecure` | Set-if Data Field `$opencloud_insecure$` (boolean), optional | Self-signed instance |
2049
+ | `--proxy` | Data Field `$opencloud_proxy$`, optional | HTTP/HTTPS proxy |
2050
+ | `--debug` | Set-if Data Field `$opencloud_debug$` (boolean), optional | Verbose debug output |
2051
+
2052
+ For each optional argument, tick *Skip this argument on empty value* so
2053
+ Director omits the flag entirely when the field isn't set.
2054
+
2055
+ 3. **Expose the fields to services** by defining matching *Data Fields* under
2056
+ the Command (*Fields* tab → *Add data field*), e.g. `opencloud_host`,
2057
+ `opencloud_port`, `opencloud_insecure`, `opencloud_debug` - then set their
2058
+ *Data Type* (`String` or `Boolean`) and *Var Filter* as needed.
2059
+
2060
+ 4. **Create a Service Template**
2061
+ - *Icinga Director → Service Templates → Add*.
2062
+ - **Check command:** `check_opencloud_security`.
2063
+ - **Check interval:** `24h` is a good default; see the note under
2064
+ [Icinga2 / Nagios](#icinga2--nagios) before going much lower.
2065
+ - Leave the Data Fields empty here so they can be filled in per service/host.
2066
+
2067
+ 5. **Apply it to a host or host group**
2068
+ - *Icinga Director → Services → Add* (or a *Service Apply Rule* for a whole host group).
2069
+ - Import the Service Template created above.
2070
+ - Fill in `opencloud_host` (or rely on `$address$` if you didn't override it) and any optional fields.
2071
+ - Deploy the configuration from *Icinga Director → Deployments*.
2072
+
2073
+ Once deployed, Icinga2 will invoke the command exactly as described in the
2074
+ [Icinga2 / Nagios](#icinga2--nagios) section, whether that resolves to the
2075
+ native binary or `docker run` under the hood.
2076
+
2077
+ ## Automated deployment with Ansible
2078
+
2079
+ Prefer not to click through Icinga Director or configure hosts by hand?
2080
+ [`ansible/`](ansible/README.md) contains ready-to-use playbooks that install
2081
+ and configure check-opencloud-security (native or Docker) on one or more
2082
+ Icinga2 hosts, including the `CheckCommand`/`Service` objects described
2083
+ above. See [`ansible/README.md`](ansible/README.md) for prerequisites and
2084
+ usage.
2085
+
2086
+ # Scheduling without Icinga2 / Nagios (systemd timer / cron)
2087
+ If you don't run Icinga2/Nagios, you can still schedule regular scans with
2088
+ systemd timers or cron. Ready-to-adapt example files live in
2089
+ [`contrib/`](contrib/):
2090
+
2091
+ - [`contrib/systemd/check-opencloud-security.service`](contrib/systemd/check-opencloud-security.service)
2092
+ and [`.timer`](contrib/systemd/check-opencloud-security.timer)
2093
+ - [`contrib/systemd/check-opencloud-security.env.example`](contrib/systemd/check-opencloud-security.env.example)
2094
+ - [`contrib/cron/check-opencloud-security.cron`](contrib/cron/check-opencloud-security.cron)
2095
+
2096
+ ## systemd timer
2097
+ ```shell
2098
+ sudo mkdir -p /etc/check-opencloud-security
2099
+ sudo cp contrib/systemd/check-opencloud-security.env.example /etc/check-opencloud-security/env
2100
+ sudo $EDITOR /etc/check-opencloud-security/env # set COS_HOST (and any other options)
2101
+
2102
+ sudo cp contrib/systemd/check-opencloud-security.service /etc/systemd/system/
2103
+ sudo cp contrib/systemd/check-opencloud-security.timer /etc/systemd/system/
2104
+
2105
+ sudo systemctl daemon-reload
2106
+ sudo systemctl enable --now check-opencloud-security.timer
2107
+
2108
+ # Run it once immediately to verify the setup:
2109
+ sudo systemctl start check-opencloud-security.service
2110
+ journalctl -u check-opencloud-security.service
2111
+ ```
2112
+
2113
+ ## cron
2114
+ ```shell
2115
+ sudo cp contrib/cron/check-opencloud-security.cron /etc/cron.d/check-opencloud-security
2116
+ sudo chmod 644 /etc/cron.d/check-opencloud-security
2117
+ sudo $EDITOR /etc/cron.d/check-opencloud-security # set COS_HOST (and any other options)
2118
+ ```
2119
+
2120
+ Both examples configure the check entirely through [environment
2121
+ variables](#environment-variables), so the same binary or Docker image can be
2122
+ reused unmodified across hosts - only the environment file/cron entry changes.
2123
+
2124
+ # Troubleshooting
2125
+
2126
+ **`UNKNOWN: ... /status.php is unreachable`**
2127
+ The plugin has to reach the instance itself; there is no hosted scanner doing
2128
+ it on your behalf. Check that the monitoring host can connect, and remember
2129
+ that OpenCloud's own proxy listens on **9200**, not 443:
2130
+ `--host opencloud.example.com:9200` or `--port 9200`.
2131
+
2132
+ **`UNKNOWN: No OpenCloud instance found at ...`**
2133
+ `/status.php` did not answer with an OpenCloud status document. Either
2134
+ something other than OpenCloud is on that address, or a reverse proxy in front
2135
+ of it does not forward `/status.php`. Run with `--debug` to see the response.
2136
+
2137
+ **Certificate errors on a fresh instance**
2138
+ `opencloud init` creates a self-signed certificate. Pass `--insecure` (the
2139
+ untrusted chain is still reported, it just stops counting against the rating),
2140
+ or put a reverse proxy with a real certificate in front of the instance.
2141
+
2142
+ **The version looks wrong (`0.1.0`)**
2143
+ That is the hardcoded legacy field, not the release - see
2144
+ [Reading the version correctly](#reading-the-version-correctly). The plugin
2145
+ reports `legacyVersion` when the instance offered nothing better; upgrading the
2146
+ instance or letting the plugin reach
2147
+ `/ocs/v1.php/cloud/capabilities` resolves it.
2148
+
2149
+ **Every path is reported as exposed**
2150
+ Something in front of the instance answers `200` for everything, including the
2151
+ path the scanner probes to detect exactly that. Check the reverse proxy's
2152
+ fallback rule.
2153
+
2154
+ **The check is slow**
2155
+ Debug-port probing costs up to `debug_port_timeout` seconds per port on a
2156
+ firewalled host. Use `--no-debug-ports`, lower
2157
+ `COS_SCANNER_DEBUG_PORT_TIMEOUT`, or shorten the port list.
2158
+
2159
+ **`UNKNOWN` on the update check / GitHub rate limit**
2160
+ Sixty anonymous API requests per hour and IP address are shared with everything
2161
+ else on that address. Supply `--release-token`, or use `--update-source
2162
+ bundled` / `pinned` to avoid the network entirely.
2163
+
2164
+ **Docker: `permission denied while trying to connect to the Docker socket`**
2165
+ The user running Icinga2/cron/systemd needs permission to talk to the Docker
2166
+ daemon - either add it to the `docker` group, or run the check via `sudo`,
2167
+ depending on your security policy.
2168
+
2169
+ **Nothing happens / no output from cron or systemd**
2170
+ - Cron and systemd units don't have a login shell's `PATH` or environment by
2171
+ default - use the full path to `check-opencloud-security` and set
2172
+ `COS_HOST` explicitly (see [Scheduling](#scheduling-without-icinga2--nagios-systemd-timer--cron)).
2173
+ - Check logs with `journalctl -u check-opencloud-security.service` (systemd)
2174
+ or your configured log file (cron, see the example cron file).
2175
+
2176
+ **Exit code reference**
2177
+
2178
+ | Exit code | Meaning |
2179
+ |:----------|:-----------|
2180
+ | `0` | OK |
2181
+ | `1` | WARNING |
2182
+ | `2` | CRITICAL |
2183
+ | `3` | UNKNOWN |
2184
+
2185
+ # Examples
2186
+
2187
+ A collection of complete, copy-and-paste invocations for the situations that
2188
+ come up most often. Every example uses `opencloud.example.com` as the host.
2189
+
2190
+ ## The basics
2191
+
2192
+ ```bash
2193
+ # The smallest useful check
2194
+ check-opencloud-security --host opencloud.example.com
2195
+
2196
+ # Include hardening measures and security headers in the report
2197
+ check-opencloud-security --host opencloud.example.com --check-hardening
2198
+
2199
+ # Explain the verdict: where the rating started, what pulled it down,
2200
+ # and what every identifier in the output means
2201
+ check-opencloud-security --host opencloud.example.com --check-hardening --debug
2202
+
2203
+ # Several instances in one run; the worst state is reported
2204
+ check-opencloud-security --host cloud-a.example.com --host cloud-b.example.com
2205
+ ```
2206
+
2207
+ ## Release track examples
2208
+
2209
+ ```bash
2210
+ # You follow the production track: only production releases and their
2211
+ # patches count, and you are never sent to a rolling release
2212
+ check-opencloud-security --host opencloud.example.com --release-track production
2213
+
2214
+ # You follow the rolling track: a release is out of support as soon as the
2215
+ # next one ships, and you want to know about it the same day
2216
+ check-opencloud-security --host opencloud.example.com --release-track rolling
2217
+
2218
+ # An LTS instance, where two years of backports are the whole point
2219
+ check-opencloud-security --host opencloud.example.com --release-track lts
2220
+
2221
+ # Warn as soon as an update is available on your track, rather than only
2222
+ # when support has actually run out
2223
+ check-opencloud-security --host opencloud.example.com \
2224
+ --release-track production --update-warning
2225
+ ```
2226
+
2227
+ Remember that a *newer* version is not automatically a *better* supported one:
2228
+ declaring `production` on an instance running a rolling release will report
2229
+ end of life, because that release was never published on the production track.
2230
+
2231
+ ## Accepting findings you are not going to fix
2232
+
2233
+ ```bash
2234
+ # The reverse proxy owns the HSTS header, and the default CSP cannot be
2235
+ # tightened without breaking the web UI
2236
+ check-opencloud-security --host opencloud.example.com --check-hardening \
2237
+ --ignore-hardening cspWithoutUnsafeInline \
2238
+ --ignore-hardening hstsPreload
2239
+
2240
+ # The same thing as a single comma-separated value, which is what you want
2241
+ # in an Icinga command definition or an environment variable
2242
+ check-opencloud-security --host opencloud.example.com --check-hardening \
2243
+ --ignore-hardening 'cspWithoutUnsafeInline,hstsPreload'
2244
+
2245
+ # Wildcards, for the identifiers that carry a path or a port
2246
+ check-opencloud-security --host opencloud.example.com \
2247
+ --ignore-hardening 'debugPort:*'
2248
+
2249
+ # Basic auth is deliberately enabled for a migration tool, and the rating
2250
+ # should reflect that decision rather than stay red for weeks
2251
+ check-opencloud-security --host opencloud.example.com --check-hardening \
2252
+ --ignore-hardening basicAuthDisabled
2253
+
2254
+ # Check what a waiver is actually doing before you commit to it: --debug
2255
+ # lists every waived finding and marks it in the explanation
2256
+ check-opencloud-security --host opencloud.example.com --check-hardening \
2257
+ --ignore-hardening basicAuthDisabled --debug
2258
+ ```
2259
+
2260
+ ## Both together, in a configuration file
2261
+
2262
+ This is the form to prefer for anything permanent, because a waiver can carry
2263
+ a comment explaining why it exists and when it should be revisited:
2264
+
2265
+ ```yaml
2266
+ # /etc/check-opencloud-security/config.yml
2267
+ host: opencloud.example.com
2268
+ check_hardening: true
2269
+ update_warning: true
2270
+
2271
+ scanner:
2272
+ release_track: production
2273
+ ignore_hardenings:
2274
+ - cspWithoutUnsafeInline # default csp.yaml; tightening it breaks the web UI
2275
+ - hstsPreload # the reverse proxy sets its own HSTS header
2276
+ - 'debugPort:*' # debug ports are firewalled at the perimeter
2277
+ ```
2278
+
2279
+ ```bash
2280
+ check-opencloud-security --config /etc/check-opencloud-security/config.yml
2281
+ ```
2282
+
2283
+ The same settings as environment variables, for a container or a systemd unit:
2284
+
2285
+ ```bash
2286
+ export COS_HOST=opencloud.example.com
2287
+ export COS_CHECK_HARDENING=1
2288
+ export COS_SCANNER_RELEASE_TRACK=production
2289
+ export COS_SCANNER_IGNORE_HARDENINGS='cspWithoutUnsafeInline;hstsPreload'
2290
+ check-opencloud-security
2291
+ ```
2292
+
2293
+ ## Instances that are not on the public internet
2294
+
2295
+ ```bash
2296
+ # OpenCloud's own proxy, with a self-signed certificate
2297
+ check-opencloud-security --host 10.0.0.5 --port 9200 --insecure
2298
+
2299
+ # Plain HTTP behind a terminating load balancer
2300
+ check-opencloud-security --host opencloud.internal --scheme http
2301
+
2302
+ # An IPv6 address
2303
+ check-opencloud-security --host '[2001:db8::1]'
2304
+
2305
+ # Air-gapped: no release feed, verdicts from the bundled schedule only
2306
+ check-opencloud-security --host opencloud.example.com --update-source bundled
2307
+
2308
+ # Rate-limited by GitHub, or simply offline: pin the newest release yourself
2309
+ check-opencloud-security --host opencloud.example.com --latest-version 7.2.3
2310
+
2311
+ # Skip the debug-port probes, which cost up to 15 seconds on a firewalled host
2312
+ check-opencloud-security --host opencloud.example.com --no-debug-ports --timeout 5
2313
+ ```
2314
+
2315
+ ## Thresholds and notifications
2316
+
2317
+ ```bash
2318
+ # Stricter than the default: warn at A, go critical at C
2319
+ check-opencloud-security --host opencloud.example.com --warning 4 --critical 3
2320
+
2321
+ # Post to a webhook when the check goes critical
2322
+ check-opencloud-security --host opencloud.example.com \
2323
+ --webhook-url https://hooks.example.com/opencloud \
2324
+ --webhook-header 'Authorization: Bearer secret://webhook_token'
2325
+
2326
+ # A production instance, hardening reported, two findings accepted,
2327
+ # notified on anything worse than OK - a realistic complete invocation
2328
+ check-opencloud-security --host opencloud.example.com \
2329
+ --release-track production \
2330
+ --check-hardening \
2331
+ --ignore-hardening 'cspWithoutUnsafeInline,hstsPreload' \
2332
+ --update-warning \
2333
+ --warning 4 --critical 2 \
2334
+ --webhook-url https://hooks.example.com/opencloud \
2335
+ --webhook-on warning
2336
+ ```
2337
+
2338
+ ## Icinga2 command definition
2339
+
2340
+ ```
2341
+ apply Service "opencloud-security" {
2342
+ import "generic-service"
2343
+ check_command = "check_opencloud_security"
2344
+
2345
+ vars.opencloud_host = host.address
2346
+ vars.opencloud_check_hardening = true
2347
+ vars.opencloud_release_track = "production"
2348
+ vars.opencloud_ignore_hardening = "cspWithoutUnsafeInline,hstsPreload"
2349
+
2350
+ assign where host.vars.opencloud == true
2351
+ }
2352
+ ```
2353
+
2354
+ ## The scanner on its own
2355
+
2356
+ ```bash
2357
+ # One-shot JSON, for a script or an ad-hoc look at the raw result
2358
+ check-opencloud-scanner scan opencloud.example.com | jq '.rating, .lifecycle'
2359
+
2360
+ # Which findings were waived, and which are recorded but not alerted on
2361
+ check-opencloud-scanner scan opencloud.example.com | jq '.ignored, .extraChecks'
2362
+ ```
2363
+
2364
+ # Contributing
2365
+ Bug reports, feature requests and pull requests are welcome. See
2366
+ [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup, the test suite,
2367
+ the linting rules and how releases are cut.
2368
+
2369
+ # License
2370
+ Licensed under the terms of GNU General Public License v3.0. See LICENSE file.
2371
+
2372
+ ![Linting](https://github.com/sowoi/check-opencloud-security/actions/workflows/run-ruff-check.yml/badge.svg)
2373
+ ![Unittests](https://github.com/sowoi/check-opencloud-security/actions/workflows/run-tests.yml/badge.svg)
2374
+ ![Type checking](https://github.com/sowoi/check-opencloud-security/actions/workflows/run-mypy-check.yml/badge.svg)
2375
+ ![Ansible](https://github.com/sowoi/check-opencloud-security/actions/workflows/run-ansible-check.yml/badge.svg)