1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00
Commit graph

103 commits

Author SHA1 Message Date
Sascha L. Teichmann
7a8cdb6d19
Lift distribution from v2 to v3. (#467)
* v2 -> v3

* Increase version within Makefile

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-09-27 15:46:57 +02:00
JanHoefelmeyer
b61912410a
Empty rolie (#357)
* Create ROLIE feed if summaries are empty

* Formatting, Remove sorting of 0 elements

* Handle minimum entry length error as warning in checker

* Use empty array instead of creating an empty array to reference

* Change schema to allow for empty entry arrays

* Use https://raw.githubusercontent.com/oasis-tcs/csaf/81b2663697958bc5f85d14372712a40028fb8338/csaf_2.0/json_schema/ROLIE_feed_json_schema.json as schema for ROLIE feeds

* Change label name from empty to undefined

* Change default of create_service_document for csaf_provider to true

* Config

* Count entries in csaf-checker, warn if there are none.

* Add Comments to csaf/rolie.go's CountEntries function

* Delete index.txt and changes.csv in aggregator if there are no entries.

* Create an empty ROLIE feed document when setting up folders during create

* nit: set update time stamp in structure init.

* Instantiate label checker only once.

* Ignore domain not having roles.

* provider: Create empty entry section in ROLIE feed.

* Stop check for domain if PMD check fails

* Add missing continue statement

* Report missing ROLIE feed entries in ROLIE feed, not Provider Metadata

* Do not ommit empty entries in ROLIE feeds.

* Fixed error handling problem introduced by faulty merge. Removed unused errStop handling while there.

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
2023-06-30 23:34:43 +02:00
Bernhard E. Reiter
cf49c7e414
Fix go.mod and internal dependencies (#371)
* Use a "/v2" in the module path to match the git version tag which
   lead with a 2. Change all mention of the module as dependency
   internally as well.
2023-06-05 10:24:35 +02:00
Bernhard Herzog
6a91c29baf Check that filename matches ID in csaf_provider 2023-05-09 18:46:00 +02:00
Sascha L. Teichmann
0c2768b711 Fix header client. Simplify code. 2023-03-24 13:40:31 +01:00
JanHoefelmeyer
8f87273837
Remote validator output (#347)
* The validator is now able to print the details of the remote validations.
---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2023-03-15 11:02:06 +01:00
Sascha L. Teichmann
ffb29f5ba4 Replace 'confirming filename' with 'conforming filename' 2023-02-03 16:21:15 +01:00
Sascha L. Teichmann
7cc37bd9fc Enforce mime type 'application/json' when uploading advisories to the provider. 2023-02-02 17:26:12 +01:00
Sascha L. Teichmann
0745a0943d Separate compiling and evaluation of dynamic categories. 2023-01-26 21:54:46 +01:00
JanHoefelmeyer
6dedeff7fc
Update actions.go
Fixes typo: catergory -> category
2023-01-25 11:40:25 +01:00
Sascha L. Teichmann
8c8ccf6a2e Extract more than one string from expr: category fields. 2023-01-22 20:55:26 +01:00
Sascha L. Teichmann
5b60e7d728 Add package comments to make revive happy. 2023-01-19 16:45:26 +01:00
Sascha L. Teichmann
c4b70d20cd Demand Go 1.19 in go.mod. Replaced interface{} with any 2023-01-19 16:45:26 +01:00
Sascha L. Teichmann
a1f446f443 Use fully quoted CSV writer for changes.csv 2022-08-17 12:08:38 +02:00
Sascha L. Teichmann
8af0aeea46 Write directory_urls in provider if write indices. 2022-07-30 12:20:21 +02:00
Bernhard E. Reiter
dce0a9b51f
Disable experimental web interface for provider (#257)
* Disable experimental web interface for provider

* More compact init

* Fixed typo

Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2022-07-25 16:28:54 +02:00
JanHoefelmeyer
5716374eac
Move example location of config files to /etc
* Move example and integration test configuration files to /etc/csaf,
   this includes the provider's config.toml as well as the test OpenPGP keys.
   This shall make it more compatible with good practices like the FHS.

Co-authored-by: Jan Höfelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2022-07-21 15:04:09 +02:00
Sascha L. Teichmann
86a015d6bf
Correct field order in changes.csv (#228) 2022-07-18 18:37:55 +02:00
JanHoefelmeyer
2ac7940206
Pwacc (#218)
* Adds option to require Client Certificate and a Password to aquire write access in provider

* Removed unnecessary flavourtext from provider markdown file

* Fixed and simplified the auth middleware

Co-authored-by: Jan Höfelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2022-07-13 14:09:27 +02:00
JanHoefelmeyer
46f79a9e24
Bailout unknown config (#216)
* provider now checks for undecoded config entries and returns an error if any are found

* Specific error message now in server logs, more general message for user

* Changes spaces to tabs for formatting consistency

* Further formatting

* Improved handling of undecoded TOML fields in config.

* aggregator now checks for not decoded config options

Co-authored-by: Jan Höfelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2022-07-12 14:07:12 +02:00
Sascha L. Teichmann
f06aae9261 Fixed category-label.json name in provider/create 2022-07-08 11:24:55 +02:00
Sascha L. Teichmann
dc8c89c886 Merge branch 'main' into rolie-categories 2022-07-05 16:54:12 +02:00
Sascha L. Teichmann
20f5937240
Only create/update index.txt, changes.csv, security.txt when configured. (#210)
* Change default to not write index.txt, changes.csv and security.txt 
  (for provider and aggregator)
* Add config file options to reenable writing.
2022-07-05 16:44:45 +02:00
Sascha L. Teichmann
e37fe68b34 Link service document in ROLIE feeds. 2022-06-30 16:37:02 +02:00
Sascha L. Teichmann
7f62caeedc create service.json document in provider. 2022-06-30 16:24:39 +02:00
Sascha L. Teichmann
198e5b8897 write dynamic categories into feed categories document. 2022-06-30 11:58:36 +02:00
Sascha L. Teichmann
72a7240fd0 write category documents in create. 2022-06-30 05:04:00 +02:00
Sascha L. Teichmann
df21b2575d improved comment a bit 2022-06-29 23:53:46 +02:00
Sascha L. Teichmann
03ae9892bb Move extending rolie feed to own source file. 2022-06-29 23:47:07 +02:00
Sascha L. Teichmann
d2d3611278 fix config 2022-06-29 23:12:42 +02:00
Sascha L. Teichmann
4b7b93bd1d Factored feed loading out of the already too long uploading method. 2022-06-29 18:57:06 +02:00
Sascha L. Teichmann
14fc9cdc61 Make categories configurable in provider 2022-06-29 18:32:17 +02:00
Bernhard Reiter
b95cd0db74
Fix minor typos in comments and bump (c) year 2022-06-27 17:26:52 +02:00
JanHoefelmeyer
38d3679704
Add hint if provider is called outside of CGI
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2022-06-23 17:27:25 +02:00
Sascha L. Teichmann
78d8b89aca
Add support for remote validation services. (#185)
* Simple tool to test the remote validation

* Added remote validator support to provider.

* Added remote validation to aggregator.

* Calm golint

* Removed csaf_remote_validator tool as it was only for dev.

* Re-added csaf_remote_validator tool. Testing is not done.

* Embed the document entirely

* Include testing the remote validator in the Itests

* Change permission of the script

* Remove code for Itests

* As these will be done in another branch

Co-authored-by: Fadi Abbud <fadi.abbud@intevation.de>
2022-06-21 14:47:06 +02:00
Bernhard E. Reiter
2961a70bf2
Change OpenPGP signatures to be without headers (#183)
* Change options when creating the armored version of the signature
   to leave out the optional headers, which would be `Version:`
   and `Comment:`, as it is considered uncommon for a while now to
   set these.
2022-06-14 13:18:42 +02:00
Sascha L. Teichmann
589547fa94
Improve writing ROLIE feed documents
* Add signature and two time has as link rel attributes to each rolie entry
   for provider and aggregator. Thus following CSAF 2.0 csd02. 
resolve #74
2022-06-14 09:50:36 +02:00
tschmidtb51
22b945a3c3
Improve provider example configuration and docs
* Change "Organization" to include the string "Company" to reflect common sense of category "vendor"
2022-06-14 08:58:11 +02:00
Fadi Abbud
714814a44b
Fix datetime format (#174)
* #173
2022-06-10 10:57:08 +02:00
Sascha L. Teichmann
69f0f3499a
Change openpgp key providing code to use local directory
* Adjust provider and aggregator to copy the used openpgp pubkey into a locally
  provided directory `openpgp` beside the `prodiver-metadata.json`.
  This more robust and self-reliant than using a public pubkey server,
  which is the reason why the CSAF 2.0 csd02 mentions it as example in
  "7.1.20 Requirement 20: Public OpenPGP Key".
 * Improve aggregator by removing a typo `aggreator` from one written paths.
   (Done with this change as it also affects the openpgp/ paths writing.)

solve #85
2022-06-09 10:42:44 +02:00
Sascha L. Teichmann
a63911be41 Fix wrong content of ROLIE link 2022-05-25 12:30:33 +02:00
Sascha L. Teichmann
de595f5da9 Add missing category list in ROLIE feeds. Resolves issue #41 2022-05-25 10:17:17 +02:00
Sascha L. Teichmann
17f22855ee
Add filename conformity check
* Add util function to check a filename for confirming to csaf-v2.0-csd02.
* Add code to reject bad filenames in provider, checker, aggregator and uploader.
2022-05-20 18:57:27 +02:00
Fadi Abbud
17ac0f399a Improve error-handling by wrong config values. 2022-05-13 11:29:19 +02:00
Sascha L. Teichmann
8a1ebe0b7a
Add aggregator; improve itest workflow
* Factor JSON evaluation and  construction base URLs out of of checker.
* Move json path matching to util.
* Add csaf_aggregator (as additional command)
* Improve itest workflow to checkout the branch where it is running on.

resolve #105
resolve  #72

Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
Co-authored-by: Fadi Abbud <fadi.abbud@intevation.de>
2022-05-10 18:12:38 +02:00
Sascha L. Teichmann
06c995c030 For issue #83 2022-04-29 08:52:39 +02:00
Sascha L. Teichmann
c8b53a8143
provider/create: Update existing security.txt
* When creating a new provider setup, update the security.txt if it already exists.
   Put the csaf line on the top, so it may be prefered.

resolve #35
2022-04-22 17:57:58 +02:00
Bernhard Reiter
cbb41588ea
Fix minor typos in code comments 2022-04-21 15:40:56 +02:00
Fadi Abbud
6fe6907c1d
Add --version option
* Add flag to display the version for each binary. It is based on `git describe` but adds
  a number to the PATCH level if we are between annotated tags, so makes it semver.org
 compatible. Use the "-ldflags" method that also works with go 1.17.
* Use Makefile bash and sed magic to do PATCH level increase if needed.

Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2022-04-13 14:27:11 +02:00
Bernhard Reiter
21eb768a05
Improve providers handlung of tls client certs
* Change logging logic to print out the Issuer when a certificate
   was presented.
2022-03-31 12:00:13 +02:00