Paul Schwabauer
187d114631
Remove unnecessary URL joins ( #676 )
...
generate-markdown / auto-update-readme (push) Has been cancelled
Go / build (push) Has been cancelled
Go / run_modver (push) Has been cancelled
This should avoid bugs for more complex scenarios.
2025-09-01 16:13:57 +02:00
koplas
fc3837d655
Make json parsing more strict
Go / build (push) Waiting to run
Go / run_modver (push) Blocked by required conditions
2025-07-02 17:06:25 +02:00
koplas
1098c6add0
Use correct base URL
Go / build (push) Has been cancelled
Go / run_modver (push) Has been cancelled
2025-06-20 16:37:37 +02:00
koplas
6ac97810d0
Use JoinPath
...
This avoids issues where parts of the URL are discarded.
2025-06-19 15:11:45 +02:00
koplas
2c5ef1fd5f
Avoid memory leak
...
Move `resp.Body.Close()` before check of status code.
Reported by @mgoetzegb here: https://github.com/gocsaf/csaf/pull/625#issuecomment-2744067770
2025-03-24 13:32:43 +01:00
Paul Schwabauer
0848143a0b
Update lint ( #626 )
...
* Update linter
* Format
* Fix lint
2025-03-19 09:39:07 +01:00
Sascha L. Teichmann
5437d8127a
Store downloader in context
2025-03-17 09:10:03 +01:00
Sascha L. Teichmann
a7821265ca
Move advisory downloading to download context method
2025-03-17 08:57:05 +01:00
koplas
1d1c5698da
Merge branch 'main' into sha-handling
2025-03-05 09:41:29 +01:00
koplas
9275a37a9f
Format
2025-01-08 08:50:30 +01:00
koplas
b8a5fa72d5
Fix nil check in downloader
2025-01-08 08:49:42 +01:00
koplas
a51964be3f
Add initial csaf_checker provider test
2024-12-04 16:02:03 +01:00
ncsc-ie-devs
1daaed2c51
ensure HTTP requests use proxy env vars ( #597 )
...
* fix: ensure HTTP requests use proxy env vars
Updated all instances of `http.Transport` to include the `Proxy` field set to `http.ProxyFromEnvironment`. This ensures that the application respects proxy configuration defined by the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables.
### Changes:
- Modified `http.Transport` initialization across the codebase to use:
```go
Proxy: http.ProxyFromEnvironment
```
- Ensured TLS configurations remain intact by preserving `TLSClientConfig`.
### Why:
- Previously, HTTP requests bypassed proxy settings due to missing configuration in the transport layer.
- This fix enables compatibility with proxied environments, aligning with standard Go behavior.
### Impact:
- All HTTP and HTTPS traffic now adheres to proxy settings.
- Domains listed in `NO_PROXY` bypass the proxy as expected.
### Verification:
- Tested with proxy environment variables set (`HTTP_PROXY`, `HTTPS_PROXY`).
- Verified requests route through the proxy and `NO_PROXY` works as intended.
* reformat with fmt
---------
Co-authored-by: Cormac Doherty <cormac.doherty@ncsc.gov.ie>
2024-12-02 11:42:54 +01:00
koplas
56509bbb4d
Use new path in tests
2024-11-27 12:51:38 +01:00
koplas
a5f4b10c4e
Merge branch 'main' into sha-handling
2024-11-27 12:39:14 +01:00
koplas
ffb4eff933
Merge unittest into sha-handling
...
commit 990c74a1a6
Merge: 86d7ce1 7824f3b
Author: koplas <pschwabauer@intevation.de>
Date: Fri Nov 22 16:58:46 2024 +0100
Merge branch 'sha-handling' into unittest
commit 86d7ce13dc
Merge: a6807d2 79b8900
Author: koplas <pschwabauer@intevation.de>
Date: Fri Nov 22 16:54:45 2024 +0100
Merge branch 'sha-handling' into unittest
commit 79b89009dd
Author: koplas <pschwabauer@intevation.de>
Date: Fri Nov 22 16:31:56 2024 +0100
Improve hash fetching and logging
commit a6807d24d6
Merge: ddb5518 d18d2c3
Author: koplas <pschwabauer@intevation.de>
Date: Fri Nov 22 16:51:55 2024 +0100
Merge branch 'sha-handling' into unittest
commit d18d2c3bf1
Author: koplas <pschwabauer@intevation.de>
Date: Fri Nov 22 16:31:56 2024 +0100
Improve hash fetching and logging
commit ddb5518c6d
Author: koplas <54645365+koplas@users.noreply.github.com>
Date: Tue Sep 17 10:45:25 2024 +0200
Extend SHA marking tests
commit 13c94f4fa0
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 20:46:31 2024 +0200
Use temp directory for downloads
commit 1819b4896b
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 20:37:55 2024 +0200
Fix rolie feed
commit 989e3667ba
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 20:23:22 2024 +0200
Fix provider-metadata.json
commit 714735d74a
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 20:08:21 2024 +0200
Implement provider handler
commit d488e39947
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 16:26:37 2024 +0200
Add info about gpg key
commit a9bf9da130
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 16:12:49 2024 +0200
Rename directory testdata
commit 6ca6dfee25
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 16:01:41 2024 +0200
Add initial downloader tests
commit 20bee797c6
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 15:58:31 2024 +0200
Fix: Remove unecessary error print
commit 8e4e508073
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 14:50:48 2024 +0200
Extend links test
commit 3ba29f94de
Author: koplas <pschwabauer@intevation.de>
Date: Mon Sep 16 14:11:14 2024 +0200
Add initial directory feed testdata
commit dee55aafd9
Author: koplas <54645365+koplas@users.noreply.github.com>
Date: Mon Sep 16 10:47:32 2024 +0200
Add initial testdata
commit cd9338ae72
Author: koplas <54645365+koplas@users.noreply.github.com>
Date: Thu Sep 12 15:54:42 2024 +0200
Add initial download unittests
2024-11-27 12:15:21 +01:00
koplas
7824f3b48d
Improve hash fetching and logging
2024-11-22 16:56:58 +01:00
koplas
c00dc36547
Remove -h for preferred hash configuration
...
This option was in conflict with the help display.
2024-11-21 12:31:58 +01:00
Bernhard Reiter
e8706e5eb9
feat: perform go path repo move
...
* Change the go module path
from github.com/csaf-poc/csaf_distribution to github.com/gocsaf/csaf.
* Rename archive for release tarballs.
* Adjust testing scripts and documentation.
2024-11-04 13:20:47 +01:00
JanHoefelmeyer
464e88b530
Merge pull request #571 from csaf-poc/fingerprint-no-breaking
...
Improve PGP fingerprint handling
2024-09-09 11:51:09 +02:00
koplas
37c9eaf346
Add CLI flags to specify what hash is preferred
2024-09-09 10:35:41 +02:00
koplas
c2e24f7bbb
Remove check for empty fingerprint
...
The schema validation already catches this error and this check will
never run.
2024-09-06 18:21:25 +02:00
koplas
9037574d96
Improve PGP fingerprint handling
...
Warn if no fingerprint is specified and give more details, if
fingerprint comparison fails.
Closes #555
2024-08-08 12:42:19 +02:00
koplas
be2e4e7424
Improve hash path handling of directory feeds
2024-07-31 11:42:45 +02:00
koplas
0ab851a874
Use a default user agent
2024-07-31 10:16:08 +02:00
koplas
a131b0fb4b
Improve SHA* marking
2024-07-25 15:39:40 +02:00
Marius Goetze
bcf4d2f64a
fix error message
...
The error message had a trailing `:` which suggest that there are some details which were truncated. However the details are already printed before in the log.
2024-07-16 12:00:09 +02:00
Marius Goetze
1e531de82d
fix: don't require debug level to print error details on failed loading of provider metadata json
2024-07-15 14:22:15 +02:00
Sascha L. Teichmann
5c6736b178
Remove data races in downloader caused by shared use of json path eval. ( #547 )
2024-06-24 11:57:38 +02:00
Bernhard Herzog
617deb4c17
Merge pull request #530 from oxisto/slog
...
Added support for structured logging in `csaf_aggregator`
2024-04-25 13:13:11 +02:00
Immanuel Kunz
c704275a38
Merge branch 'csaf-poc:main' into main
2024-04-25 09:42:51 +02:00
Kunz, Immanuel
684770ff2e
fix typo, fix linting errors
2024-04-24 17:53:47 +02:00
Kunz, Immanuel
005e661479
add config flag to use enumerate-only
2024-04-23 20:24:18 +02:00
Kunz, Immanuel
457d519990
minor updates to Enumerate method, integrate enumerate in cmd downloader
2024-04-23 19:09:22 +02:00
Christian Banse
9b1480ae3d
Bumped Go version to Go 1.21. Using log/slog instead of golang.org/x/exp/slog
2024-04-23 15:37:43 +02:00
Kunz, Immanuel
d64aa20cee
first draft for downloader using enumerate
2024-04-22 17:53:45 +02:00
JanHoefelmeyer
39a29e39f1
Change Licenses from MIT to Apache 2.0
2024-04-22 13:11:30 +02:00
Sascha L. Teichmann
91ab7f6b1c
Chance supported minimal Go version back to 1.20 ( #514 )
2023-11-28 10:37:16 +01:00
Sascha L. Teichmann
6f8870154c
Break overly long line. Fix typo in comment.
2023-11-20 21:13:24 +01:00
JanHoefelmeyer
a413852627
Downloader: Only add tlp label to path if no custom directory is configured. Refactor accordingly
2023-11-20 11:05:57 +01:00
JanHoefelmeyer
086c4ab48b
Convert a lot of command line arguments to snake case ( #498 )
...
* Convert a lot of variables to snake case
* Add snakecase for variables made out of two words that had it in no version yet (for consistency)
* Adjust example files too
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-11-06 14:33:05 +01:00
Sascha L. Teichmann
8f6e6ee8bb
improve logging output
2023-10-17 18:52:38 +02:00
Bernhard Reiter
3923dc7044
fix: improve logging for downloader and aggregator
...
* use full name for printing out the used logfile for the downloader.
* for debug or verbose, log the timeintervall that will be used
for downloader and aggregator. (The checker has this as part
of its output already.)
2023-10-17 11:33:03 +02:00
Sascha L. Teichmann
1cc42f0ec0
Downloader: unit test forwarder ( #470 )
...
* Simplify forward method
* Add unit test for validation status
* Add unit test for stats logging in forwarder.
* Add unit test for http client creation.
* Add unit test for replaceExt
* Add unit test for buildRequest
* Add unit test for limitedString
* Add unit test for storeFailedAdvisory
* Add unit test for storeFailedAdvisory ... fixed
* Add unit test for storeFailed
* Add unit test for forward
* comment wording
2023-09-29 09:46:51 +02:00
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
37f770ed3d
Merge pull request #463 from csaf-poc/downloader-unit-tests
...
Downloader: unit tests for stats
2023-09-27 12:16:05 +02:00
Sascha L. Teichmann
7cd076d4f8
Downloader: Remove verbose flag ( #464 )
...
* Remove verbose flag from downloader.
* Do structured http logging in forwarder, too.
* Use structured logging to separate http traffic of downloader from forwarder.
2023-09-27 11:30:24 +02:00
cintek
49da14d47f
feat: log redirects ( #458 )
...
* feat: log redirects
* improved logging and renamed function
2023-09-26 10:03:09 +02:00
Sascha L. Teichmann
fca3f5bb9b
Fix stats unit test.
2023-09-25 23:32:19 +02:00
Sascha L. Teichmann
b0d7dbb387
Add unit test for stats.
2023-09-25 23:23:28 +02:00