improve renovate: osv vulnerability alerts, abandonment reporting, pr limits (#8)
## Summary * turn on `osvVulnerabilityAlerts` + `vulnerabilityAlerts` so vulnerable deps get their own PRs labeled `security`, instead of just riding along in the grouped non-major PR * vuln PRs still respect the 3 day `minimumReleaseAge` cooldown on purpose. bypassing it would let a compromised release (shai-hulud style) land the moment it publishes, which is worse than sitting on a known cve for 3 days * add `abandonments:recommended` so unmaintained packages get flagged early * add `dependencies` label plus `prConcurrentLimit` / `prHourlyLimit` of 5 so a first run on a stale repo doesn't dump 30 prs * no workflow behavior changes. schedule stays hourly, install stays as-is. just fixed the readme, which said every 6 hours while the cron was hourly needs `dependencies` and `security` labels to exist on the repos (or org-wide), otherwise labeling just no-ops. --------- Co-authored-by: Madison Grubb <madison@elastiflow.com> Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -7,18 +7,19 @@ This repo runs [Renovate](https://docs.renovatebot.com/) via **Gitea Actions**,
|
||||
- **Gitea Actions** runs a single job from `.gitea/workflows/renovate.yml` on a **cron schedule** and on **manual dispatch**.
|
||||
- The job uses the official `renovatebot/github-action` and reads config from **renovate.json** in this repo.
|
||||
- Renovate processes every non-mirror Gitea repo the bot token can access (push/pull, PRs enabled), opening and updating PRs. Minor and patch updates are grouped into one PR per repo; major updates use separate PRs.
|
||||
- Dependencies with known OSV vulnerabilities get their own PRs labeled `security`. They still wait out `minimumReleaseAge` like everything else, so a poisoned release can't land instantly.
|
||||
|
||||
## Setup
|
||||
|
||||
### 1. Gitea Actions workflow & schedule
|
||||
|
||||
The workflow lives in `.gitea/workflows/renovate.yml` and currently runs every 6 hours:
|
||||
The workflow lives in `.gitea/workflows/renovate.yml` and currently runs every hour:
|
||||
|
||||
```yaml
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 */6 * * *"
|
||||
- cron: "0 * * * *"
|
||||
```
|
||||
|
||||
To change the schedule (e.g. daily or weekly), edit the cron expression there and push a commit.
|
||||
@@ -43,9 +44,16 @@ Create a dedicated Renovate bot user in Gitea (or your IdP) so PRs and commits a
|
||||
3. Copy the token (shown only once) and store it as the `RENOVATE_TOKEN` secret for this repo (or org) in Gitea Actions.
|
||||
4. In **renovate.json**, set `gitAuthor` to match the bot (e.g. `"Renovate Bot <renovate-bot@your-domain>"`).
|
||||
|
||||
### 4. Labels
|
||||
|
||||
Create these labels on the repos (or org-wide) so Renovate can apply them:
|
||||
|
||||
- `dependencies` — all update PRs
|
||||
- `security` — vulnerability-driven PRs
|
||||
|
||||
## Configuration
|
||||
|
||||
Renovate is configured in **renovate.json**. It sets the platform, autodiscovery, grouping (`group:allNonMajor`), best-practices presets, and disables the Dependency Dashboard via the `:disableDependencyDashboard` preset (so it stays off even if other presets enable it). Token and endpoint are provided only via environment (secrets).
|
||||
Renovate is configured in **renovate.json**. It sets the platform, autodiscovery, grouping (`group:allNonMajor`), best-practices presets, OSV vulnerability alerts, abandoned-package reporting, PR rate limits, and disables the Dependency Dashboard via the `:disableDependencyDashboard` preset (so it stays off even if other presets enable it). Token and endpoint are provided only via environment (secrets).
|
||||
|
||||
**Target repos:** If a repo has its own **renovate.json**, it is merged on top of this global config. A repo that sets its own `extends` (e.g. `"extends": ["config:recommended"]`) can effectively replace the global presets, lose grouping, or re-enable the dashboard. To keep bundled PRs and no dashboard, either omit per-repo configs or ensure they do not override `extends` / dashboard settings.
|
||||
|
||||
|
||||
+10
-1
@@ -3,7 +3,8 @@
|
||||
"config:recommended",
|
||||
":configMigration",
|
||||
"group:allNonMajor",
|
||||
":disableDependencyDashboard"
|
||||
":disableDependencyDashboard",
|
||||
"abandonments:recommended"
|
||||
],
|
||||
"gitAuthor": "Renovate Bot <renovate@keligrubb.com>",
|
||||
"semanticCommits": "enabled",
|
||||
@@ -12,6 +13,14 @@
|
||||
"prBodyTemplate": "{{{header}}}{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}{{{controls}}}",
|
||||
"minimumReleaseAge": "3 days",
|
||||
"rangeStrategy": "auto",
|
||||
"labels": ["dependencies"],
|
||||
"osvVulnerabilityAlerts": true,
|
||||
"vulnerabilityAlerts": {
|
||||
"enabled": true,
|
||||
"labels": ["security", "dependencies"]
|
||||
},
|
||||
"prConcurrentLimit": 5,
|
||||
"prHourlyLimit": 5,
|
||||
"dockerfile": {
|
||||
"digest": { "enabled": false }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user