-
Notifications
You must be signed in to change notification settings - Fork 20
Deps dashboard monitoring #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,60 @@ | ||
| Since we can't use Dependabot to monitor these C packages/libraries automatically, | ||
| we rely on the folllowing sources: | ||
| # Monitoring dependency versions | ||
|
|
||
| The pinned versions and hashes live in [`env.sh`](env.sh): `TOR_VERSION`, | ||
| `ZLIB_VERSION`, `LIBEVENT_VERSION`, `OPENSSL_VERSION` and their matching | ||
| `*_HASH` values. | ||
|
|
||
| ## Primary: Renovate Dependency Dashboard | ||
|
|
||
| Renovate watches the `*_VERSION` lines in `env.sh` (see the `customManagers` in | ||
| [`renovate.json`](renovate.json)) and lists any available upstream releases on | ||
| the repo's **Dependency Dashboard** issue. It is configured with | ||
| `dependencyDashboardApproval`, so it never opens PRs on its own — the dashboard | ||
| is purely a notification surface. | ||
|
|
||
| When the dashboard shows a newer version, run the `brave-tor-client-release` | ||
| Jenkins job (see the release steps in [`README.md`](README.md)) with the new | ||
| version and hash; that job opens the bump PR. | ||
|
|
||
| ## Fallback: upstream sources | ||
|
|
||
| If Renovate is unavailable or a release is missed, these are the upstream | ||
| sources: | ||
|
|
||
| - Libevent: [GitHub repo tags](https://github.com/libevent/libevent/tags.atom) | ||
| - OpenSSL: [upstream changelog](https://www.openssl.org/news/cl111.txt) | ||
| - Tor: [packager mailing list](https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-packagers) and [annoucements forum topic](https://forum.torproject.org/c/news/tor-release-announcement/28) | ||
| - Zlib: [upstream changeLog](https://zlib.net/ChangeLog.txt) | ||
| - OpenSSL: [upstream changelog](https://openssl-library.org/news/changelog/) and [security advisories](https://openssl-library.org/news/vulnerabilities/) | ||
| - Tor: [packager mailing list](https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-packagers) and [announcements forum topic](https://forum.torproject.org/c/news/tor-release-announcement/28) | ||
| - Zlib: [upstream ChangeLog](https://zlib.net/ChangeLog.txt) | ||
|
|
||
| Libevent is monitored using an RSS reader. | ||
| ## Where the hashes come from | ||
|
|
||
| OpenSSL and Zlib are monitored using a local git repo which keeps a copy of the | ||
| latest version of the changelog and a daily cronjob to update it: | ||
| The `*_HASH` in `env.sh` is the SHA256 of the canonical source tarball. The | ||
| build (`Dockerfile-linux` and friends) GPG-verifies each tarball against the | ||
| keys in `gpg-keys/` and then checks it against `*_HASH`, so the trust anchor is | ||
| the GPG signature; the hash is a pin you compute after verifying. | ||
|
|
||
| ``` | ||
| #!/bin/bash | ||
| - **Tor** publishes a signed hash file directly — read it from | ||
| `https://dist.torproject.org/tor-<version>.tar.gz.sha256sum` | ||
| (verify with the adjacent `.sha256sum.asc`). | ||
| - **zlib / libevent / OpenSSL** ship a detached GPG signature (`.asc`) but no | ||
| hash file used by the build; download the canonical tarball, verify the | ||
| signature, then run `shasum -a 256`. | ||
|
|
||
| Canonical URLs (same ones the build downloads from): | ||
|
|
||
| ```sh | ||
| # tor -> hash is published, just read it | ||
| curl -fsSL https://dist.torproject.org/tor-$TOR_VERSION.tar.gz.sha256sum | ||
|
Comment on lines
+43
to
+47
|
||
|
|
||
| pushd ~/openssl-changelog > /dev/null | ||
| wget --quiet -O cl111.txt https://www.openssl.org/news/cl111.txt || exit 1 | ||
| git diff | ||
| git commit -a -m "Updated changelog" > /dev/null | ||
| popd > /dev/null | ||
| # zlib | ||
| curl -fsSL https://zlib.net/zlib-$ZLIB_VERSION.tar.gz | shasum -a 256 | ||
|
|
||
| # libevent | ||
| curl -fsSL https://github.com/libevent/libevent/releases/download/release-$LIBEVENT_VERSION/libevent-$LIBEVENT_VERSION.tar.gz | shasum -a 256 | ||
|
|
||
| # openssl | ||
| curl -fsSL https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz | shasum -a 256 | ||
| ``` | ||
|
|
||
| Always GPG-verify the tarball (as the Dockerfiles do) before trusting a hash | ||
| you computed yourself. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,62 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": [ | ||
| "local>brave/renovate-config" | ||
| "local>brave/renovate-config", | ||
| "local>brave/renovate-config:enable-vulnerability-alerts" | ||
| ], | ||
| "addLabels": ["CI/skip", "dependencies", "renovate"] | ||
| "addLabels": ["CI/skip", "dependencies", "renovate"], | ||
| "dependencyDashboard": true, | ||
| "dependencyDashboardApproval": true, | ||
| "customManagers": [ | ||
| { | ||
| "customType": "regex", | ||
| "fileMatch": ["^env\\.sh$"], | ||
| "matchStrings": ["TOR_VERSION=\"(?<currentValue>[^\"]+)\""], | ||
| "depNameTemplate": "tor", | ||
| "packageNameTemplate": "tpo/core/tor", | ||
| "datasourceTemplate": "gitlab-tags", | ||
| "registryUrlTemplate": "https://gitlab.torproject.org", | ||
| "extractVersionTemplate": "^tor-(?<version>.+)$", | ||
| "versioningTemplate": "loose" | ||
| }, | ||
| { | ||
| "customType": "regex", | ||
| "fileMatch": ["^env\\.sh$"], | ||
| "matchStrings": ["ZLIB_VERSION=\"(?<currentValue>[^\"]+)\""], | ||
| "depNameTemplate": "zlib", | ||
| "packageNameTemplate": "madler/zlib", | ||
| "datasourceTemplate": "github-tags", | ||
| "extractVersionTemplate": "^v(?<version>.+)$" | ||
| }, | ||
| { | ||
| "customType": "regex", | ||
| "fileMatch": ["^env\\.sh$"], | ||
| "matchStrings": ["LIBEVENT_VERSION=\"(?<currentValue>[^\"]+)\""], | ||
| "depNameTemplate": "libevent", | ||
| "packageNameTemplate": "libevent/libevent", | ||
| "datasourceTemplate": "github-tags", | ||
| "extractVersionTemplate": "^release-(?<version>.+)$", | ||
| "versioningTemplate": "loose" | ||
| }, | ||
| { | ||
| "customType": "regex", | ||
| "fileMatch": ["^env\\.sh$"], | ||
| "matchStrings": ["OPENSSL_VERSION=\"(?<currentValue>[^\"]+)\""], | ||
| "depNameTemplate": "openssl", | ||
| "packageNameTemplate": "openssl/openssl", | ||
| "datasourceTemplate": "github-tags", | ||
| "extractVersionTemplate": "^openssl-(?<version>.+)$" | ||
| } | ||
| ], | ||
| "packageRules": [ | ||
| { | ||
| "matchDepNames": ["tor"], | ||
| "allowedVersions": "/^\\d+\\.\\d+\\.\\d+\\.\\d+$/" | ||
| }, | ||
| { | ||
| "description": "Surface new releases on the dashboard immediately instead of waiting out the 7-day minimumReleaseAge from the base config; safe because this repo is dashboard-only and every entry is triaged by hand.", | ||
| "matchDepNames": ["tor", "zlib", "libevent", "openssl"], | ||
| "minimumReleaseAge": "0 days" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to run every 2 days from my understanding of https://developer.mend.io/github/brave/tor_build_scripts - not sure if it can be configured to be more frequent or if that's acceptable